DEV Community

GEORGE KONNARIS
GEORGE KONNARIS

Posted on

I built a circuit breaker for AI agents after hearing about a $400 overnight API bill

A civil engineer showed me his API dashboard last month. His AI agent got stuck in an error loop overnight and burned $400 while he slept. No alerts. No kill switch. Just a bill in the morning.
That conversation stuck with me. So I built Taskora.
Here's how it works:

You connect your OpenAI or Anthropic API key
Set a monthly spend limit in dollars
Get an email alert at 80%
Agents get hard-blocked at 100%

The technical part was straightforward — a token ledger in Supabase, a middleware check before every agent execution, and a circuit breaker flag on the user profile that flips when the limit is hit.
The harder part was positioning. Is this a spend monitor? A kill switch? Cost protection? Still figuring that out.
If you run AI agents and have ever had a surprise bill, I'd love your feedback: taskora.eu
Building in public as an 18 year old. Happy to answer any questions about the technical implementation.

Top comments (0)