The cheapest way to build an AI agent is the most expensive way to run one
The option that feels like progress in week one is the one still charging you in week fifty. An agent has to keep its policy somewhere. There are three obvious places to put it.
This has come up in a few conversations now, from different directions, which is usually the sign that something is worth sharing.
Once an agent is in front of a system, people agree quickly that the rules have to be written down. The screens used to hold them and the screens are gone.
What gets skipped is where the rule actually gets applied. There are always other options, but three of them come up again and again.
This is easier with an example, so take a meal planner.
In the form. You tick vegetarian, drag a slider to twenty minutes, pick a budget. Your ticks become a query and the database answers it. Instant and free. You can only ask what the screen offered you.
Once, when it is set up. You type "something quick for a weeknight" and the nearest recipes come back. AI read every recipe weeks ago and turned each one into numbers, so the matching itself is just arithmetic. Getting that set up is real work, once. Running it costs almost nothing and takes no time.
At the moment of the call. You describe your week in a paragraph. A model reads it, reads the recipes and decides. It copes with "my mother in law is coming and she hates fish", which neither of the others can. It also does all of that again for the next person.
None of them is free. The form is instant and rigid. Setting it up once is the most work to build and the least to live with. Deciding at the call is barely any work up front, then charges you on every request, forever.
The interesting one is the form. It is the cheapest of the three to run. Nobody left forms behind because they were expensive. They left because forms were rigid, which is a different problem with a different answer.
It is easy to see why the last one won by default. You write the rule in a sentence, with nothing to build. What it does not feel like is a subscription, which is what it is. Every request from then on pays the same toll, whether the question was genuinely hard or completely routine.
That last word is the opening, because the middle option is the hybrid. Setting it up once does not remove the judgement. It just happens before anybody asks. What comes out of it is data rather than an answer, so every request after that is a lookup.
Which is what makes it worth real effort for anything common. You pay for the thinking once, then serve it for nothing. For the handful of shapes asked again and again it is the difference between a one-off cost and a toll you never stop paying.
Put a number on it. Say the rule gets applied a thousand times.
In the form. Nothing. It is a database query you already paid for.
Once, when it is set up. Less than a cent. A thousand vector searches comes to about eight tenths of one cent. Most plans include tens of thousands of free ones a month, so at that volume it never reaches a bill.
At the moment of the call. Perhaps about a dollar, on a small fast model with the rule itself cached. Several times that if you reach for a bigger one, though a bigger one is an odd choice for a routine check. Whichever number you land on, it stays somewhere between a hundred and a thousand times the lookup. That gap is structural. A shorter prompt does not close it.
So here is the question, which is the one you would ask about any subscription. You are choosing what this costs to run, every thousand times, for as long as it runs. Free, under a cent, or a dollar?
None of which is an argument for never asking a model. Some requests genuinely need judgement. That is what the money is buying. It is an argument for knowing which ones do.
The three of them, with what each one costs: three places a rule can live.
If you have put an agent in front of something that matters, I would be interested to know where you ended up putting the rules.
Prices as at August 2026, correct at the time of writing. Cloudflare bills Vectorize at $0.01 per million queried vector dimensions, so a thousand searches over a 768-dimension index is 768,000 dimensions, or about eight tenths of a cent. A paid Workers plan includes the first 50 million dimensions each month. The model figures assume a small judgement of roughly 800 tokens in and 80 out at Anthropic list rates, with three quarters of the input cached because the rule barely changes. That comes to about 66 cents per thousand calls on Haiku 4.5 and roughly $2 on Sonnet 5. Without caching, closer to $1.20 and $3.60. Your own numbers will move with prompt size and model. Current prices: Cloudflare Vectorize pricing and Anthropic pricing.