Skip to content

Infinity Context

IDinfinity_context
CategoryOptimization
FeaturesNone
DependenciesNone

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.

ToolPurpose
query_historySearch or retrieve earlier messages from the current session
  1. A message filter caps the number of recent messages sent to the model.
  2. If older messages are excluded, the model sees a system notice telling it to use query_history.
  3. The query_history tool can keyword-search history or fetch a specific absolute message range.

Default configuration:

{
"capabilities": ["infinity_context"]
}

Custom budget:

{
"capabilities": [
{
"ref": "infinity_context",
"config": {
"context_budget_tokens": 80000,
"min_recent_messages": 12
}
}
]
}
FieldTypeDefaultDescription
context_budget_tokensinteger100000Approximate token budget reserved for message history
min_recent_messagesinteger10Minimum recent messages to keep even when the budget is tight
  • 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
  • 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