Context Budgeter
The Context Budgeter allocates token budgets across context segments based on model limits and configurable priorities.Agent-Centric Quick Start
Low-Level API
Model Limits
| Model | Context Limit | Default Output Reserve |
|---|---|---|
| gpt-4o | 128,000 | 16,384 |
| gpt-4o-mini | 128,000 | 16,384 |
| gpt-4-turbo | 128,000 | 4,096 |
| claude-3-opus | 200,000 | 8,192 |
| claude-3-sonnet | 200,000 | 8,192 |
| gemini-1.5-pro | 2,097,152 | 8,192 |
| gemini-1.5-flash | 1,048,576 | 8,192 |
Budget Allocation
Default segment budgets:| Segment | Default Budget | Purpose |
|---|---|---|
| System Prompt | 2,000 | Agent instructions |
| Rules | 500 | Workspace rules |
| Skills | 500 | Skill definitions |
| Memory | 1,000 | Persistent memory |
| Tools Schema | 2,000 | Tool definitions |
| Tool Outputs | 20,000 | Tool call results |
| Buffer | 1,000 | Safety margin |
| History | Remainder | Conversation history |
Custom Budgets
Overflow Detection
Threshold-Based Triggers
CLI Configuration
Environment Variables
Serialization
Next Steps
- Context Ledger - Track actual token usage
- Context Optimizer - Reduce when over budget

