frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: AgentFuse – A local circuit breaker to prevent $500 OpenAI bills

https://github.com/AbdulBasitA/agent-fuse
3•abdulbasitali•2h ago
Hey HN,

I’ve been building agents recently, and I hit a problem: I fell asleep while a script was running, and my agent got stuck in a loop. I woke up to a drained OpenAI credit balance.

I looked for a tool to prevent this, but most solutions were heavy enterprise proxies or cloud dashboards. I just wanted a simple "fuse" that runs on my laptop and stops the bleeding before it hits the API.

So I built AgentFuse.

It is a lightweight, local library that acts as a circuit breaker for LLM calls.

Drop-in Shim: It wraps the openai client (and supports LangChain) so you don't have to rewrite your agent logic.

Local State: It uses SQLite in WAL mode to track spend across multiple concurrent agents/terminal tabs.

Hard Limits: It enforces a daily budget (e.g., stops execution at $5.00).

It’s open source and available on PyPI (pip install agent-fuse).

I’d love feedback on the implementation, specifically the SQLite concurrency logic! I tried to make it as robust as possible without needing a separate server process.

Comments

dmarwicke•1h ago
had this happen with a retry loop. hit $80 on anthropic before i caught it. how does this handle retries? seems like an agent could just keep retrying and blow past the limit
abdulbasitali•55m ago
That is exactly why we enforce a hard budget cap (default is $1.00).

The system runs a pre-flight check before every LLM call. If you're about to go over budget, it kills the process immediately (SentinelBudgetExceeded).

We don't have a specific "max retries" counter wired up yet, but I'll likely add that soon based on your feedback. For now, the budget cap would have caught it at $1.

TwisterJS – Tiny Modules for Indie Game Developers

https://twisterjs.com/
1•heroku•50s ago•0 comments

How We Found Out About COINTELPRO

https://monthlyreview.org/articles/how-we-found-out-about-cointelpro/
1•bryanrasmussen•1m ago•0 comments

How Pfizer ended up passing on my GLP-1 work back in the early '90s

https://www.statnews.com/2024/09/09/glp-1-history-pfizer-john-baxter-jeffrey-flier-calbio-metabio/
1•rajlego•1m ago•0 comments

Contact the ISS

https://www.ariss.org/contact-the-iss.html
1•logikblok•2m ago•0 comments

JavaScript creator warns against "rushed web UX over native" for Windows 11

https://www.windowslatest.com/2025/12/27/javascript-creator-warns-against-rushed-web-ux-over-nati...
1•thunderbong•8m ago•0 comments

Show HN: HookVerify – Webhook delivery visibility for production systems

https://hookverify.com
1•phntmdz•9m ago•0 comments

CVE-2025-68260: rust_binder: fix race condition on death_list

https://lore.kernel.org/linux-cve-announce/2025121614-CVE-2025-68260-558d@gregkh/T/#u
1•Khaine•13m ago•0 comments

In 1995, a Netscape employee wrote a hack in 10 days that now runs the Internet

https://arstechnica.com/gadgets/2025/12/in-1995-a-netscape-employee-wrote-a-hack-in-10-days-that-...
2•taubek•14m ago•0 comments

Show HN: Runtime data provenance for AI pipelines

https://github.com/clay-good/origin
1•hireclay•15m ago•0 comments

A complete implementation of bash in TypeScript designed to be used by AI agents

https://github.com/vercel-labs/just-bash
2•tilt•20m ago•0 comments

Say No to Palantir in the NHS

https://notopalantir.goodlawproject.org/email-to-target/stop-palantir-in-the-nhs/
5•_____k•22m ago•0 comments

Show HN: LLM-powered data extraction from messy spreadsheets

https://github.com/mehdigmira/tablereader
1•mehdig10•22m ago•0 comments

VS Code Local Extensions

https://hubelbauer.net/vscode-local-extensions/
2•tomashubelbauer•22m ago•0 comments

Richard Stallman at the First Hackers Conference in 1984 [video]

https://www.youtube.com/watch?v=Hf2pfzzWPYE
2•schmuckonwheels•22m ago•0 comments

Show HN: 3D Factorization Diagrams

https://suvakov.github.io/vibes/3DFactorizationDiagrams/index.html
1•msuvakov•22m ago•0 comments

Show HN: MCP server for vibration-based predictive maintenance

https://github.com/LGDiMaggio/predictive-maintenance-mcp
1•lgdimaggio•23m ago•1 comments

How to Deconstruct Almost Anything My Postmodern Adventure

https://www.fudco.com/chip/deconstr.html
1•_____k•24m ago•0 comments

Ask HN: I'm bored, what should I build

2•SpyCoder77•26m ago•1 comments

Port of Statistical Rethinking (2nd edition) code to Julia

https://shmuma.github.io/rethinking-2ed-julia/
2•samuel2•26m ago•0 comments

Expense splitter – an MCP server for splitting group expenses

https://github.com/vnaveen-mh/expense-splitter
1•vnaveen9296•28m ago•0 comments

An Ounce of Silver Is Now Worth More Than a Barrel of Oil

https://www.wsj.com/finance/commodities-futures/an-ounce-of-silver-is-now-worth-more-than-a-barre...
3•bookofjoe•30m ago•2 comments

Legal sports betting linked to sharp increases in violent crime

https://news.rice.edu/news/2025/legal-sports-betting-linked-sharp-increases-violent-crime-study-f...
9•geox•32m ago•0 comments

Goodbye SASS

https://www.redblobgames.com/blog/2025-12-27-goodbye-sass/
1•ingve•35m ago•0 comments

White House pushes to dismantle leading climate and weather research center

https://www.pbs.org/newshour/show/white-house-pushes-to-dismantle-leading-climate-and-weather-res...
35•Teever•36m ago•2 comments

Show HN: Gcommit – clustering code changes semantically

https://github.com/yp583/homebrew-custom-git
1•yp583•37m ago•0 comments

LLMs in Programming

https://blog.danieljanus.pl/2025/12/27/llms/
2•todsacerdoti•38m ago•0 comments

GenAI.mil Is Live. Now Comes the Hard Part: Building the Digital NCO Corps

https://benvanroo.substack.com/p/genaimil-is-live-now-comes-the-hard
1•iddan•38m ago•0 comments

In the Works

1•xalu•40m ago•0 comments

1Password Dependency Breaks Syntax Highlighting

https://borretti.me/article/1password-dependency-breaks-syntax-highlighting
3•froober•46m ago•0 comments

Iran 'Violently' Arrests Nobel Peace Prize Winner Narges Mohammadi

https://www.france24.com/en/live-news/20251212-iran-arrests-nobel-peace-prize-winner-narges-moham...
2•wslh•52m ago•0 comments