MurphyA/hacker-news huggingface dataset:
Show HN: AgentBudget – Real-time dollar budgets for AI agents
by sahiljagtapyc | 2026-02-24 05:46:17+00:00
Hey HN,

I built AgentBudget after an AI agent loop cost me $187 in 10 minutes — GPT-4o retrying a failed analysis over and over. Existing tools (LangSmith, Langfuse) track costs after execution but don't prevent overspend.

AgentBudget is a Python SDK that gives each agent session a hard dollar budget with real-time enforcement. Integration is two lines:

import agentbudget
agentbudget.init("$5.00")

It monkey-patches the OpenAI and Anthropic SDKs (same pattern as Sentry/Datadog), so existing code works without changes. When the budget is hit, it raises BudgetExhausted before the next API call goes out.

How it works:

- Two-phase enforcement: estimates cost pre-call (input tokens + average completion), reconciles post-call with actual usage. Worst-case overshoot is bounded to one call.
- Loop detection: sliding window over (tool_name, argument_hash, timestamp) tuples. Catches infinite retries even if budget remains.
- Cost engine: pricing table for 50+ models across OpenAI, Anthropic, Google, Mistral, Cohere. Fuzzy matching for dated model variants.
- Unified ledger: tracks both LLM calls and external tool costs (via track() or @track_tool decorator) in a single session.

Benchmarks: 3.5μs median overhead per enforcement check. Zero budget overshoot across all tested scenarios. Loop detection: 0 false positives on diverse workloads, catches pathological loops at exactly N+1 calls.

No infrastructure needed — it's a library, not a platform. No Redis, no cloud services, no accounts.

I also wrote a whitepaper covering the architecture and integration with Coinbase's x402 payment protocol (where agents make autonomous stablecoin payments): https://doi.org/10.5281/zenodo.18720464

1,300+ PyPI installs in the first 4 days, all organic. Apache 2.0.

Happy to answer questions about the design.
by defrost | 2026-02-24 05:47:02+00:00
.. and the farmers with firmware experience?

"Farmers" aren't a monolithic lump of homogenous yokels with straw sticking out their teeth.

The Ukranian farming community birthed cracked and reverse engineered John Deere software now being uploaded into US tractors by US farmers to bypass kill switches, for custom addons, data retention, etc.

#NotAllFarmers are SWEs, great welders, advanced diesel mechanics, pilots, ... but all these skillsets are within or closely adjacent to farming communities.
by rmunn | 2026-02-24 05:47:08+00:00
This. The following question is likely to fool a lot of people, too. "I have a rooster named Pat. (Lots of other details so you're likely to forget Pat is a rooster, not a hen). Pat flies to the top of the roof and lays an egg right on the ridge of the roof. Which way will the egg roll?"

But if you omit the details designed to confuse people, they're far less likely to get it wrong: "I have a rooster named Pat. Pat flies to the top of the roof and lays an egg right on the ridge of the roof. Which way will the egg roll?"

It's not about reasoning ability, it's about whether they were paying close attention to your question, or whether their minds were occupied by other concerns and didn't pay attention.
by ddtaylor | 2026-02-24 05:47:28+00:00
Starcraft 1 is well known for having an absurdly hacked together pathfinding algorithm that almost stopped the game from shipping and the bugs it created are now expected mechanics of that game, such as "worker drilling", where players can pop through specific arrangements of buildings and units.

They also make heavy use of pre-computed pathing maps (Dijkstra) and place restrictions on how that pathing map can be changed.

It's also worth mentioning it's not just the pathing that is single threaded, it's ALL of the game logic, since it all has to be deterministic. All players must agree on the input, then run ALL of the game logic with the same inputs and same deterministic functions so that they agree on the game state without having to synchronize it.

I don't really know 0ad well enough to know if the game logic is more complex than Starcraft or Age of Empires.

Also, both Starcraft and Age of Empires have struggled with lag once above the unit counts. AoE in specific has always had a lot of lag once players start to get full armies. There are well known patches for Age of Empires 2 before the Definitive Edition (DE) where people just hand optimized the binary and figured it out.
by simoncion | 2026-02-24 05:47:53+00:00
> Perhaps your argument is in good faith, and factually correct, but for one of you there may be 10,000 bots. ... How can you make a good faith argument [in this scenario?]

