frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: AG2B – Run the agent loop in the browser, expose your tools via WebMCP

https://ag2b.ai/docs
2•notmedia•57m ago
Hello everyone,

TL;DR

Live demo: https://ag2b-example.vercel.app

Working on different projects, especially in B2B, I am getting the same request more and more often - "Add an AI feature, yesterday!" Most agent frameworks I found run the runtime on the server - and that pulls in a whole stack. Both backend and frontend have to learn how that runtime works and adopt its SDKs. The server turns into an orchestrator carrying most of the logic. For a feature that's really just "automate what the app already does, and add a brain," I kept asking the same thing: do we actually need all of that and how to ship these AI features faster?

AG2B (Agent to Browser) is my research on this question. The agent loop runs in the browser, where your app already is. Tools (the first primitive) are just your existing client functions (store actions, click handlers, whatever you already wrote), so there's no second tool registry and no contract to negotiate between the frontend and backend. The server shrinks (but not limited) to a thin proxy that keeps your API key out of the bundle plus optionally gates with user's permissions.

Because the loop runs where the UI lives, each turn can carry a fresh snapshot of what the user sees and can do right now. Scopes (the second primitive) re-inject live context on every iteration - into the system or user prompt, your choice. The model sees what's actually on screen right now. Nothing stale, zero roundtrips and clear context for the LLM.

On security take, does it secure? The LLM can only call the tools you delegate, and those tools are your existing handlers which already hit authenticated, permission-checked endpoints. A tool call goes through the same gates a user or frontend logic goes through.

What about existing server-side runtimes? Actually they can coexist. With AG2B you can write your own tool or custom provider which interacts with these endpoints.

There are some alternatives to run the agent in browser like working with DOM. That also works, but you pay for it a lot - parsing html and DOM operations are more expensive (tokens, bundle size) than telling LLM what it can do and provide a filtered context.

Two cases I built it for:

1. General app automation - a tiny LLM proxy + good prompting + your existing frontend logic wrapped with small primitives = the assistant can drive the app.

2. Domain tasks - e.g. "turn this question into a SQL query" over a big proprietary BI model. A fine-tuned/prompted model that knows the schema + an endpoint to hit it + one Tool - and you get the result.

It's plain TypeScript, provider-agnostic (OpenAI/Anthropic built in, or your own), with a hook system to observe/intercept every step (human-in-the-loop approvals, guardrails, RAG) and React bindings - headless hooks or a drop-in chat. Vue is coming.

There is also a plugin system. For example I created a WebMCP plugin which exposes your agent's tools through the browser API - which already could be tested in Chrome.

Repo: https://github.com/ag2b/ag2b

Docs: https://ag2b.ai

Lawmakers propose banning all U.S.-Chinese research collaborations

https://www.science.org/content/article/lawmakers-propose-banning-all-u-s-chinese-research-collab...
1•ceejayoz•21s ago•0 comments

Why AI-generated draw.io AWS diagrams have empty squares (and a fix)

https://github.com/vidanov/aws-architecture-diagram-skill
1•vidanov•30s ago•0 comments

Know Your Point C

https://pointc.co/know-your-point-c/
1•benwerd•37s ago•0 comments

How should we think about Starship?

https://mceglowski.substack.com/p/how-should-we-think-about-starship
1•simonebrunozzi•1m ago•0 comments

Bare: Small and modular JavaScript runtime for desktop and mobile

https://github.com/holepunchto/bare
1•janandonly•2m ago•0 comments

Show HN: Scan your AI agent's code for tool calls with no checks

https://github.com/Diplomat-ai/diplomat-agent-ts
1•jguarnelli•2m ago•0 comments

Malware dev tries to steal Claude users secrets NPM slop, leaks own GitHub token

https://www.theregister.com/cyber-crime/2026/05/27/supply-chain-brain-drain-npm-attacker-foolishl...
1•Bender•4m ago•0 comments

