One of the agents running on AIFindr (The Agile Monkeys’ platform for building reliable enterprise AI agents) answers about 93,000 questions a month for a major Latin American bank. People ask it about cards, loans, accounts, and insurance, and it answers from the bank’s own content.
Until the middle of November, those answers cost roughly $7,700 a month in model API spend alone. Today, at the same volume, the run-rate is under $150.
That is a reduction of more than 98 percent, and none of it came from a clever prompt. It came from three switches, flipped in under two weeks.
The switches were the easy part. The hard part came first: finding out that we had been overpaying for the better part of a year, and that our own dashboards had been telling us otherwise.
How one agent got to $7,700 a month
Four things compounded, and each was reasonable when it happened.
An agent instead of a pipeline. In May we moved from a classic retrieve-then-answer pipeline to an agent that decides what to search for and returns a structured answer: the text, its sources, and suggested follow-up questions. Answers improved on our evaluation set. Each question also started to involve more model work.
A flagship model. For a bank, answer quality comes first, so the agent ran on its provider’s flagship model, at flagship prices.
A premium tier that was meant to be temporary. A year ago we switched the whole platform to our AI provider’s Priority processing tier to protect another project through a seasonal traffic peak. It roughly doubles the price per token in exchange for faster, more isolated capacity. The peak passed. The setting stayed.
Growth. In June the agent handled about 11,000 requests. At that volume, a flagship model at double the price barely registers, and nobody audits a line item that barely registers. By August it was handling 95,000.
The product of those four was about 8.3 cents per answer, 93,000 times a month.
Nobody decided to spend $7,700. It accumulated. And for most of that time, our dashboard showed half of it.
First, we had to see the bill, and be able to control it
In August, our own numbers and the provider’s disagreed by a factor of two. The provider showed about $6,000 of production usage for the month to date. Our telemetry showed about $3,000.
The cause was simple, and a little embarrassing: our telemetry priced every call at the standard rate. It knew nothing about tiers.
So before cutting anything, we sat down and put the house in order.
Service tier became a per-project setting. Until then, one account-level switch decided the price of every call on the platform. We made the tier a property of each project, so that Priority can be kept for the projects that really face those peaks while everything else runs on Standard.
Cost telemetry learned about tiers. Every call is now recorded with the tier that actually served it, and its cost is computed from that. For the first time, cost per project was a number we could trust.
With both in place, we moved the vast majority of our projects to Standard.
But not this one. The bank had told us response times were getting too long, and we had spent the summer bringing latency down with a series of optimizations, such as moving PII redaction from a remote model to our own infrastructure, which took that step from 1.4 seconds to 175 milliseconds. Its tier was the last thing we wanted to touch.
Latency metrics got much better. If the next cuts were going to cost speed, we needed to see exactly how much. Beyond total duration, every answer now reports time to first token, time to first tool call, and how long the user waits before the first words appear on screen.
None of this saved this agent a dollar by itself. All of it had to exist before a single switch could be flipped safely.
Then we started flipping them.
Step one: stop paying for speed by default
The first switch was the obvious one: from Priority to Standard processing. One setting, on one project.
The run-rate fell from about $7,700 to about $3,700 a month, a 52 percent reduction. The model, the prompt, and the knowledge base did not change, so the answers did not change either. The only thing that could move was speed.
It moved. In our first reading after the change, the median time for a complete answer went from about 6.5 to about 9.8 seconds. That is a preliminary figure, but the direction is not in doubt: Standard is slower, and we took that trade knowingly. Keep those seconds in mind. They come back before the end of this story.
Half the bill was gone, and we had not touched the model yet.
Step two: ask whether you still need the flagship
The flagship model has a much lighter, faster sibling: a small model whose output tokens cost about 28 times less.
Switching was one setting away. But the model behind a bank’s agent is not something you change lightly. To move it, we needed evidence, from its own content and its own traffic.
An evaluation in an isolated copy. We rebuilt the agent in a sandbox with its full knowledge base and ran its evaluation set against three candidates: the flagship model it was using, a mid-sized model, and the small model. The mid-sized model scored best. The small model finished a few points behind the flagship.
A side-by-side read. Reading the answers next to each other showed what that score meant. The small model was rarely wrong. It was terse: where the flagship model wrote a numbered list with details, it wrote a short paragraph. A difference of style more than of substance.
The economics. The mid-sized model would have cut the bill roughly in half. The small model cost about a tenth of the mid-sized one.
With a gap that size, and answers that close, the choice was easy: the small model. We put it in production under close monitoring, with the flagship model one setting away in case we needed to go back.
As part of that monitoring, we took the 30 questions customers ask most often and compared the old and new answers one by one.
Twenty-three answers were equivalent. Five were correct but less detailed, and two were correct but weaker. None contained a content error.
And the bill? Over the first five thousand production answers, the cost came to 0.18 cents per answer, down from about 4 cents. The run-rate fell from $3,700 to about $170 a month: another 95 percent, on top of the first step.
The trade-off we accepted
A model that costs 28 times less is not the same model. We kept reading its production answers and adjusting the prompt until we reached a balance we were happy with.
A trade-off remains. Some answers are less detailed than the flagship model’s. And some questions take more work: with a smaller model, the agent sometimes has to go back to the knowledge base more than once before it has a satisfactory answer.
For 95 percent of what was left of the bill, that was a trade worth making.
That left one more thing to look at: how many of those answers we were generating more than once.
Step three: stop generating the same answer twice
The bank’s interface offers customers suggested questions to start from. So when we analyzed the traffic, we found a lot of repetition: 36 percent of questions were exact repeats of one the agent had already answered.
A cache is the obvious answer, and that is exactly why we had not built one sooner. Caches are easy to add and hard to get right: stale entries, bad invalidation, an answer served to someone it was never meant for. We have been burned by them before.
This case was different because the target was so narrow: the same questions, word for word. So we built a response cache that is opt-in per project and does one thing. When a question is identical to one already answered, it returns the stored answer instead of calling the model again.
Why exact match, and not “similar enough”? Because a similar question is not the same question, and a bank’s agent cannot confidently answer the wrong one. For the same reason, the cache is strict about what it will reuse:
- Only the first message of a conversation. Follow-ups depend on what was said before.
- Never when personal data is involved. The privacy filter runs first. If it detects personal data, nothing is read from the cache and nothing is written to it.
- Never for personalized or live answers, such as identified users or web search.
- Never for time-sensitive wording, in the question or in the answer.
- Never after a failed retrieval.
- Emptied whenever the knowledge base, the prompt, or the model changes.
A false “do not cache” costs a fifth of a cent. A false “cache” costs trust.
In its first days in production, about one in five answers comes straight from the cache. At that rate, we estimate the run-rate at roughly $136 a month.
The part we did not expect: it got faster
Remember why this agent was the last one we wanted to move off the premium tier: the bank had told us its answers were taking too long, and every change on our list looked like it would make that worse.
This is how long a complete answer takes in production at each stage:
Moving to Standard cost us about two seconds, as expected. The small model gave them back, and then some: the median answer now arrives in 4.7 seconds, 28 percent faster than on the premium tier we had been paying double for. And the one answer in five that comes from the cache arrives in a fraction of a second.
The agent now costs 98 percent less, and it answers faster than when we started.
What we would tell another team
- Reconcile your cost telemetry with the invoice. Ours was off by a factor of two, in the direction that hides the problem.
- Give temporary settings an expiry date. Ours outlived the traffic peak it was bought for by the better part of a year.
- Measure cost per answer, per agent. A shared invoice hides exactly the number you need.
- Review the models your agents run on. This field moves fast. Today’s small models may well match the flagships of a few months ago, so do not fall asleep on a choice you made last year.
- Evaluate before you switch, on real production data if you can. It is what lets you change with confidence.
- Cache exact repeats first, and make “do not cache” the cheap failure.
- Keep revisiting your agents’ configuration. Models keep getting faster, cheaper, and more capable, and what you built around yesterday’s limits can often be simplified. If nobody looks, you keep paying for it.
At this agent’s volume, the difference between $7,700 and under $150 a month is more than $90,000 a year.
The price of intelligence keeps falling. Whether your bill falls with it is an engineering problem: it depends on whether you can see what each answer costs, change one agent without touching the others, and check that the cheaper answer is still the right one.
