context_window
Builds an optimal context window for queries by retrieving relevant memories and documents, prioritizing content, and truncating to fit token budgets for AI tool preparation.
Instructions
Build an optimal context window for a query within a token budget. Retrieves relevant memories and documents, assembles them in priority order, and truncates to fit. Use this to prepare context for another AI tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| token_budget | No | ||
| include_documents | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |