Get Context
A block for the prompt: what the store knows about the end user, and the facts and memories most relevant to query, as Markdown within token_budget tokens.
No text is generated: retrieval and layout, the question only embedded to rank. context is the whole block; stable (the same from one call to the next) and volatile (this question's part) are its two halves, for a model provider's prompt cache. degraded is true when part of it could not be retrieved, degraded_parts says which, and the block then ends with a note saying so to the model.
Request
- Base URL: https://api.korely.ai
- URL: https://api.korely.ai/v1/context
- Auth: HTTP bearer
Query parameters
End user to build context for.
One agent's namespace: its facts and its memories only, as every other read with an agent_id.
Tokens the block may take, 50 to 8000. Default 800; we recommend 4000 for an agent that answers questions about the past. On 60 LongMemEval questions the memory holding the answer reached the block for 82% of them at 2000 tokens (2 Oct 2026; 0.1.28 left the block up to 2000 tokens as it was). Above 2000 tokens the block shows more memories since 0.1.28: at 4000, 15 more of 282 LoCoMo multi-hop questions were answered (12 Oct 2026). A larger budget is a larger prompt: keep it low where latency matters, as in a voice agent.
ISO date/datetime: the block as the store could have built it then: the facts it had learned by then, true then as it knew them, and the memories it had received by then. Rebuilt with today's ranking; a memory edited since shows today's text, one deleted since stays out.
Leave out the work sessions (memories written with kind: session, what a coding assistant's hooks save) and the facts only they state, for a block about what was said and decided. Default false: everything.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.