Skip to main content
Most memory APIs hand you facts and leave the prompt engineering to you. POST /v1/condition/session hands you the prompt. It composes the subject’s identity, their current mode of thinking and a digest of recent organization activity into one system prompt you paste into Claude, GPT, or a local model. One identity, any LLM.

Before you start

A key with read

Conditioning is a read. Every key can do it.

Enough history

A pack composed over an empty graph is thin. Ingest first.

An LLM you control

You inject the prompt yourself. Exo does not call your model.

The shortest call that works

200 OK
cwd, userId and orgId are required by the schema because this route began as a coding-agent session hook. They do not select the subject. The effective subject comes from your API key, or from the X-Exo-Subject header when you send one. Send the body fields, and send the header when you mean a different person.

Reading the pack

userVoiceHint is null until there is enough of the subject’s own writing to measure. Exo withholds the voice profile rather than guessing at it, so treat null as “no voice guidance yet”, not as an error. See ConditioningPack and VoiceProfile. usage.llmInputTokens and llmOutputTokens are null because composing the pack is a set of database reads with no model call. They exist so that a future builder version that does spend tokens can report them in the same place.

Injecting the pack

The pack is designed to be dropped in as the system message, ahead of your own instructions.
The same pack works against any provider. Nothing in it is Claude-specific.

Caching

Respect expiresAt. Composing on every message wastes read units and gains nothing, because the underlying identity moves on the scale of sessions, not turns.
Invalidate early when you receive a basin.shifted event, which is Exo telling you the subject’s mode of thinking moved. See Reacting to change.

Agents that build their own prompts

If your agent assembles context itself and does not want a whole system prompt, use POST /v1/condition/scaffold. It wraps one prompt in the subject’s cognitive scaffold and tells you which knowledge-graph nodes shaped it.
200 OK
prompt accepts up to 100,000 characters.
focalNodes is always an empty array in v1. The scaffold is composed from the subject’s identity rather than from a retrieval pass, so there are no focal nodes to report. Do not build a citation UI on this field. If you need the nodes behind an answer, read cognition.focalNodeIds from POST /v1/retrieve, which is populated on the brain path. Treat a future non-empty list here as an additive change.

Conditioning on behalf of a subject

Add X-Exo-Subject, exactly as on every other route.
This is the call that gives every end user of your product their own conditioned agent.

When it goes wrong

Next

ConditioningPack and VoiceProfile

Every field, and why the voice profile is withheld rather than guessed.

Reacting to change

Invalidate a cached pack the moment the subject’s thinking shifts.