Skip to main content
v1

Data Model

ConvEngine is configuration-driven. Behavior is defined in the following tables.

Configuration Tables

Core Tables

TablePurposeKey Columns
ce_intentDefines business intentsintent_code, description, enabled
ce_intent_classifierRegex patterns for intentsmatch_pattern, priority
ce_ruleLogic & State Transitionsphase, state_code, rule_type, action, match_pattern
ce_responseOutput mappingresponse_type, output_format, exact_text
ce_output_schemaData extraction definitionjson_schema, priority
ce_prompt_templateLLM Promptssystem_prompt, user_prompt

Runtime Tables

Runtime Persistence

TablePurpose
ce_conversationCurrent state of active conversations
ce_auditAppend-only log of every step execution
ce_conversation_historyNormalized user/AI turn history used for prompt history reconstruction

Session API

When writing Java extensions (Interceptors, Transformers), you interact with EngineSession.

EngineSession.java (key methods)
package: com.github.salilvnair.convengine.engine.sessionfile: src/main/java/com/github/salilvnair/convengine/engine/session/EngineSession.java
JAVA
// State Management
void setIntent(String intent);
void setState(String state);

// Extras/Input params used by steps, prompts and rules
Map<String, Object> getInputParams();
void putInputParam(String key, Object value);

// Persisted Entity
CeConversation getConversation();

// Flow Control
void setFinalResult(EngineResult result); // Stop pipeline immediately

Common Operations

Setting a Task (SET_TASK action)

Tasks are triggered through rule action resolution, not by writing arbitrary task keys in context. Configure ce_rule.action=SET_TASK and map action_value to a Spring task bean method.

SET_TASK rule row
package: consumer DB
SQL
INSERT INTO ce_rule
(phase, intent_code, state_code, rule_type, match_pattern, action, action_value, priority, enabled, description)
VALUES
('PIPELINE_RULES', 'REQUEST_TRACKER', 'ANY', 'REGEX', '(?i).*track.*request.*', 'SET_TASK', 'requestTrackerTask:loadStatus', 10, true,
'Invoke consumer task bean during rule execution');
Consumer task bean method
package: consumer logic
JAVA
@Component("requestTrackerTask")
public class RequestTrackerTask implements CeRuleTask {
public void loadStatus(EngineSession session, CeRule rule) {
// Populate context/input params for downstream response
session.putInputParam("requestStatus", "IN_REVIEW");
}
}

Getting Extracted Data

Access data extracted by the Schema Extraction step.

Read extracted value
package: consumer logic
JAVA
String accountId = (String) session.getInputParams().get("accountId");