Skip to main content
v2

New Consumer Onboarding

This document provides the standard onboarding path for teams integrating ConvEngine into their application.

Start with the right baseline

Day-0 decisions

DecisionWhy it mattersRecommended default
Java baselineConvEngine compiles against Java 21.Standardize on Java 21 in all environments.
Conversation concurrencyThe framework does not enforce optimistic locking for `ce_conversation`.Allow only one active turn per `conversationId`.
TransportStreaming is optional but changes operational setup.Start with SSE only; enable STOMP later if you truly need it.
Prompt contract disciplineCurrent v2 uses prompts for both text generation and turn behavior metadata.Treat `ce_prompt_template` as a runtime contract.
MCP adoptionThe current MCP model is powerful, but adds scale.Start with one narrow intent-scoped tool flow before scaling out.
1

Add the framework dependency

Use the current framework version from the repo: convengine:2.0.12

<dependency>
<groupId>com.github.salilvnair</groupId>
<artifactId>convengine</artifactId>
<version>2.0.12</version>
</dependency>
2

Enable the framework in your Spring Boot app

The minimal production-friendly baseline requires enabling the core engine, cache, and async features. You still need to provide one production-grade LlmClient bean and your own database connection details.

@SpringBootApplication
@EnableConvEngine(stream = true)
@EnableConvEngineCaching
@EnableConvEngineAsyncConversation
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
3

Apply Schema and Seed Configuration (DDL/DML)

Before you test any conversation flow, create the ce_* tables and seed the control plane configurations. We provide snippets here representing the foundational ce_config as well as data examples referenced in the REST API examples.

-- Example subset of standard configuration properties
INSERT INTO ce_config(config_id, config_type, config_key, config_value, enabled) VALUES
(1, 'AgentIntentResolver', 'MIN_CONFIDENCE', '0.55', true),
(2, 'AgentIntentResolver', 'COLLISION_GAP_THRESHOLD', '0.2', true),
(8, 'McpPlanner', 'SYSTEM_PROMPT', 'You are an MCP planning agent inside ConvEngine...', true),
(11, 'DialogueActStep', 'SYSTEM_PROMPT', 'You are a dialogue-act classifier...', true),
(17, 'DialogueActStep', 'REGEX_AFFIRM', '^(\\s)*(yes|yep|yeah|ok|okay|sure|go ahead)(\\s)*$', true);
4

Establish Core application.yml Baseline

Establish your runtime defaults. Use application.yml for system properties. A full breakdown of these fields is available in the Configuration component reference.

convengine:
flow:
dialogue-act:
resolute: REGEX_THEN_LLM
llm-threshold: 0.90
conversation-history:
max-turns: 20
interaction-policy:
execute-pending-on-affirm: true
reject-pending-on-negate: true
fill-pending-slot-on-non-new-request: true
transport:
sse:
enabled: true # Standard recommendation
stomp:
enabled: false # Switch to true only if websocket needed
audit:
enabled: true # Mandatory for ce_verbose & tracing
persist-meta: true
persistence:
mode: IMMEDIATE
mcp:
guardrail:
enabled: false
5

Configure Semantic Layer (If applicable)

If utilizing the Semantic Query module, provision the semantic model DB tables (ce_semantic_*) using your semantic SQL bootstrap scripts (for example, semantic_layer_yml_ddl.sql + semantic_layer_yml_dml.sql). This abstracts specific physical model knowledge from generic engine functionality. See Configuration for specifics.

semantic-query:
enabled: true
schema:
# Model physical connections
relationships:
- name: "Request to Action Log"
fromTable: "zp_disco_request"
fromColumn: "request_id"
toTable: "zp_disco_trans_data"
toColumn: "request_id"
entities:
- name: "DisconnectRequest"
primaryTable: "zp_disco_request"
synonyms: ["disco", "cancellation", "shut off"]
fields:
- name: "request_id"
type: "STRING"
physicalColumn: "request_id"
- name: "status"
type: "INTEGER"
physicalColumn: "status"
# Dictates strict known outcomes to constrain the AST planner
valueDefinitions:
- label: "completed"
value: "835"
- label: "cancelled"
value: "120"
intentRules:
- intent: "SEMANTIC_QUERY"
requiredFields: ["status"]
Troubleshooting Semantic Queries

If a query does not work as expected, verify:

  • Missing or Invalid Filters: Check ce_semantic_entity to ensure synonyms align with the user request vocabulary.
  • Failures Memory Cache: Inspect physical table ce_semantic_query_failures. The semantic engine stores failure embeddings here and consults them for subsequent queries to prevent repeated failing logic paths. Use the Cache APIs to refresh query-failures.
6

Seed one complete vertical slice first

Do not try to model your entire product on day one. Build one narrow, fully testable path:

  • one intent
  • one or two states
  • one response path
  • one optional schema
  • zero or one tool

That first slice should prove that intent resolves correctly, state transitions are deterministic, a final response always exists, and audit/trace output is understandable. Utilize ce_verbose to provide observable progress.

7

Treat prompt templates as behavior contracts

ce_prompt_template is no longer just prompt text. In 2.0.9+, prompt rows also document how a state is expected to behave.

Relevant metadata includes interaction_mode and interaction_contract.

Recommended contract patterns:

  • collection state: interaction_mode=COLLECT, interaction_contract={"expects":["structured_input"]}
  • confirmation state: interaction_mode=CONFIRM, interaction_contract={"allows":["affirm","edit","reset"]}
  • final state: interaction_mode=FINAL

This is what allows CorrectionStep to safely do in-place confirm/edit/retry routing.

Validate with a pre-production checklist

Minimum readiness checklist

AreaMust prove before rolloutCommon failure if skipped
Single-turn pathOne happy-path intent works end-to-end from `/message` to final payload.Basic config is incomplete or inconsistent.
Multi-turn slot collectionMissing fields converge cleanly and stop asking once complete.Infinite or unstable clarification loops.
Confirmation / correction routing`AFFIRM`, `EDIT`, and `retry` do what the active prompt contract says.Unexpected reclassification or incorrect continuation.
State coverageEvery reachable state has a valid response strategy.Fallback or misleading output in production.
Concurrency guardParallel same-ID requests do not corrupt state.Last-write-wins drift.
Trace usabilityYour team can read audit + trace and explain a bad turn quickly.Slow incident resolution.
Best first milestone

The right first milestone is not "all features enabled." It is one narrow, testable, traceable business flow that your team can explain end-to-end from input to persisted state to final response.