Infinity Context
| ID | infinity_context |
| Category | Optimization |
| Features | None |
| Dependencies | None |
Limits the live prompt to recent conversation history while keeping older messages accessible through query_history.
This is useful for long-running sessions where the agent should stay responsive without losing access to earlier decisions, identifiers, or requirements.
| Tool | Purpose |
|---|---|
query_history | Search or retrieve earlier messages from the current session |
How It Works
Section titled “How It Works”- A message filter caps the number of recent messages sent to the model.
- If older messages are excluded, the model sees a system notice telling it to use
query_history. - The
query_historytool can keyword-search history or fetch a specific absolute message range.
Configuration
Section titled “Configuration”Default configuration:
{ "capabilities": ["infinity_context"]}Custom budget:
{ "capabilities": [ { "ref": "infinity_context", "config": { "context_budget_tokens": 80000, "min_recent_messages": 12 } } ]}| Field | Type | Default | Description |
|---|---|---|---|
context_budget_tokens | integer | 100000 | Approximate token budget reserved for message history |
min_recent_messages | integer | 10 | Minimum recent messages to keep even when the budget is tight |
Use Cases
Section titled “Use Cases”- Long debugging or implementation sessions
- Agents that need to preserve early requirements or credentials mentioned far back in the thread
- Platform chat sessions that accumulate substantial history over time
Limitations
Section titled “Limitations”- Search is keyword-based, not semantic
- The tool reads full session history; it does not currently restrict itself to only the trimmed portion
- Budgeting uses a heuristic message-count estimate, not model-specific tokenization