Build context
build_contextBuild a compact, prompt-ready context by retrieving relevant memories, prioritizing high-value ones, and trimming to a token budget for direct LLM input.
Instructions
Assemble a budgeted, prompt-ready context block for a query.
Highest-value memories first, with same-session neighbours pulled in, trimmed to token_budget.
Drop the returned string straight into an LLM prompt. It uses lean memory lines by default;
call recall or inspect_memory when you need full provenance/source evidence. Each line is dated
and the header anchors today's date so the reader can resolve relative time. Standing user
directives ("from now on…", "always…") are pinned in regardless of query relevance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| hybrid | No | ||
| namespace | No | ||
| token_budget | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |