EgoXDocs
Getting Started

Core Concepts

The /ask flow, request intents, and the Console↔backend vocabulary.

A single mental model explains most of EgoX: one request lifecycle, four intents, and one vocabulary that maps Console terms to backend terms.

The /ask flow

Every call to POST /egox/ask runs the same lifecycle:

  1. Authenticate & resolve tenant — nothing touches data before EgoX knows whose data path it's on.
  2. Load tenant context — config, enabled tools, knowledge scope, prompt overrides.
  3. Load conversation state — prior messages from the thread, if any.
  4. Classify intent — vanilla / RAG / tools / RAG+tools. Cheap and deterministic; expensive LLM work only happens when the intent justifies it.
  5. Assemble context — history + retrieved chunks + tool catalog, as the intent requires.
  6. Call the LLM with the right system prompt for that intent.
  7. Execute tool calls if requested, with storm protection (dedup, per-tool cap, error classification, transient retry, iteration cap).
  8. Persist the turn — message, token usage, intent, audit flags.
  9. Return — the answer plus metadata the caller can act on.

Intents

EgoX classifies each request into exactly one intent, which selects the system prompt and how much context to assemble:

IntentThe request is…Prompt tab in Console
vanillaplain conversationBase
raggrounded in retrieved knowledgeRAG
toolscalling an external APITool
rag_toolsbothRAG+Tool

The chosen intent comes back on the response as intent, so callers (and the Console's thread auditing) can see how each turn was handled.

The intent selects the system prompt; the project's Personality gives that prompt its voice. Same model, same intent — a different Ego makes it sound like your product.

Vocabulary

The Console speaks product language; the backend speaks domain language:

Console (user-facing)Backend (domain)What it represents
ProjectTenantIsolation unit; owns everything below it
AI ConfigurationTenant ConfigModel, temperature, response format
EndpointsToolsExternal APIs the LLM can call
Knowledge BaseRAG Documents / ChunksEmbedded content the LLM retrieves
ThreadsThreads + MessagesTurn history for one user session

Renaming a Console label is cosmetic; renaming a backend domain term is a migration. Both names are correct — they just live on different sides of the product.

Response envelope

All HTTP responses use one envelope. Programmatic callers branch on the error code (a closed enum), not the message.

// success
{ "status": "OK", "data": { /* ... */ } }

// error
{ "status": "KO", "error": { "code": "ERROR_CODE", "message": "human readable" } }

On this page