Retrieve context
Retrieve identity-conditioned context for a query.
path and degraded say which engine served the call, and degraded is also true when the brain answered from a knowledge graph that has changed since it was trained (degradationReason is then brain_stale). The response carries ranked sources, any detected contradictions, a cognition block (brain path only) and a usage block.
Data is scoped to the effective subject: the API key owner by default, or the subject named by the X-Exo-Subject header. Set stream to true to receive the same result as a text/event-stream carrying sources, contradictions, cognition and done events.
Authorization
This route requires theread scope.
A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.
Headers
These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.Success responses
Errors
application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.
Notes
cognitionis null on the hybrid path. The block is the brain’s reasoning trace, and the vector plus keyword fallback has no reasoning state to report. Readpathbefore you readcognition.degradedcan be true on the brain path. It means the brain answered from a knowledge graph that has changed since it trained, anddegradationReasonis thenbrain_stale. The other two reasons,no_brainandcold_start, only ever appear withpath: "hybrid".- The
contradictionsentries here are not theContradictionobject.GET /v1/contradictionsreturns the named schema withid,a,b,statusanddetectedAt. This route returns the retrieval-time shape instead:kind,subkind,nodeIdasnode_id,marker,before,after,tension,in_active_subgraphandsnippet, plusfrom_conceptandto_concepton a reversal. The schema types the field as a free-form object for exactly this reason. Treat it as advisory and read the contradictions resource when you need the stable object. - Streaming changes the content type, not the content. With
stream: truethe same result arrives astext/event-streamin event ordersources,contradictions,cognition,done. expandaccepts one relation in v1.sources.contentreplaces the 280-charactersnippetpreview with the full stored chunk text. Any other value is 422invalid_expand.
Authorizations
An Exo API key (exo_...) sent as the X-Exo-API-Key header.
Query Parameters
Comma-separated relations to expand beyond the lean default. Valid values: sources.content (the full stored text of each source, beyond the 280-character snippet).
Body
A context-retrieval request. Field names accept camelCase or snake_case.
1 - 10000Comma-separated relations to expand beyond the lean default. Valid values: sources.content (the full stored text of each source, beyond the 280-character snippet).
user, org 1 <= x <= 50Response
Ranked sources plus the contradiction, cognition and usage blocks.
Retrieved context for a query.
path names the engine that served the call ("brain" when the org's
trained ExoBrain answered, "hybrid" on the vector plus keyword fallback).
degraded is true on the fallback path, and also on the brain path when
the brain is serving a knowledge graph that has changed since it trained;
degradationReason says why ("no_brain", "brain_stale" or "cold_start").
cognition is present only on the brain path.
brain, hybrid Additive per-call usage counters (spec D13).
MCP / exo-cli / plugin / dashboard read only sources, contradictions and cognition, so this extra object never breaks an existing consumer.
readUnits: number of sources returned (the billable read unit).embedTokens: DOCUMENTED ESTIMATE of Voyage embed tokens for the query at ~3.5 chars/token (the same tokenizer-free proxy the Voyage client uses internally). The embedder'sembed()return does not surfaceusage.total_tokens, so this is an estimate, not the metered figure.brainInference: True when the ExoBrain served the query, False on the hybrid pgvector+BM25 fallback path.
How Exo reasoned about a query, not just what it retrieved.
Present on a retrieval only when the org's trained ExoBrain served the call;
it is null on the hybrid vector plus keyword fallback, which has no reasoning
state to report. focalNodeIds are the knowledge-graph nodes the brain
settled on as the centre of the answer, confidence is how strongly it
settled, and useSystem2 is true when the brain judged the question hard
enough to warrant slow deliberate reasoning instead of a fast associative
lookup. driftRate reports how far the activated region has moved from
what the brain trained on, which is the early warning that the graph has
outgrown the brain.
The block is versioned additively: a future reasoning tier may report extra fields, so treat unknown keys as forward compatible rather than an error.