It was 2am when the email came in.
"Your OpenAI usage has exceeded $400."
An agent I'd been testing had hit a loop. It kept retrying a failed call, over and over, for six hours while I slept. By the time I saw it, the damage was done.
I went looking for a tool that would let me set a hard daily limit per agent — something that would block the call before it ever reached OpenAI. I couldn't find one.
So I built it.
The problem with AI agents and money
When you build with AI APIs, you're essentially writing a blank check. Your agent makes calls, OpenAI charges you, and you find out later. There's no circuit breaker. There's no per-agent budget. There's no "stop after $10."
Soft limits and billing alerts exist, but they notify you after the money is gone.
What I needed was a hard block. Something that intercepts the call and returns an error before it reaches the API.
What AWX Shredder does
It's a proxy. Instead of your agent calling api.openai.com directly, it calls your AWX endpoint. AWX checks the agent's daily budget, and either forwards the call or blocks it with a 402.
Setup is two lines:
OPENAI_BASE_URL=https://awx-shredder.fly.dev/proxy/v1
OPENAI_API_KEY=your_awx_key
You create agents in a dashboard, set a daily budget per agent, and that's it. Every call is logged. When an agent hits its limit, calls stop — not after, not eventually, right then.
Why per-agent matters
Most billing tools are org-level. You get one limit for everything.
But in a real system you might have five agents running at once — a researcher, a writer, a code reviewer, a scraper, a scheduler. If one goes rogue, you want to block that agent, not your whole org.
AWX gives each agent its own daily budget. One agent burning money doesn't affect the others.
It works with Claude too
Not just OpenAI. Point your Anthropic client at /proxy/v1/messages and the same budget enforcement applies.
Try it
It's free to start: awx-shredder.fly.dev
If you've ever had an unexpected AI bill, or you're building agents and want to sleep at night — this is for you.
I'm building this in public. Follow along if you want to see how it grows.
Top comments (0)