In exactly the same way urban dwellers made cogent, good faith arguments back in the late 1800s when one could never hope to keep up with the pace of printed material available for sale, and there were far, far more people speaking in the area than one could have a conversation with in a day, let alone half a year.

Falsehood flies, and the truth comes limping after it.

is from the 1700s. I expect there have been variations on that sentiment [0] expressed for as long as there have been humans capable of using spoken language.

> How do you address lies with truth if the distribution of lies and truth is uncontrollable?

The same way you have for the last two-hundred and fifty years.

> The example of Russia has nothing to do with freedom of speech.

I'm aware. That's why I dragged the conversation back on topic.

> This quite a reach. [sic]

When put into its surrounding context, it is a plain statement of fact and reasonable assessment of the situation.

[0] and the essay that contains that sentiment
by k310 | 2026-02-24 05:48:14+00:00
Haven't people done this before? Back in the 80's one of our "team" members (I use the term loosely) would reverse engineer the day's code every evening, rendering it unreadable to everyone else who created it.

Of course, nobody these days asks "why?"

If it ain't broke ...

Banks have tons of money (OPM!) and IMO, could rewrite legacy code, but

why?
by StopDisinfo910 | 2026-02-24 05:48:17+00:00
> It also bans jailbreaking/rooting your device, and requires GooglePlay Services/IOS equivalent be installed to "prevent tampering".

The EUDI spec is tech neutral.

What the EUDI mandates is a high level of assurance under the eIDAS 2.0 regulation and the use of a secure element or a trusted execution environment to store the key.

The amount of upvoted disinformation in this thread is staggering.
by overfeed | 2026-02-24 05:48:36+00:00
> There are good crates for core things like cryptography

Speaking of cryptography, I've given up on setting up a Termux Python dev environment on an old Arm tablet, because some package has a dependency on the 'cryptography' module, which apparently requires the whole Rust toolchain to build. In a Python project. On a platform with limited storage. The documentation suggests pre-built binaries are an option, but I couldn't figure it out the last few times. It left me with a bad taste in my mouth.
by k310 | 2026-02-24 05:48:49+00:00
repost:

Haven't people done this before? Back in the 80's one of our "team" members (I use the term loosely) would reverse engineer the day's code every evening, rendering it unreadable to everyone else who created it.

Of course, nobody these days asks "why?"

If it ain't broke ...

Banks have tons of money (OPM!) and IMO, could rewrite legacy code, but

why?
by fortzi | 2026-02-24 05:50:48+00:00
In this case, it’s the most inefficient genocide anyone has ever seen.

Instead of looking at the crap that comes out of the mouths of this horrible government, look at what actually happened. Israel had everyone rallied up, yet they were not exterminated en mass like you and other commenters are saying.

The death toll in this war is a result of Hamas and their supporters taking advantage of the population to protect themselves and cause people like you to speak against Israel [1].

[1] https://nypost.com/2024/06/11/hamas-leader-yahya-sinwar-beli...
by igor47 | 2026-02-24 05:51:56+00:00
Back in the day, I thought about this problem domain a lot! I even wrote and open-sourced a service discovery framework called SmartStack, an early precursor to later approaches like Envoy, described here: https://medium.com/airbnb-engineering/smartstack-service-dis...

This was a client side framework, in the OPs parlance. What's missing in OP is the insight that the server-side load balancer can also fail -- what will load balance the load balancers? We performed registration based on health checks from a sidecar, and then we also did client side checks which we called connectivity checks. Multiple client instances can disagree about the state of the world because network partitions actually can result in different states of the world for different clients.

Finally, you do also still need circuit breakers. Health checks are generally pretty broad, and when a single endpoint in a service begins having high latency, you don't want to bring down the entire client service with all capacity stuck making requests to that one endpoint. This specific example is probably more relevant to the old days of thread and process pools than to modern evented/async frameworks, but the broader point still applies
by svat | 2026-02-24 05:53:19+00:00
See also Terence Tao's comments at https://terrytao.wordpress.com/2022/05/10/partially-specifie... which say things even more strongly (I had collected a link to it at https://shreevatsa.wordpress.com/2014/03/13/big-o-notation-a...):

