Real World Examples
This page is intentionally dense. Each flow is shown as:
- Chat transcript
- Per-turn step trace (what executed and why)
- Required control-plane rows (
ce_*) - Audit timeline with payload-level checkpoints
Example 1: FAQ (informational path)
- Chat Transcript
- Per-turn Step Trace
- Required ce_* Rows
- Audit + Payload Postmortem
FAQ conversation
Intent and state outcome
| Field | Expected value | Why |
|---|---|---|
| intent | FAQ | Classifier matches informational query language |
| state | IDLE | No slot collection / no pending action required |
| responseType | DERIVED (TEXT) | FAQ answer generated from prompt/context |
Turn T1 runtime trace
| Order | Step | Input facts | Output facts |
|---|---|---|---|
| 1 | LoadOrCreateConversationStep | conversationId present or new | session opened/hydrated |
| 1a | CacheInspectAuditStep | cache-inspector enabled | CACHE_INSPECTION audit row (conditional) |
| 2 | AuditUserInputStep | raw user text | USER_INPUT audit row |
| 3 | DialogueActStep | question sentence | dialogue_act=QUESTION |
| 4 | InteractionPolicyStep | no pending_action, no pending_slot | policy_decision=RECLASSIFY_INTENT |
| 5 | IntentResolutionStep | classifiers + agent hints | intent=FAQ, state=IDLE |
| 6 | SchemaExtractionStep | FAQ schema (light) | schema facts available |
| 7 | RulesStep | no FAQ rule action | RULE_NO_MATCH or no mutation |
| 8 | ResponseResolutionStep | FAQ response row + prompt | assistant output prepared |
| 9 | MemoryStep | recent turn context | memory_session_summary |
| 10 | PersistConversationStep | final session | conversation/audit persisted |
Why no pending-action path here
InteractionPolicyStep sees no pending_action signal and does not produce EXECUTE_PENDING_ACTION. The turn continues as a regular intent-resolution flow.
Minimum rows required for FAQ flow
| Table | Required row shape | Used by |
|---|---|---|
| ce_intent | intent_code=FAQ | IntentResolutionStep |
| ce_intent_classifier | intent_code=FAQ, rule_type=REGEX | IntentResolutionStep |
| ce_prompt_template | intent_code=FAQ, response_type=TEXT | ResponseResolutionStep (DERIVED) |
| ce_response | intent_code=FAQ, state_code=IDLE | ResponseResolutionStep |
| ce_container_config | intent_code=FAQ (optional context source) | AddContainerDataStep |
| ce_config | AgentIntentResolver + SchemaExtractionStep prompt keys | Intent/Schema steps |
FAQ seed snippet
SQL
INSERT INTO ce_intent (intent_code, description, priority, enabled)
VALUES ('FAQ', 'Answer informational questions from FAQ knowledge base', 10, true);
INSERT INTO ce_intent_classifier (intent_code, rule_type, pattern, priority, enabled)
VALUES ('FAQ', 'REGEX', '(?i)\b(what|how|help|faq|information|details|explain)\b', 10, true);
INSERT INTO ce_prompt_template (intent_code, state_code, response_type, system_prompt, user_prompt, temperature, enabled)
VALUES ('FAQ', 'IDLE', 'TEXT',
'You are a concise FAQ assistant. Answer directly and clearly.',
'User question: {{user_input}}\nFAQ context: {{container_data}}\nReturn short helpful answer.',
0.10, true);
INSERT INTO ce_response (intent_code, state_code, output_format, response_type, derivation_hint, priority, enabled)
VALUES ('FAQ', 'IDLE', 'TEXT', 'DERIVED',
'Answer FAQ using available context and user question.', 10, true);
Expected audit stages (ordered)
| Order | Stage | Must contain |
|---|---|---|
| 1 | USER_INPUT | original user message |
| 2 | DIALOGUE_ACT_CLASSIFIED | dialogueAct=QUESTION |
| 3 | INTERACTION_POLICY_DECIDED | policyDecision=RECLASSIFY_INTENT |
| 4 | INTENT_RESOLVED_BY_* | intent=FAQ |
| 5 | RESOLVE_RESPONSE_SELECTED | responseType=DERIVED |
| 6 | ASSISTANT_OUTPUT | output text or json payload |
| 7 | MEMORY_UPDATED | summaryChars/recalled flags |
Audit payload checkpoint: DIALOGUE_ACT_CLASSIFIED
JSON
{
"_meta": {
"stage": "DIALOGUE_ACT_CLASSIFIED"
},
"userText": "How do I transfer my electricity connection?",
"dialogueAct": "QUESTION",
"dialogueActConfidence": 0.7,
"dialogueActSource": "REGEX"
}
Audit payload checkpoint: INTERACTION_POLICY_DECIDED
JSON
{
"_meta": {
"stage": "INTERACTION_POLICY_DECIDED"
},
"dialogueAct": "QUESTION",
"policyDecision": "RECLASSIFY_INTENT",
"skipIntentResolution": false,
"hasPendingAction": false,
"hasPendingSlot": false
}
Example 2: CONNECTION_TRANSFER (multi-turn + confirmation + pending action)
- Chat Transcript
- Per-turn Step Trace
- Required ce_* Rows
- Audit + Payload Postmortem
Connection transfer conversation
Turn T1 (initial request)
| Step | Key output | Notes |
|---|---|---|
| IntentResolutionStep | intent=CONNECTION_TRANSFER | Classifier picks transfer intent |
| SchemaExtractionStep | missing fields computed | Required slots are incomplete |
| RulesStep | state -> COLLECT_INPUTS | Bootstrap collection state |
| ResponseResolutionStep | ask for required fields | Prompt user for missing slots |
Turn T2 (slot fill)
| Step | Key output | Notes |
|---|---|---|
| SchemaExtractionStep | customerId/phone/email/sourceCity/targetCity extracted | Schema complete |
| RulesStep | COLLECT_INPUTS -> AWAITING_CONFIRMATION | User must confirm execution |
| ResponseResolutionStep | confirmation prompt |
Turn T3 (affirm)
| Order | Step | Key output | Why it matters |
|---|---|---|---|
| 1 | DialogueActStep | AFFIRM | Converts 'yes please' into execution signal |
| 2 | InteractionPolicyStep | EXECUTE_PENDING_ACTION | Policy routes to pending action |
| 3 | ActionLifecycleStep | OPEN -> IN_PROGRESS | Runtime status tracked in context |
| 4 | DisambiguationStep | not required | Single eligible action |
| 5 | GuardrailStep | ALLOW | No sensitive/approval block |
| 6 | PendingActionStep | EXECUTED | Task bean/method invoked from ce_pending_action |
| 7 | RulesStep | AWAITING_CONFIRMATION -> COMPLETED | Final state transition |
| 8 | ResponseResolutionStep | success response | User receives completion |
Control-plane requirements
| Table | Must have | Consumed by |
|---|---|---|
| ce_intent | CONNECTION_TRANSFER | IntentResolutionStep |
| ce_intent_classifier | transfer/move regex | IntentResolutionStep |
| ce_output_schema | required slots for transfer | SchemaExtractionStep |
| ce_rule | state bootstrap + completeness + completion rules | RulesStep |
| ce_pending_action | action_key + bean_name + method_names | ActionLifecycleStep/PendingActionStep |
| ce_response | COLLECT_INPUTS, AWAITING_CONFIRMATION, COMPLETED responses | ResponseResolutionStep |
| ce_config | dialogue/prompt keys | DialogueActStep/Schema steps |
| ce_policy | optional policy blocks | PolicyEnforcementStep |
Seed snippet: pending action + rules
SQL
INSERT INTO ce_pending_action
(intent_code, state_code, action_key, bean_name, method_names, priority, enabled, description)
VALUES
('CONNECTION_TRANSFER', 'AWAITING_CONFIRMATION', 'FINALIZE_CONNECTION_TRANSFER',
'faqRuleTask', 'injectContainerData', 1, true,
'Demo finalize action for connection transfer');
INSERT INTO ce_rule (phase, intent_code, state_code, rule_type, match_pattern, "action", action_value, priority, enabled)
VALUES
('PRE_RESPONSE_RESOLUTION', 'CONNECTION_TRANSFER', 'IDLE', 'REGEX', '.*', 'SET_STATE', 'COLLECT_INPUTS', 10, true),
('PRE_RESPONSE_RESOLUTION', 'CONNECTION_TRANSFER', 'COLLECT_INPUTS', 'JSON_PATH',
'$[?(@.state == ''COLLECT_INPUTS'' && @.customerId && @.phone && @.email && @.sourceCity && @.targetCity)]',
'SET_STATE', 'AWAITING_CONFIRMATION', 100, true),
('PRE_RESPONSE_RESOLUTION', 'CONNECTION_TRANSFER', 'AWAITING_CONFIRMATION', 'JSON_PATH',
'$[?(@.state == ''AWAITING_CONFIRMATION'' && (@.pending_action_result == ''EXECUTED'' || @.inputParams.pending_action_result == ''EXECUTED''))]',
'SET_STATE', 'COMPLETED', 200, true);
Confirmation turn audit chain (must appear in order)
| Order | Stage | Payload keys to verify |
|---|---|---|
| 1 | DIALOGUE_ACT_CLASSIFIED | dialogueAct=AFFIRM, confidence, source |
| 2 | INTERACTION_POLICY_DECIDED | policyDecision=EXECUTE_PENDING_ACTION |
| 3 | PENDING_ACTION_LIFECYCLE | status=IN_PROGRESS |
| 4 | GUARDRAIL_ALLOW | result=ALLOW |
| 5 | PENDING_ACTION_EXECUTED | pendingActionResult=EXECUTED |
| 6 | RULE_APPLIED | state transition to COMPLETED |
| 7 | ASSISTANT_OUTPUT | final completion response |
| 8 | MEMORY_UPDATED | summary updated |
Audit payload checkpoint: PENDING_ACTION_EXECUTED
JSON
{
"_meta": {
"stage": "PENDING_ACTION_EXECUTED"
},
"policyDecision": "EXECUTE_PENDING_ACTION",
"pendingActionRef": "faqRuleTask:injectContainerData",
"pendingActionResult": "EXECUTED",
"intent": "CONNECTION_TRANSFER",
"state": "AWAITING_CONFIRMATION"
}
Audit payload checkpoint: RULE_APPLIED after execution
JSON
{
"_meta": {
"stage": "RULE_APPLIED"
},
"rulePhase": "PRE_RESPONSE_RESOLUTION",
"intent": "CONNECTION_TRANSFER",
"ruleStateCode": "AWAITING_CONFIRMATION",
"action": "SET_STATE",
"actionValue": "COMPLETED"
}
Fast failure triage
If user says "yes" but flow loops back to confirmation, check in order:
DIALOGUE_ACT_CLASSIFIEDmust beAFFIRMINTERACTION_POLICY_DECIDEDmust beEXECUTE_PENDING_ACTIONPENDING_ACTION_EXECUTEDmust existRULE_APPLIEDmust transition state fromAWAITING_CONFIRMATIONto terminal state.
Example 3: ORDER_CANCELLATION (multi-turn with interaction policy)
- Chat Transcript
- Per-turn Step Trace
- Required ce_* Rows
- Audit + Payload Postmortem
Protected Order Cancellation
Action Policy Trace
| Turn | Pipeline Step | Internal Engine Action |
|---|---|---|
| Turn 1 | SchemaExtractionStep | Detects `CANCEL_ORDER`. Fails to extract `orderNumber`. State remains `IDLE`. |
| Turn 1 | ResponseResolutionStep | Outputs IDLE message asking for order number. |
| Turn 2 | SchemaExtractionStep | Engine extracts `orderNumber: 48392`. Flags `schemaComplete=true`. |
| Turn 2 | RulesStep | Auto-advance rule fires, transitioning state to `CONFIRM_CANCEL`. |
| Turn 2 | ActionLifecycleStep | Stages `stripeCancelTask` into `pending_action_runtime` context with `OPEN` status. |
| Turn 2 | ResponseResolutionStep | Generates derived string parsing the memory context `orderNumber`. |
| Turn 3 | DialogueActStep | User says 'Yes'. Act classifier marks input as `AFFIRM`. |
| Turn 3 | InteractionPolicyStep | Matrix outputs `EXECUTE_PENDING_ACTION`. Locks classifier logic. |
| Turn 3 | GuardrailStep | Checks patterns for malicious prompt. Trace output: `GUARDRAIL_ALLOW`. |
| Turn 3 | PendingActionStep | Execution triggered. External API drops order. Status updated to `EXECUTED`. |
| Turn 3 | RulesStep | Rule sees `EXECUTED` task status and triggers state transition to `CANCELLED`. |
| Turn 3 | ResponseResolutionStep | Resolves final derived string using historical `orderNumber`. |
Dynamic Slot & Task DML
SQL
INSERT INTO ce_intent (intent_code, enabled) VALUES ('CANCEL_ORDER', true);
INSERT INTO ce_output_schema (intent_code, format_type, schema_json, enabled)
VALUES ('CANCEL_ORDER', 'JSON', '{"type":"object","properties":{"orderNumber":{"type":"string"}},"required":["orderNumber"]}', true);
INSERT INTO ce_prompt_template (intent_code, response_type, system_prompt, enabled)
VALUES ('CANCEL_ORDER', 'SCHEMA_COLLECTION', 'Extract JSON schema fields.', true);
INSERT INTO ce_rule (intent_code, state_code, rule_type, rule_value, action, action_value, phase, priority, enabled)
VALUES ('CANCEL_ORDER', 'IDLE', 'JSON_PATH', '$[?(@.context.orderNumber != null && @.context.orderNumber != '''')]', 'SET_STATE', 'CONFIRM_CANCEL', 'PRE_RESPONSE_RESOLUTION', 10, true);
INSERT INTO ce_response (intent_code, state_code, response_type, exact_text, enabled)
VALUES ('CANCEL_ORDER', 'IDLE', 'EXACT', 'I can help you cancel your order. What is your order number?', true);
INSERT INTO ce_prompt_template (intent_code, response_type, system_prompt, user_prompt, template_id, enabled)
VALUES ('CANCEL_ORDER', 'DERIVED', 'Format order number cleanly.', 'Are you sure you want to cancel order {{context.orderNumber}}? This action is irreversible.', 'tmpl_confirm_cancel', true);
INSERT INTO ce_response (intent_code, state_code, response_type, template_id, enabled)
VALUES ('CANCEL_ORDER', 'CONFIRM_CANCEL', 'DERIVED', 'tmpl_confirm_cancel', true);
INSERT INTO ce_pending_action (intent_code, state_code, action_key, bean_name, method_names, priority, enabled, description)
VALUES ('CANCEL_ORDER', 'CONFIRM_CANCEL', 'stripe_cancel', 'stripeCancelTask', 'execute', 10, true, 'Cancel the order in the provider system');
INSERT INTO ce_rule (intent_code, state_code, rule_type, rule_value, action, action_value, phase, priority, enabled)
VALUES ('CANCEL_ORDER', 'CONFIRM_CANCEL', 'EXACT', 'ANY', 'SET_STATE', 'CANCELLED', 'PRE_RESPONSE_RESOLUTION', 20, true);
INSERT INTO ce_prompt_template (intent_code, response_type, system_prompt, user_prompt, template_id, enabled)
VALUES ('CANCEL_ORDER', 'DERIVED', 'Format cleanly.', 'Order {{context.orderNumber}} has been completely cancelled.', 'tmpl_cancelled', true);
INSERT INTO ce_response (intent_code, state_code, response_type, template_id, enabled)
VALUES ('CANCEL_ORDER', 'CANCELLED', 'DERIVED', 'tmpl_cancelled', true);
Confirmation turn audit chain
| Order | Stage | Must contain |
|---|---|---|
| 1 | DIALOGUE_ACT_CLASSIFIED | dialogueAct=AFFIRM |
| 2 | INTERACTION_POLICY_DECIDED | policyDecision=EXECUTE_PENDING_ACTION |
| 3 | GUARDRAIL_ALLOW | result=ALLOW |
| 4 | PENDING_ACTION_EXECUTED | pendingActionResult=EXECUTED |
| 5 | RULE_APPLIED | state transition to CANCELLED |
| 6 | ASSISTANT_OUTPUT | final response |
Audit payload checkpoint: PENDING_ACTION_EXECUTED
JSON
{
"_meta": {
"stage": "PENDING_ACTION_EXECUTED"
},
"policyDecision": "EXECUTE_PENDING_ACTION",
"pendingActionRef": "stripeCancelTask",
"pendingActionResult": "EXECUTED",
"intent": "CANCEL_ORDER",
"state": "CONFIRM_CANCEL"
}
Example 4: INVENTORY_LOOKUP (Tool Orchestration)
- Chat Transcript
- Per-turn Step Trace
- Required ce_* Rows
- Audit + Payload Postmortem
DB Orchestration Flow
Tool Dispatch Trace
| Pipeline Step | Internal Engine Action |
|---|---|
| IntentResolutionStep | Detects `DATABASE_QUERY` intent. State=`IDLE`. |
| ToolOrchestrationStep | Identifies `INVENTORY_DB` mapping. Routes payload to connected Java component adapting `McpToolExecutor`. |
| Tool Execution (Java Adapter) | Adapter processes input, runs `SELECT count FROM inventory`. Returns JSON payload `{'count': 421}`. |
| ToolOrchestrationStep | Writes returned JSON into engine session variable `tool_result.dbList`. Traces `TOOL_ORCHESTRATION_RESULT`. |
| RulesStep | Evaluates optional `POST_TOOL_EXECUTION` rules. |
| ResponseResolutionStep | Injects the `421` count into the derived template context and calls LLM. |
Tool Orchestration DML
SQL
INSERT INTO ce_intent (intent_code, enabled) VALUES ('DATABASE_QUERY', true);
INSERT INTO ce_mcp_tool (intent_code, tool_group, required_params_json, execution_timeout_ms, enabled)
VALUES ('DATABASE_QUERY', 'INVENTORY_DB', '["itemType", "warehouseId"]', 5000, true);
INSERT INTO ce_prompt_template (intent_code, response_type, system_prompt, user_prompt, template_id, enabled)
VALUES ('DATABASE_QUERY', 'DERIVED', 'You are an inventory assistant.', 'Answer from these database results: {{tool_result.dbList}}', 'tmpl_inventory_gen', true);
INSERT INTO ce_response (intent_code, state_code, response_type, template_id, priority, enabled)
VALUES ('DATABASE_QUERY', 'IDLE', 'DERIVED', 'tmpl_inventory_gen', 10, true);
Tool Orchestration Checkpoints
| Order | Stage | Payload details |
|---|---|---|
| 1 | TOOL_ORCHESTRATION_DISPATCH | toolGroup=INVENTORY_DB, toolParams |
| 2 | TOOL_ORCHESTRATION_RESULT | toolResult={'count': 421}, executionMs |
| 3 | ASSISTANT_OUTPUT | final response interpolation |
Example 5: SUPPORT_DIAGNOSTIC (Memory Summarization)
- Chat Transcript
- Per-turn Step Trace
- Required Configuration
- Audit + Payload Postmortem
Long Context Support Thread
Memory Compression Trace (Turn 15)
| Pipeline Step | Internal Engine Action |
|---|---|
| MemoryStep (Background) | Fetches raw history and asks LLM to re-summarize it into a tight timeline snapshot. Persists to `ce_memory`. |
| DialogueActStep | User asks 'what link did you tell me to use?'. Abstracted act=`QUESTION`. |
| MemoryStep (Injection) | Injects the compressed `memory.session_summary` variable directly into current Turn 15 context. |
| IntentResolutionStep | Resolves exact `SUPPORT_DIAGNOSTIC` intent leveraging memory context. |
| ResponseResolutionStep | Template retrieves the exact `http://router.local` string generated 10 turns ago. |
Memory Auto-Summarization Config
YAML
convengine:
flow:
memory:
enabled: true
# Max token size for the compressed summary string
summary-max-chars: 1200
# Number of turns to trigger a new summary compression cycle
recent-turns-for-summary: 3
Memory Checkpoints
| Order | Stage | Payload details |
|---|---|---|
| 1 | MEMORY_EVALUATED | evaluatedTurns, previousSummaryLen |
| 2 | MEMORY_UPDATED | newSummary generated and injected |
| 3 | INTENT_RESOLVED | context aware resolution |