Skip to content

Message flow

This page traces a single visitor message from the widget or API through Chatevo’s three-brain pipeline to a streamed reply.

Visitor message (widget or API)
→ Auth + rate limits + deployment lookup
→ Intent Analyzer
→ Query Strategist (RAG / tools / hybrid / direct)
→ Response Synthesizer
→ Stream reply (+ citations, rich cards)
  1. The embeddable widget (widget.chatevo.ai/chat.js) or your Direct API client sends the message to api.chatevo.ai.
  2. Chatevo validates the deployment, domain allowlist (widget), and plan quotas.
  3. Conversation history loads from PostgreSQL for multi-turn context.

See Widget messages API and Deployments overview.

The Intent Analyzer reads the latest message plus recent history and assigns intent — for example knowledge lookup, tool action, greeting, or handoff. On Starter+ plans, smart query understanding runs here. Free plans skip routing and always attempt RAG when knowledge bases are attached.

See Smart query understanding.

Based on intent, the Query Strategist picks an execution path:

PathWhen used
RAGAnswer should come from attached knowledge bases
ToolsLive data from API Request or MCP tools
HybridCombine retrieved docs with a tool call (Standard+ full routing)
DirectSmall talk or questions answerable without retrieval

For RAG, the strategist may rewrite the query (full tier on Standard+) before hybrid search runs in Qdrant. For tools, it selects the tool and fills parameters from the conversation.

See Document retrieval architecture and Tools overview.

The synthesizer receives:

  • Your assistant master prompt
  • Top retrieved chunks (with citation metadata)
  • Tool JSON responses (if any)
  • Model and RAG settings

It drafts the answer, cites sources where applicable, and attaches rich content only from verified tool payloads — never invented product data.

With stream: true, the widget receives SSE events as the pipeline progresses:

EventMeaning
step_messageProgress text (“Searching knowledge base…”)
tool_call / tool_resultTool execution lifecycle
doneFinal message with optional rich_content
errorFailure details

See Widget SSE events.

If retrieval returns no chunks above the similarity threshold, or a tool call fails, the synthesizer follows your master prompt — typically acknowledging the gap and offering escalation rather than guessing.