> The symbol ∈ only is a viable solution in a portion of the use cases. For instance, an assertion such as O(n)⋅O(n) = O(n²) would not be correctly describable as O(n)⋅O(n) ∈ O(n²). Perhaps O(n)⋅O(n) ⊂ O(n²) would be defensible, but now one has to devote a non-trivial amount of thought into deciding which of the connectives =, ∈, ∋, ⊂, ⊃ to use in a given context. For instance the assertion “Since sin(y) = sin(x) + O(|y−x|), we have sin(x+O(1/n)) = sin(x) + O(1/n)” would now become “Since sin(y) ∈ sin(x) + O(|y−x|), we have sin(x+O(1/n)) ⊂ \sin(x) + O(1/n)”. Using the equality sign for all of these use cases instead is more intuitive and corresponds more closely to how the verb “is” (“to be”) is actually used in mathematical English.

and

> … Nevertheless most of us still often think in mereological terms rather than set-theoretic or first-order terms […] without requiring translation to set theory or first order logic; indeed, such a translation would only serve to slow that mathematician down as he or she would usually have translate it back into mereological form in order to wield it effectively. Because of this, I think it is worth adjusting our notational conventions to more closely align with our actual thought processes… I don’t see much advantage in interpreting each instance of the O() notation in the exponential type bound f(n) = O(\exp(O(nᴼ⁽¹⁾))) or the calculation (1 + O(1/n))ᴼ⁽ⁿ⁾ = \exp(O(1/n)⋅O(n)) = \exp(O(1)) = O(1) (for n sufficiently large), in terms of ideals.
by toomanyrichies | 2026-02-24 05:53:26+00:00
They were literally taking tourist photos in front of the "Alligator Alcatraz" sign. [1][2][3]

They knew what they were voting for. The cruelty (and the authoritarianism) is the point.

1. https://theday.com/photo-single/1006536/?mode=team

2. https://www.gettyimages.com/detail/news-photo/people-take-pi...

3. https://www.wusf.org/courts-law/2025-12-22/attorneys-urge-ju...
by sparky_z | 2026-02-24 05:53:32+00:00
By the same reasoning, why on earth would a person sincerely ask you that question unless the car that they want to wash is either already at the car wash, or that someone is bringing it to them there for some reason?

If it's as unambiguous as you say, then the natural human response to that question isn't "you should drive there". It's "why are you fucking with me?" Or maybe "have you recently suffered a head injury?"

If you trust that the questioner isn't stupid and is interacting with you honestly, you'd probably just assume that they were asking about an unusual situation where the answer isn't obvious. It's implicitly baked into the premise of the question.
by veganmosfet | 2026-02-24 05:53:38+00:00
I experimented with OpenClaw (using opus4.6 and gpt5.2) and found this interesting way to get silent Remote Code Execution via email when using Gmail pub/sub Hook, exploiting prompt injection (out of scope from the security policy of OpenClaw) and insecure plugin design (properly documented as such). Works only with the full Gmail pub/sub hook. If your agent uses gogcli without the webhook, it is not affected.

Main issue: OpenClaw injects untrusted content in user messages instead of using the tool channel (less authoritative) when using the Gmail webhook.

Original links:

https://veganmosfet.codeberg.page/posts/2026-02-02-openclaw_...

https://veganmosfet.codeberg.page/posts/2026-02-15-openclaw_...
by SadWebDeveloper | 2026-02-24 05:53:57+00:00
There are no contextual bias, the goal of the prompt is very explicit and not about probabilistic patterns, but about the models transformer layers dynamically assigning greater weight to words like "meters" (distance) than to other tokens in the prompt.

This should be fixed in the reasoning layer (the inner thoughts or chain-of-thought) were the model should focus on the goal "I Want to Wash My Car" not the distance and assign the correct weight to the tokens.
by MadxX79 | 2026-02-24 05:55:06+00:00
There's really two cases here.

You live in a democracy?

YES) the violation you describe is verifiable to a journalist. You publish story, and you keep the government accountable.

NO) Why are you even discussing if age verification is a good idea or not, you freak. It's not really up to you anyway. Go fix your country first.
by bhasinanant | 2026-02-24 05:55:23+00:00
Gemini 3.1 Pro isn't necessarily the next frontier Coding model, but it is still an amazing model.
Everyone has taken note of it's crazy good svg skills, but I had an idea to test this further. I needed to create a launch video for a project, and had this idea of an ongoing story going on in the background of the content, with a one-shot video of a person going about the daily office grind.
When Gemini 3.1 Pro came out, I decided to try to make an animated version of it first.

