Data Model
ConvEngine relies entirely on configuration over code. State, relationships, and execution boundaries are encoded in the schema.
Control-plane tables
ce_configce_container_configce_intentce_intent_classifierce_output_schemace_prompt_templatece_responsece_rulece_policyce_mcp_toolce_mcp_db_toolce_mcp_plannerce_pending_actionce_verbose
Runtime tables
ce_conversationce_auditce_conversation_historyce_llm_call_log
ce_conversation_history
Introduced to store chronological multi-turn array states strictly decoupled from internal ce_audit tracking.
Key columns:
history_idconversation_iduser_inputassistant_outputcreated_atmodified_at
ce_pending_action
Introduced for confirm-before-run logic and unambiguous multi-action resolution.
Purpose:
- declarative catalog for executable pending actions by intent/state/action key
Key columns:
pending_action_idintent_codestate_codeaction_keybean_namemethod_namespriorityenableddescriptioncreated_at
Lookup index:
(enabled, action_key, intent_code, state_code, priority)
Important:
- runtime status (
OPEN/IN_PROGRESS/EXECUTED/REJECTED/EXPIRED) is not stored in this table - runtime status is stored in
context.pending_action_runtime
ce_verbose
Introduced in 2.0.8 for deterministic runtime progress/error messages emitted by the Java pipeline. In 2.0.9, the same resolver path can also be triggered from consumer code through ConvEngineVerboseAdapter.
Purpose:
- declarative message mapping by runtime context (intent/state/step/determinant/rule/tool)
Key columns:
verbose_idintent_codestate_codestep_match(EXACT|REGEX|JSON_PATH)step_valuedeterminantrule_id(optional)tool_code(optional)messageerror_messagepriorityenabledcreated_at
Lookup index:
(enabled, intent_code, state_code, determinant, step_match, step_value, rule_id, tool_code, priority)
ce_prompt_template
ce_prompt_template is used for both schema extraction prompts and derived response generation.
Key columns:
template_idintent_codestate_coderesponse_typesystem_promptuser_prompttemperatureinteraction_modeinteraction_contractenabledcreated_at
Runtime notes:
- prompts are rendered through the shared
ThymeleafTemplateRenderer - legacy
{{...}}placeholders still work, but Thymeleaf expressions are the native path - common runtime vars include
user_input,resolved_user_input,standalone_query,intent,state,context, andinputParams - see Thymeleaf and SpEL for expression examples across prompts and
ce_verbose
interaction_mode is the coarse semantic contract for the turn. Supported values:
NORMALIDLECOLLECTCONFIRMPROCESSINGFINALERRORDISAMBIGUATEFOLLOW_UPPENDING_ACTIONREVIEW
interaction_contract is extensible JSON text for concrete capabilities and expectations. Recommended shape:
{"allows":["affirm","edit","retry","reset"],"expects":["structured_input"]}
Current conventions:
allows: turn capabilities such asaffirm,edit,retry,resetexpects: input expectations such asstructured_input
Design note:
- prefer extending
interaction_contractarrays for new capabilities instead of adding new columns - use
interaction_modefor broad semantics andinteraction_contractfor fine-grained runtime behavior
Rule phase compatibility
ce_rule.phase includes phases:
POST_DIALOGUE_ACTPRE_RESPONSE_RESOLUTIONPOST_AGENT_INTENTPOST_SCHEMA_EXTRACTIONPRE_AGENT_MCPPOST_AGENT_MCPPOST_TOOL_EXECUTION
Rule action compatibility
ce_rule.action includes:
SET_INTENTSET_STATESET_DIALOGUE_ACTSET_JSONGET_CONTEXTGET_SCHEMA_JSONGET_SESSIONSET_TASKSET_INPUT_PARAM
SET_INPUT_PARAM is the lightweight runtime-flag action. Use it for values like:
awaiting_confirmation=trueconfirmation_key=LOAN_APPLICATION_CONFIRMskip_schema_extraction=truerouting_decision=PROCEED_CONFIRMED
SET_DIALOGUE_ACT is the lightweight post-classification override action. Use it when a POST_DIALOGUE_ACT rule should replace the final dialogue_act with a more appropriate normalized value (for example promoting a guarded NEW_REQUEST back to EDIT).
Tool-group compatibility
ce_mcp_tool.tool_group normalizes to:
DBHTTP_APIWORKFLOW_ACTIONDOCUMENT_RETRIEVALCALCULATOR_TRANSFORMNOTIFICATIONFILES
MCP tool scope columns
ce_mcp_tool also supports optional scope columns:
intent_code(nullable)state_code(nullable)
Behavior:
- if both are
NULL, the tool is globally eligible - if set, tool eligibility is constrained to matching runtime
session.intentandsession.state - non-matching scoped tools are skipped from MCP planning/execution
MCP planner scope columns
ce_mcp_planner supports scoped planner prompts:
intent_code(nullable)state_code(nullable)system_promptuser_promptenabled
Behavior:
- exact intent/state row wins
- intent-only row is next
- global default row (
NULL/NULL) is fallback - if not found, planner uses legacy
ce_configprompts