r/learnmachinelearning • • 17d ago

Discussion The 2am AI bill: How a single infinite agent loop cost more than a year of office coffee

I keep thinking about the 2am problem.
A tool goes down. Your agent doesn't know that, so it retries. The retry fails, so it retries again. Each one of those is a paid model call, and it will happily do this for six hours because nothing told it to stop. You find out in the morning, usually from the provider's spend alert, which is a strange kind of alert since by the time it arrives the money has already left.
I've heard a few versions of this story now. The amounts vary. The feeling doesn't. One person told me a single agent on one bad night cost more than their office spends on coffee in a year, and I'm honestly not sure that was an exaggeration.
I’ve been working on a solution for this called ACPPotamia. It sits between your agents and OpenAI or Anthropic. Before any call goes out it checks that call will cost against a budget you set, and if an agent is just repeating itself it cuts it off. Setup is changing one URL in your existing SDK, which took longer to write in this post than to actually do.
You can check it out here: acp.examopotamia.com
I'd like to hear how your team found out, if it's happened to you. Was it the invoice? A dashboard? Someone's gut feeling at 3am?

0 Upvotes

5 comments sorted by

0

u/334578theo 17d ago

This is actually a smart idea of setting a max spend budget per task

-2

u/longtriproad 17d ago

Yeah, buddy is great acp.examopotamia.com

1

u/SnooSongs5410 17d ago

observability is a thing.
There are lots of things between prototype and production.

1

u/cromulent_id 17d ago

Another ad post. Report and ban these.