Taste Is Necessary but Not Sufficient When Working with Agents

https://www.ssp.sh/brain/having-taste-with-ai/
2•zazuke•4m ago•0 comments

Show HN: Open-source alternative to Codex Chronicle, using Apple's local OCR

https://github.com/familiar-software/familiar
2•talsraviv•5m ago•0 comments

Where Are the Economies of Scale in Homebuilding?

https://www.construction-physics.com/p/where-are-the-economies-of-scale
2•crescit_eundo•6m ago•0 comments

Why does it take so long to mend an escalator? (2002)

https://www.lrb.co.uk/the-paper/v24/n05/peter-campbell/why-does-it-take-so-long-to-mend-an-escalator
2•downbad_•6m ago•0 comments

Vibe Gets to Work

https://mistral.ai/news/vibe-agent/
2•hacb•6m ago•0 comments

Never Pay for Claude

https://github.com/RyanKung/rotom
4•ryankung•7m ago•2 comments

How to avoid being outsourced or open sourced (2008)

https://www.johndcook.com/blog/2008/02/12/how-to-avoid-being-outsourced-or-open-sourced/
3•tapanjk•8m ago•0 comments

SpaceX-Stasy

https://substack.com/@edwardelson/p-199273735
2•simonebrunozzi•8m ago•0 comments

The Long, Bitter Fight at the Park Slope Food Co-Op

https://www.nytimes.com/2026/05/28/nyregion/the-long-bitter-fight-at-the-park-slope-food-co-op.html
2•brandonb•8m ago•0 comments

Check our new AI developer tool and please REVIEW

https://github.com/pwnaxe/squick
2•TrueSTRX•9m ago•0 comments

En Svensk Tiger

https://en.wikipedia.org/wiki/En_svensk_tiger
2•verandaguy•9m ago•0 comments

Company CEO flooded file share with smut, called for help after he deleted it

https://www.theregister.com/security/2026/05/28/company-ceo-flooded-file-share-with-smut-called-f...
2•Bender•10m ago•0 comments

Under the River

https://shopify.engineering/under-the-river
3•burke•10m ago•0 comments

AI hiring algorithms reject Black, Asian job seekers at higher rates

https://www.theregister.com/ai-ml/2026/05/27/ai-hiring-algorithms-reject-black-asian-job-seekers-...
2•Bender•10m ago•1 comments

Blood pressure tech floods the market after FDA relaxes wearables oversight

https://www.statnews.com/2026/05/28/fda-wellness-guidance-unvetted-blood-pressure-tech-floods-mar...
2•brandonb•10m ago•1 comments

Ask HN: Did forums solve what Discord and Reddit still don't?

4•tolarianwiz•11m ago•0 comments

Vc: SIMD Vector Classes for C++

https://github.com/vcdevel/vc
2•tosh•11m ago•0 comments

Five contributions to a project: money, effort, attention, memory and wisdom

https://improvesomething.today/five-contributions-to-a-project/
2•surprisetalk•11m ago•0 comments

France's parliament votes to repeal slavery-era "Black Code" laws

https://www.washingtonpost.com/business/2026/05/28/france-slavery-law-code-noir-repeal/220dedaa-5...
2•nkg•11m ago•0 comments

NPM staged publishing setup with approximately one click per package

https://lavamoat.github.io/stageclicker/
3•naugtur•12m ago•0 comments

Marines turn to modified Call of Duty 4 to train new sergeants

https://www.stripes.com/branches/marine_corps/2026-05-22/call-of-duty-4-marines-sergeants-school-...
2•randycupertino•12m ago•0 comments

Online Go Server

https://online-go.com
3•k2enemy•13m ago•0 comments

Yvon Chouinard: the existential dirtbag who founded and gifted Patagonia

https://www.theguardian.com/global/2022/sep/15/yvon-chouinard-the-existential-dirtbag-who-founded...
2•dtj1123•14m ago•0 comments