The number frameworks do not show you
Define an agent — model, system prompt, tools, iteration limit — and export it as JSON or YAML. The part that matters is the readout: how many tokens your configuration adds to every single request, before the user has typed anything.
On an agent with a dozen tools this routinely exceeds a thousand tokens. It is paid on every iteration of every loop, and almost no framework surfaces it. Teams discover it on an invoice, usually after concluding that agents are inexplicably expensive.
What makes up the overhead
The system prompt
Usually the largest single item, and the easiest to cut. Analyse it separately in the system prompt analyzer, which prices each paragraph per year.
Tool definitions
Every tool contributes its name, its description and its full parameter schema to every request. A verbose description and a deeply nested schema can easily cost more than the user’s actual question. Three habits pay for themselves:
- One precise sentence per description. The model needs to know when to call the tool, not how it was implemented.
- Flatten optional parameters. Nested objects with defaults serialise into a surprising amount of schema.
- Remove tools the agent never calls. Every unused tool is a permanent tax on every request.
The provider’s tool-use preamble
Providers inject their own system text whenever any tool is present. Anthropic publishes the figure — several hundred tokens depending on model and tool choice setting — and it is charged whether or not a tool is called. It is accounted for separately in the readout above rather than hidden in an average, because it is the part people are most surprised by.
Iteration limits multiply everything
This is where agent budgets go wrong by an order of magnitude. An agent permitted ten iterations can make ten billed requests for one user action. Each iteration carries the full configuration overhead plus the accumulated history of the loop so far — which grows the same quadratic way a conversation does.
The worst-case figure above multiplies by your limit deliberately. Most agents finish in two or three iterations, but the limit is what you have authorised, and capacity planning against the average is how you get a bill you cannot explain. For the compounding-history side of it, see the chat cost estimator.
Making an agent cheaper without making it worse
- Route to a smaller model for simple steps. Most iterations in a loop are mechanical. Reserve the expensive model for the step that needs judgement, and compare rates in the model price table.
- Load tools conditionally. If half your tools only apply to one branch, defining them all on every request pays for the branch you did not take.
- Cache the prefix. System prompt and tool definitions are identical on every request by construction — an ideal cache prefix, typically at a tenth of the base input rate.
- Lower the iteration ceiling. An agent that cannot solve the task in four passes usually cannot solve it in ten either; it just costs more to find out.
- Move capability into skills. A skill loads its body only when triggered, so instructions for a rare case stop being a permanent cost.
About the export
The output is deliberately framework-neutral, with conventional field names — a starting point you adapt, not a drop-in file for one library. The value here is the structure and the cost accounting, not lock-in to somebody’s schema. Nothing is transmitted: the config is assembled in your browser and never leaves it.