statewave_get_context
Retrieve a compact, ranked context bundle of distilled facts and procedures for a subject, tailored to your task. Replaces raw chat history or full files with only the most relevant information for LLM prompts.
Instructions
Assemble a compact, ranked context bundle for a subject, tailored to the task described in query. Read-only. Designed to be injected into an agent/LLM prompt in place of stuffing raw chat history or whole files: it returns only the most relevant distilled facts and procedures, fit to a token budget. Returns a context bundle with assembled_context (ready-to-prompt text), structured facts and procedures arrays, and a token estimate. Prefer this over statewave_search_memories when you want prompt-ready context rather than a raw ranked list of memories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The task being performed or question being answered. Used to rank and select which facts and procedures to include in the bundle. | |
| subject | Yes | Subject to retrieve context for. Format `scope:identifier`, e.g. `repo:owner.name` or `customer:acme`. | |
| max_tokens | No | Approximate token budget for the assembled context (100–32000, default 2000). Lower it for tight prompts; raise it for richer context. |