record /
retrieve API to add memory. The drop-in proxy speaks the exact wire format you’re
already using; you change a base URL and a couple of headers, and every turn gets
memory recall and storage automatically.
The idea
/v1/chat/completions, /v1/responses, and /v1/messages are wrapped versions of
the OpenAI Chat, OpenAI Responses, and Anthropic Messages APIs. Anona:
- Retrieves the most relevant memories for the space (and scope, if you set one).
- Injects them into the prompt.
- Calls the model.
- Stores the user turn and the assistant reply back into the space.
You never provide an LLM key. Anona runs the model for you;
model is a hint, and
billing is metered in Anona credits, not by the underlying provider.Step 1: swap the base URL
messages, stream, temperature,
max_tokens, and any field the OpenAI SDK sends that Anona doesn’t model
(top_p, n, stop, …) are forwarded to the provider unchanged.
Using the Anthropic Messages shape or the OpenAI Responses shape instead? Same
pattern: point at /v1/messages or /v1/responses respectively. See
Chat, Responses, and
Messages.
Step 2: pick a space (and a scope, if you have multiple users)
X-Anona-Space-Id is the one thing worth setting explicitly. Skip it and the turn
lands in a space literally named default, created on the first call, which is harmless for
a quick test, but you don’t want it in production.
If your app serves more than one end user, scope the turn too:
Step 3: tune what gets injected (optional)
Everything is sensible by default: 5 memories injected, auto-record on. Adjust with headers so you never touch a call site:
Or set the same knobs once on the space itself, so every call inherits them without a
header:
Step 4: read what happened
Two extra fields on an otherwise-normal response tell you what memory did on that turn:X-Anona-Memories-Injected and
X-Anona-Space-Id response headers, from the first chunk.
Verify it worked
Ask something that depends on a fact from an earlier turn, in a fresh request. If memory is wired up, the model answers it without you re-sending the context:Next steps
Chat API reference
Every tunable, streaming details, space defaults.
Scoping guide
Serve many end users from one space.
