Every Resource, Checked: How AI Agents Audited Our Cloud Bill

The usual cost advice covers the big items. We used read-only AI agents and reviewer agents to check every resource in our Azure bill, and cut it by about a quarter.

Agents find, agents check, people change: finder agents feed ideas to reviewers, and a human makes each change

Ask a consultant or your cloud provider how to lower an Azure bill and you will get the same playbook. Reserve your steady workloads for one or three years. Buy a savings plan. Follow Azure Advisor's right-sizing tips. Use your existing licenses. Shut down dev machines at night.

That advice is good, and we already follow most of it. But it works at the top of the bill, on the big line items. It doesn't look at the long tail: hundreds of small charges, each too small to be worth an engineer's afternoon.

We tried a different approach. One group of read-only AI agents went through every area of our Azure bill, down to single resources. A second group checked their math and tried to prove each idea unsafe. A human made every change.

The result: 36 changes over two days, adding up to about 23% of the monthly bill at list price. No single change was worth more than 3% of the bill, and most were worth less than 1%. This post is about the method, because it works the same way on a bill of any size. A bigger bill just has a longer tail.

Why the long tail survives

The usual playbook is built for scale. A reservation is one decision that saves money on many machines. That's why consultants start there.

The long tail is the opposite. Every item needs its own check: who uses it, does anything depend on it, can the change be undone? That can take an hour per item. For a single small item, the hour costs more than the saving. So the work never makes it to the top of anyone's list, in any company.

This is where agents change the math. Checking a hundred small items costs an agent about as much effort as checking one.

We set three limits before we started:

  • Compliance and recovery come first. Anything an audit needs stays: backups and the security logs we must retain. Short-lived operational data, like old performance metrics, can go.
  • Production stays safe. If we can't show that nothing depends on a resource, it stays.
  • Agents read, people change. Agents can list resources, read metrics and query costs. They don't change anything.

The method

The method in six steps: pull the cost data, six read-only area agents find savings, twelve reviewers check the math and try to prove each idea unsafe, a human runs each change, an agent verifies and logs it, a second round looks for new ideas only, and the next bills measure the result.
Agents read and propose. Only a person changes anything.

1. Start from the real bill

We started with last month's actual costs from the Azure Cost Management API, grouped by resource group and meter (the line item Azure bills for). This gives a short, readable list. Grouping by individual resource gives far too many rows to work with. Then you drill into one area at a time.

For the cost of each idea, the agents used the public Azure Retail Prices API. No guessed prices.

2. Split the bill between finder agents

We split the bill into six areas: virtual machines, storage, backup, the data platform, Kubernetes and networking, and security and monitoring services. Each area got its own agent with the same brief and the same rules:

  • Read only.
  • Evidence for every idea: the current cost, the new cost and one fact showing it is safe, such as "maximum CPU 11% over 30 days".
  • No double counting. Each cost belongs to one area.
  • Decide, don't ask. When something is unclear, pick a sensible default and write it down.

Each agent returned a table of ideas, with the exact command for each change, written down but not run.

3. Give the reviewers a different job

This is the part that made the method work. Every area got two reviewer agents. One checked the math: is the price right, is the usage real, is the saving counted twice? The other had one job, which was to prove the idea unsafe. It searched our code, DNS, routing, pipelines and activity logs for anything still using the resource. Each idea came back confirmed, adjusted or blocked.

Finders exist to find money, so they lean toward yes. Safety reviewers exist to find damage, so they lean toward no. You need both, and one agent can't play both roles well.

The reviewers blocked ideas worth almost a fifth of the bill, nearly as much as we ended up saving. They also caught risks that only show up across areas: two changes that were each safe on their own but together would have cut off admin access to a server. That kind of interaction is easy to miss when each team looks only at its own area.

Each idea goes to two agents: a finder that looks for money and a reviewer that looks for damage.
One agent looks for money, another looks for damage.

4. A human makes every change

Agents proposed and I ran each change myself. After each one, an agent checked the result: the resource was gone, the service still answered, nothing broke. Where we could, we kept a copy first or relied on soft delete, so a mistake could be undone.

Each change got one row in a shared change log: date, what changed, the expected saving and how it was verified. That log turned out to be the most useful file in the project.

5. Run a second round

The next day, a fresh set of agents got the change log and one instruction: find savings that are not in it yet. Fresh eyes found more, and the log kept them from repeating work.

6. Measure with the bill

An estimate is not a saving. Azure's cost data shows production cost down 15% in October, the month of the changes, and forecasts November 27% below September. The invoice for November, the first full month after the changes, will be the real proof.

Monthly production cost, with September set to 100. November is Azure's forecast, not an invoice.
Production cost with September set to 100. November is Azure's forecast, not an invoice.

What the agents found

Nothing exotic. The savings were the kind every cloud estate collects over time:

GroupShare
Resources no longer in use34%
Old data and retention25%
Right-sizing16%
Security service settings15%
Monitoring5%
Second-round cleanups5%

Leftovers from finished projects. Data kept longer than anyone needs. Machines sized for a load that has since changed. Monitoring that collects more often than anyone reads. None of it needed a big decision. Each item needed someone to look, and the agents made looking cheap.

What we chose not to do

Not every saving is worth taking. We said no to a few real savings because the risk or the effort was too high:

  • Cutting backup that protects important data. Cheaper, and not worth it.
  • Changes that need application work. Those went to the backlog as planned projects, not cleanup.
  • Discounts we couldn't fully justify yet. Not until the paperwork is in place.

We also reversed one change when it slowed the team down. Saving money that costs engineers time is a bad trade.

What I'd tell anyone trying this

  1. Do the usual playbook first. Reservations, savings plans and right-sizing are still the biggest levers.
  2. Then go after the long tail. Small items add up. Ours added up to almost a quarter of the bill.
  3. Evidence before opinion. A number and a safety fact for every idea, or it doesn't go in the plan.
  4. Separate finding from checking. The finder looks for money and the reviewer looks for damage.
  5. A human makes every change. Agents read and propose. A person runs the command.
  6. Keep what an audit needs, drop the rest. Compliance decides what stays, not habit.
  7. Write every change down. One log row per change makes the next round and the final check possible.
  8. Measure with the bill. The estimate is a forecast. The invoice is the result.

The agents didn't find anything a careful engineer couldn't have found. They made it worth looking, and that holds whether the bill has hundreds of resources or hundreds of thousands.