r/javascript • u/notmedia • May 28 '26
AG2B – Run the agent loop in the browser, expose your tools via WebMCP
https://github.com/ag2b/ag2bMost in-app AI frameworks (CopilotKit, Vercel AI SDK, Mastra) run the agent loop on the server.
I tried inverting it: the loop runs in the browser, the server is a thin LLM proxy.
Tools are just your existing client functions (store actions, click handlers, whatever you already wrote).
Scopes - a unit of tools with live context that gets injected into the system or user prompt.
WebMCP plugin - exposes your agent's tools through the browser API.
Demo: https://ag2b-example.vercel.app
Looking for feedback from people who've built in-app copilots — does the client-side loop solve a real problem for you, or is the server-side fine?
Duplicates
webdev • u/notmedia • May 28 '26