Your AI context window is finite. ContextBudget shows you exactly where every token is spent -- system prompts, history, tool calls, and more -- so you can optimize what matters.
ContextBudget intercepts your API calls and breaks down exactly where tokens go. No guessing, no surprises on your bill.
Most system prompts are 3-5x larger than they need to be. ContextBudget shows you exactly which instructions are eating your window.
Watch how conversation history compounds over turns. Know exactly when truncation will kick in and what gets dropped.
Tool results are the hidden cost. One verbose API response can consume 30% of your context. See it, fix it.
Wrap your existing client. ContextBudget handles the rest.
$ npm install @contextbudget/sdk
$ pip install contextbudget
import { wrap } from '@contextbudget/sdk';
import Anthropic from '@anthropic-ai/sdk';
// Wrap your client. That's it.
const client = wrap(new Anthropic());
from contextbudget import wrap
from anthropic import Anthropic
# Wrap your client. That's it.
client = wrap(Anthropic())
No credit card required. Upgrade when you're hooked.
Install the SDK, make one API call, and watch the breakdown appear in real time. No config. No setup. Just wrap and go.
Get started for free