TokenPad
Building

AI Agent Configuration Builder

Define an agent, export the config, and know what it costs before you run it.

Definition
Tools (2)
Overhead per request
350tokens
Cost per request$0.000700
Worst case per task$0.004200
Tool preamble350
× 10K tasks$42.00

This is what the agent sends before your user types a word, on every iteration. At 6 iterations the configuration alone costs $0.004200 per task in the worst case — before any conversation history.

Stored in your browser only — no account, nothing uploaded.

Exported configuration
{
  "name": "support-triage",
  "model": "claude-sonnet-5",
  "provider": "anthropic",
  "system_prompt": "You are a support triage agent. Use search_docs before answering. Open a ticket only when the question cannot be answered from documentation.",
  "max_iterations": 6,
  "tools": [
    {
      "name": "search_docs",
      "description": "Search the product documentation for passages relevant to a question.",
      "input_schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          }
        }
      }
    },
    {
      "name": "create_ticket",
      "description": "Open a support ticket on behalf of the user.",
      "input_schema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      }
    }
  ]
}

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.

Frequently asked questions

What is the overhead this shows?
Everything the agent sends before your user ever types anything: the system prompt, every tool name, description and JSON schema, and the provider’s own tool-use preamble. On an agent with a dozen tools this routinely exceeds a thousand tokens per request, paid on every iteration of every loop, and almost no framework surfaces it.
Why do tool definitions cost so much?
Each tool contributes its name, its description and its full parameter schema to the request. A verbose description and a deeply nested schema can cost more than the user’s actual question. Trimming descriptions to a precise sentence and flattening optional parameters is usually the cheapest optimisation available to an agent.
Does this config work with my framework?
The export is deliberately framework-neutral JSON or YAML with conventional field names, meant as a starting point you adapt rather than a drop-in file. The value here is the structure and the cost accounting, not lock-in to somebody’s schema.
How do iteration limits affect cost?
Multiplicatively, and this is where agent budgets go wrong. An agent allowed ten iterations can make ten billed requests for one user action, and each iteration carries the full overhead plus the accumulated history. The estimate here multiplies by your limit so the worst case is visible rather than discovered on an invoice.

More building tools