So, the stack for this process looks like:
1. AI Studio Build. Very quick, great scaffolding. Already aware of React Motion and other related helpful libraries.
2. Gemini 2.5 TTS
3. OpenShot to compile the video and the audio together.

Manual work needed:
1. Getting the script together. Actually also done using Gemini in the Gemini Web App. Recorded a walkthrough of my application, and just asked it to go from there.
2. Adjusting the time allotted to each of the scenes. AIStudio created the scenes pretty well, but they followed the time durations in the ideal script. This needed to be modified to be synced with the generated Audio. Needed just one prompt though.
3. Recording the Animation. Go Full Screen. OBS Studio Recording the window. Animation runs on autoplay, and hides the player controls. Move mouse to another screen. Record and Reload page to start from 0:00.
4. Compiling the shot and audio together. New Project in OpenShot. Bring resources in. Clip Video to start and end at the correct spots. Audio is already synchronized. Export.

Total money spent: 0$

Additional Insight: I initially forgot to switch the model, and got a Gemini 3.0 generation instead. Needless to say, that chat was a lot more cumbersome and the result a lot less appealing.

I am so happy with the result that it just seems obvious to build a wrapper that does all of the steps from recording to editing for you, but would love to hear what everybody else thinks.
by cryptonector | 2026-02-24 05:55:54+00:00
Eh, some people can work on moving to Rust, while others work on adding dynamic linking to Rust.

