Context recall
GET /v1/brain/context fuses search hits, entity facts, and timeline events into one prompt-ready contextMd block - with mode selection and the weakEvidence abstention flag.
GET /v1/brain/context is the primary read: one call that fuses search hits, entity facts, and timeline events into a single prompt-ready contextMd block. The brain does no answer generation - your model composes the answer from the returned memory.
curl 'https://brain.unisonlabs.ai/v1/brain/context?q=auth%20decisions&mode=auto&k=10' \
-H "Authorization: Bearer $UNISON_TOKEN"Parameters
| Param | Values | Notes |
|---|---|---|
q | string | required |
mode | auto / deep / standard | default auto |
k | 1-50 | result count, default 10 |
maxEntities | 0-10 | entities to expand with facts + timeline, default 3 |
pathPrefix | brain path | scope recall to a subtree, e.g. /workspace/teams/platform/ |
includeBodies | boolean | inline clipped document bodies - for single-shot readers that won't make follow-up doc calls |
Response
{
"query": "auth decisions",
"mode": "auto",
"generatedAt": "2026-06-12T12:00:00Z",
"topScore": 0.92,
"weakEvidence": false,
"hits": [{ "doc": { … }, "score": 0.9, "highlight": "…", "sources": ["bm25", "vector"] }],
"entities": [{ "entity": { "id", "kind", "slug", "displayName" }, "facts": [ … ], "timeline": [ … ] }],
"contextMd": "## Memory\n\n…"
}weakEvidence - the abstention flag
weakEvidence: true means topScore < 0.5: the brain has little relevant content for this query. Callers should caveat their answer or proceed with less confidence instead of treating thin memory as fact. This is deliberate - a memory layer that never abstains teaches your agents to hallucinate provenance.
From each surface
| Surface | Call |
|---|---|
| CLI | unison context "<q>" [--deep --k --max-entities --path-prefix --include-bodies --json] |
| TypeScript SDK | brain.context() |
| MCP | brain_context tool |
Time-travel note: search, doc, and factsAbout accept asOf for "what did the brain know as of then"; context recall always answers from current memory.