Tool-Heavy Agents on a $5 Monthly Cap
01 / Every Tool Call Replays the Whole Conversation
An agent that calls tools is not a chatbot with extra buttons. Each step of its loop sends the model a fresh request containing the system prompt, every tool schema, the original user request, and all tool results collected so far. The model answers, you execute a tool, and the next request is larger than the last. Four tool calls in one turn can quietly replay five times the text of a single ordinary message.
Here is one realistic turn. These numbers are a worked example rather than a benchmark, and your own prompts will differ:
- ■ System prompt and role rules: 900 tokens.
- ■ Six tool schemas at roughly 180 tokens each: about 1,080 tokens.
- ■ User request and initial context: 1,400 tokens.
- ■ Tool results returned during the turn: 250 to 600 tokens each.
That first request already carries about 3,400 input tokens before the model writes anything. With four tool calls, the four follow-up requests carry roughly 3,400 plus 4,200 plus 5,000 plus 5,800 tokens, for about 18,400 input tokens in a single turn. The output side stays small, somewhere around 500 to 800 tokens in total. So a four-call turn spends the input budget of five ordinary requests, and the tool schemas are paid for on every one of them unless something stable sits in a cache.
This is why model choice for agents is a different question from model choice for chat. In chat you optimize output quality per token. In a tool loop you optimize input tokens per completed task, because input is where nearly all of your money goes.
02 / Count Tokens Before You Pick Any Model
Model selection starts with arithmetic, not brand names. Write down four rates for each candidate: price per input token, price per output token, price for cache reads, and price for cache writes. CheapRelay bills per real token, including cache reads and writes, with no monthly fee and no subscription, so those four rates are your entire cost equation.
Then multiply. Take the 18,400-token turn above and multiply by the input rate. Take the 700 output tokens and multiply by the output rate. Add the cache terms if you plan to cache. Do that for ten turns, because a working session is almost never a single turn. If the total makes you uneasy, that model is too expensive for this loop regardless of how good it sounds.
Keep the ledger in a plain spreadsheet with one row per run. Record input tokens, output tokens, cache reads, cache writes, and tool call count. The ratio that matters most is input tokens divided by tool calls. If it climbs week over week, your conversation is growing faster than your task is finishing, and no amount of model shopping will save you.
Also test argument quality before committing. A model that is cheap per token but emits malformed tool calls forces retries, and every retry replays the entire request. Cheap input rates do not survive three failed attempts at the same call.
03 / Splitting $5 Across Tests and Daily Runs
A tiny budget forces explicit rules. With a $5 monthly ceiling, a workable split is $2 for evaluation runs, $2 for real work, and $1 held back for the day you forget to set a loop limit. The split matters more than the total, because most beginner burn happens on the first evening of testing, when every prompt variant gets a full agent run.
Before spending a cent, divide each slice of the cap by the per-turn cost you calculated earlier. If a turn uses 18,400 input tokens and 700 output tokens, the rates on the model page turn that into a concrete amount, and $2 buys you a fixed number of turns. Write that number down and treat it as your monthly ticket count. When the ticket count is small, you will naturally shorten prompts, drop unused tools, and test on the cheapest model first.
Use hard stops instead of willpower. Set a spend alert at 80 percent of the cap. Make the agent exit when a run crosses a token ceiling you chose, for example 40,000 input tokens, and hand control back to you with a short summary. An agent that stops and asks a question is far cheaper than one that loops.
One habit keeps the budget honest: never run a new prompt on the expensive model first. Run it on the cheap model, read the trace, fix the prompt or the schema, and only then judge whether you need more intelligence.
04 / Shrinking the Replay With Tight Schemas and One Cached Prefix
Tool schemas are the easiest waste to cut. Every parameter you describe is resent on every request. Drop optional fields the model never uses, shorten descriptions to a single line, and remove tools that the current task cannot reach. Removing two unused tools can save 300 to 400 tokens per request, which is 1,500 to 2,000 tokens on a four-call turn.
History is the second lever. Old tool results rarely need to survive verbatim. Replace a 500-token JSON blob with a one-line summary once its value has been used. Keep the last two results in full and summarize the rest. Across a long session this is usually the largest single saving available, and it costs nothing but a little code.
Caching is the third lever and the most misused. Cache reads and cache writes are billed, so a cached prefix pays off only when the same stable text is reused many times: the system prompt and tool schemas at the front of a multi-turn session. A one-shot run gains almost nothing and may pay a cache write for nothing. Compare the cache read rate against the normal input rate for the model you pick, and cache only the prefix that truly repeats.
05 / Escalate Only When the Cheapest Model Fails the Task
Tool calling rewards reliability, but reliability has a price. Start with the smallest model that can emit valid tool arguments, and let it attempt the whole workflow. Many read, search, and summarize loops run fine on a budget-friendly small model; Claude Haiku 4.5 is the kind of candidate worth testing in that slot first, with DeepSeek V4 Flash as a sensible alternative for the same role. Whichever you choose, run it against three to five real tasks of yours before moving up.
Escalation has exactly two triggers: the model produces malformed tool calls, or the task needs reasoning the small model consistently gets wrong. Malformed calls are expensive because each retry replays the entire request. Cap retries at one, log the raw response, and fix the schema before blaming the model.
A cheap hybrid works well too. Let the small model handle tool selection and data gathering, then pass a compact digest to a stronger model for the final answer. The expensive call sees 800 tokens of digest instead of 18,000 tokens of raw tool traffic. That is the biggest saving available in an agent pipeline, and it costs one extra line of code.
06 / Logging Each Run So the $5 Cap Holds
Read the usage block returned with every request and write it to your ledger immediately. Token counts are the receipt, and a receipt you never look at is useless. A single row should look like this: Run 12, input 18,420, output 706, cache read 12,900, cache write 5,520, tool calls 4.
Review the ledger weekly with three questions. Did input tokens per tool call rise? Did retries appear? Did cache reads actually exceed cache writes? A yes to the first two means tighter schemas and shorter history. A no to the third means drop caching on that workflow and save the write charges.
CheapRelay at cheapapirelay.com gives you one key for Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok and more, with OpenAI-compatible routes under /v1 and Gemini native routes under /v1beta, so the same agent code switches models by changing one string. It works with Claude Code, Codex, Gemini CLI and any OpenAI SDK, billing is per real token with no monthly fee, and you can sign up for a CheapRelay key when you are ready to run this plan.
Finish the setup by writing your cap, your turn estimate, and your ticket count at the top of the ledger. Three numbers on one line will keep a tool-hungry agent inside $5 far better than any amount of good intentions.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-30 | Model price-offs | EN | 200k Tokens In Costs 0.2 Times Your Input Rate Beginner cost math for a 200k-token window: per-call pricing, cache read and write billing, and a seven-day ceiling for a tiny budget. |
| 2026-10-30 | Model price-offs | EN | Cut Your AI Bill 66 Percent with 200-Token Routers Route cheap, answer expensive. A tiny-budget walkthrough with token math, cache accounting, and one worked receipt. |
| 2026-10-29 | Model price-offs | EN | Start at $5, Upgrade Only When It Fails A tiny-budget model ladder for choosing cheap AI models first, testing quality, and upgrading only when the output breaks. |
| 2026-10-29 | Model price-offs | EN | 600 Tokens: A Hunyuan 4 and MiMo V2.6 Pro Receipt Try Hunyuan 4 and MiMo V2.6 Pro on a tiny budget, calculate a two-request receipt, and keep light API workloads under control. |
| 2026-10-29 | Model price-offs | EN | $5 Chatbot Budget: Sonnet or GPT-6.1 Sol? Compare Claude Sonnet 5.5 and GPT-6.1 Sol with a $5 testing plan, simple token math, and practical checks for a small chatbot. |
| 2026-10-29 | Model price-offs | EN | Claude Opus 5.5: Make It Earn a $2 Test Budget A tiny-budget walkthrough for testing Claude Opus 5.5 on costly mistakes, stubborn bugs and decisions that can justify a premium model. |