Or maybe we can some how get used to living with static linking. (I don't think so, but many seem to think so in spite of my advice to the contrary!)

Another possibility is to use IPC as the dynamic linking boundary of sorts, but this will consume lots more memory, and as is stated elsewhere in this thread, memory ain't cheap no more.
by resfirestar | 2026-02-24 05:57:10+00:00
Have to disagree.

> It’s more that the shortest path between A and B isn’t repeating all of the same work.

I'm sure some would say the same about the data used to train the frontier LLMs, they could have, should have, or would have used different data or synthetic data or whatever if copyright rulings had gone differently. Doesn't address the actual mechanics of how that would have happened, like any counterfactual it's almost certainly not that simple.

> Further, although media likes to depict Chinese labs as “just copying” I think there’s a ton of hubris involved

Agree with this, obviously what they're doing is a lot more involved than simply "copying" or "stealing".

> First of all, American labs are filled with Chinese who are trained at the very same schools as Chinese labs. Second, if you look at the contributions from Chinese labs many have pushed the state of the art.

This is getting back into points about ethics which is specifically what I was not trying to address, I'm just saying it makes me less impressed with the follower labs' work than I would be if they were reaching their current capabilities without heavily using the frontier labs' output. And the ethical point seems really dubious anyway, IP and contract law obviously still applies to America and China even though they have good universities.
by ggm | 2026-02-24 05:57:23+00:00
I wish there was a HN flag for sarcasm. I guess the intent is that it's a gating function, "you have to be this tall to understand my humour" thing.

I don't have to pic and chose who I hate, in the world of AI product offerings. I have a lot of hate, and can spread it evenly, or in clumps, depending on my mood.
by samrus | 2026-02-24 05:57:45+00:00
The critical part of software engineering, verifiability and correctness, is still something AI cant do properly at all. And by that i dont mean testing software against a test suite, i mean making a good and extensive test suite to build software against

Given that, the farmer or vibe coder is still going to have to take responsibility for making sure the software is verifiable and correct. Thats a heavy responsibility with a huge peice of machinery like this, its naive to equate that with making sure your todo list app or even c compiler works.

The economic calculus still means its better for an corporation to take on that responsibility, and be compensated for it. Now we just need that corporation to not be rent seeking dicks, and we could have a good thing going
by beagle3 | 2026-02-24 05:58:12+00:00
For most non-hobby project, the cost of code was in breaking a working system (whether by a bona fide bug, or a change in some unspecified implicit assumption). That made changes to code incredibly expensive - often much more than the original implementation.

It sounds harsh, but over the lifetime of a project, 10-lines/person/day is often a high estimate of the number of lines produced. It’s not because humans type so slow - it is because after a while, it’s all about changing previously written lines in ways that don’t break things.

LLMs are much better at that than humans, if the constraints and tests are reasonably well specified.
by catlikesshrimp | 2026-02-24 05:58:47+00:00
God forbid men abandoned their families (children, wives) for selfish reasons. But they still do. It is not cool to be a single mother without a career, because you wanted women to be housewives by profession.

Take a tour in Afganistan. I heard they just enacted a law for beating housewives.
https://htnworld.com/taliban-afghanistan-domestic-violence-l...
by ggm | 2026-02-24 06:00:03+00:00
I fed the abstract into an AI with the prompt:

can you give me a critique of https://arxiv.org/abs/2602.16291 from the point of view of a functional programmer who is skeptical

and I liked the answer. I won't post it here, because I think AI answers are generally noise and quite tiresome, but there is one sentence which stuck in my mind:

The extraordinary breadth of the claims calls for an extraordinary level of rigor in the proofs.

I am btw, NOT a functional programmer. But, I am skeptical.
by vincentvandeth | 2026-02-24 06:01:02+00:00
You're right that no model handles everything in one context window — that's exactly why I built context rotation. Each task runs in a single agent context (one responsibility, clear scope), and when the window fills up, the system automatically rotates: writes a structured handover, clears, and resumes in a fresh window.

The key distinction: sub-agents run within a parent context with shared state (black box). My approach uses independent parallel agents (separate terminals, separate context windows) that report back to an orchestrator. Large tasks get split into smaller dispatches upfront — each scoped to fit a single context window. The orchestrator can dispatch research to 3 agents in parallel, collect their outputs, then dispatch a synthesis task to a single agent that merges the findings.

So it's not "one context window for everything" — it's right-sized tasks with full observability per agent, and a governance layer managing the sequence and merging results.
Downsizing Is Bonkers?
by downsizer | 2026-02-24 06:01:04+00:00
I see lots of postings (not here but in the 'interwebs') about how to downsize (housing).

However, seems like all the 'info' is from the real-estate industry.

Looking for comment on the proposition:

'downsizing' works if and only if you are taking money off the table.
by samrus | 2026-02-24 06:01:48+00:00
You sound naive and people are mocking you, but honestly who knows. Maybe theres nothing holding this back other than AI skepticism.

The proper way to find out is to get some peice of heavy machinery and try it out. Maybe not a tractor neccesarily, but something that presents a similar quality of risks, even if at a smaller scale. Maybe a forklift?

I think its a bad idea so i wont do it, but why dont you?
by j_bum | 2026-02-24 06:01:51+00:00
Claude is so much better for proofing, IMO.

Over the last few years I’ve rotated between OpenAI and Anthropic models on about a 4-5 month cycle. I just started my Anthropic cycle because of my annoyance with the GPT-5.2 verbosity

In four months when opus is annoying me and I forget my grievances with OpenAI’s models and switch back, I’ll report back lol.
I got tired of how bloated design tools have became.
by epic_ai | 2026-02-24 06:01:55+00:00
I’ve noticed that mainstream design tools are getting incredibly powerful, but also super overwhelming. If you just want to make a quick poster, certificate, or social media graphic, you end up navigating through hundreds of menus, complex features, and premium upsells.

I just wanted something where I could: Pick a template -> Edit the text/images -> Download -> Done.

Since I couldn't find a minimalist tool that did just that, I built it. It’s called EPIC.

Here’s what it does:
* *Ready-made templates:* Focused on the basics (flyers, certificates, presentations).
* *Zero learning curve:* A completely stripped-down manual editor (with an optional AI mode if you want it).
* *No friction:* It runs entirely in your browser. Get in, make your design, and get out.

I originally built this with students in mind, but I think anyone who gets frustrated by heavy design software might find it useful.

I’m currently getting a trickle of organic traffic, but before I try to scale this, I need to know if the core product is actually good. I’d genuinely appreciate your brutal, honest feedback on:
1. The UX/usability (Is it actually as simple as I think it is?)
2. The quality of the current templates.
3. What features are strictly missing for your basic workflows.

You can try it out here:

https://no-edit.lovable.app

Thanks in advance for the feedback!