Agent Context Planner
Add your fixed context blocks โ system prompt, tool schemas, retrieved documents โ and see exactly how many tokens they consume. Calculates remaining budget, max conversation turns, and warns when you're running low.
Model & Turn Settings
Tokens to reserve for the model's final response. Reduces available turns.
Context Blocks
Click a block type above to add context blocks.
Context usage
HealthyTotal used
1,000
tokens
Context window
128,000
tokens
Max turns
211
at avg turn size
Per turn cost
600
tokens/turn
Token breakdown
๐ก Recommendations
ยท Context budget looks healthy. You have room for long multi-turn conversations.
Context Budget Guidelines
Under 50% โ โ Healthy
Plenty of room for long conversations. Good for interactive agents.
50โ75% โ โ Watch
Monitor context usage. Consider compressing old turns in long sessions.
Over 75% โ ๐ด Act
Few turns available. Trim fixed blocks or switch to a larger context model.
Tips for reducing context usage
- โบTrim your system prompt โ every word costs tokens. Aim for under 500 tokens for simple agents.
- โบCompress tool schemas โ remove verbose descriptions, use short field names where possible.
- โบUse retrieval-augmented generation (RAG) instead of stuffing entire documents into context.
- โบSummarise conversation history after N turns instead of keeping the full transcript.
- โบChoose a model with a larger context window if your use case requires more fixed context.
Privacy: This tool runs entirely in your browser. Your content is never uploaded or stored.
Frequently Asked Questions
What is context budget planning for AI agents?
What are context blocks?
How is token count estimated?
What does "reserved for final output" mean?
What does "max turns" mean?
Is my content uploaded anywhere?
Related Tools
Prompt Token Counter
Count tokens in your prompts for GPT-4, Claude, Llama, and other AI models.
Context Window Calculator
Check if your content fits within the context window of different AI models.
MCP Tool Schema Validator
Validate MCP tool definitions โ names, descriptions, inputSchema, required fields, and common mistakes.