Data Model
ConvEngine is configuration-driven. Behavior is defined in the following tables.
Configuration Tables
Core Tables
| Table | Purpose | Key Columns |
|---|---|---|
| ce_intent | Defines business intents | intent_code, description, enabled |
| ce_intent_classifier | Regex patterns for intents | match_pattern, priority |
| ce_rule | Logic & State Transitions | phase, state_code, rule_type, action, match_pattern |
| ce_response | Output mapping | response_type, output_format, exact_text |
| ce_output_schema | Data extraction definition | json_schema, priority |
| ce_prompt_template | LLM Prompts | system_prompt, user_prompt |
Runtime Tables
Runtime Persistence
| Table | Purpose |
|---|---|
| ce_conversation | Current state of active conversations |
| ce_audit | Append-only log of every step execution |
| ce_conversation_history | Normalized 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");