Expand description
Pre-prompt memory context builder.
Assembles a ranked block of relevant memories to inject into the system prompt before each LLM call, constrained by the model’s token budget.
Structs§
- Context
Build Result - Result of a context build — includes the formatted prompt block and the raw memory hits that were included (for streaming to the client).
Functions§
- build_
context - Assembles a formatted memory context block for injection into a system prompt.
- build_
context_ with_ hits - Assembles a formatted memory context block for injection into a system prompt, returning both the block and the raw memory hits.