Compile the support agent
Infer intent taxonomy, slot schema, action inventory, escalation classes, and policy boundaries from support assets.
Use frontier AI offline to analyze support policy, tickets, tools, and workflows. Then compile a domain-specific runtime that executes cheaply, quickly, and verifiably.
The LLM performs high-cost synthesis outside the customer request path. Production traffic uses the compiled runtime, which can be tested, traced, replayed, and versioned.
Infer intent taxonomy, slot schema, action inventory, escalation classes, and policy boundaries from support assets.
Generate a parser-valid DSL, typed IR, tool adapters, rule engine config, response templates, and test corpus.
Reject any runtime candidate that fails syntax, type, policy, replay, latency, trace, or fallback checks.
Offline compilation produces the support runtime. Online execution converts customer language into typed state and evaluates deterministic flow rules.
The DSL is intentionally less expressive than English. Ambiguity is a compile error, not a runtime improvisation.
support domain "commerce".
intent "refund_request" means user asks for a refund.
slot order_id is text matching "[A-Z0-9-]{6,}".
slot refund_reason is one of "damaged", "late", "wrong_item".
action lookup_order requires order_id returns order.
action create_refund requires order_id, refund_reason returns refund.
flow "refund order" starts when intent is "refund_request".
collect order_id by asking "What is your order number?"
collect refund_reason by asking "Why are you requesting a refund?"
when order_id is known then call lookup_order with order_id.
when order.age_days <= 30 and refund_reason is "damaged"
then call create_refund with order_id, refund_reason.
when refund.status is "approved"
then say "Your refund of {refund.amount} has been approved." and close.
otherwise escalate to human with priority normal because "manual review".
{
"domain": "commerce",
"flow": "refund order",
"start": { "intent": "refund_request" },
"slots": {
"order_id": { "type": "text", "pattern": "[A-Z0-9-]{6,}" },
"refund_reason": { "type": "enum" }
},
"rules": [
{
"if": { "op": "known", "ref": "order_id" },
"then": [{ "type": "call", "action": "lookup_order" }]
},
{
"if": {
"op": "and",
"args": [
{ "op": "lte", "left": "order.age_days", "right": 30 },
{ "op": "eq", "left": "refund_reason", "right": "damaged" }
]
},
"then": [{ "type": "call", "action": "create_refund" }]
}
]
}
Every deployed runtime carries its parser, schema, tests, traces, thresholds, and replay set. Failures become compiler input for the next version.
| Gate | Purpose | Reject when |
|---|---|---|
| Syntax | ANTLR/Bison accepts only declared sentence forms. | The DSL uses unsupported wording or ambiguous structure. |
| Types | Slots, fields, actions, and response variables resolve to declared schemas. | A condition compares strings to numbers, calls unknown actions, or interpolates missing values. |
| Policy | High-risk actions require explicit authorization rules and limits. | Refund, cancellation, account, PII, or credit actions lack guardrails. |
| Replay | Historical and synthetic conversations reproduce expected outcomes. | Actions, messages, escalations, or traces diverge from gold cases. |
| Trace | Every answer is linked to state, rule match, source policy, and tool result. | The runtime cannot explain why it acted. |
The runtime handles covered cases. The LLM handles authoring, extraction, exception triage, synthetic eval generation, and offline recompilation.
Read policies, propose flows, generate tests, extract entities, summarize escalations, diagnose drift, and propose DSL patches.
Evaluate typed state, apply rules, call APIs, send approved responses, create tickets, close cases, and emit traces.