Skip to content

Show HN: Building AI agents client-side JavaScript

1 pointstephenblum2 comments
On HN

Hey HN, most agent systems default to server-side Python inside containers and chain frameworks. I wanted to see how far we could push agent in the browser with vanilla JavaScript https://buttercup.sh

The reason this is interesting is because agent loops in the browser keeps infrastructure costs low. No need for proxy or API calls. And ollama/vLLM can be used for 100% offline. Also WebLLM for embedded. We need to consider CORS, API keys for remote models, access to visual state, and handling remote tool calls. I am working on a guide with references in vanilla JS. This is a short-lived guide starting mid-September with weekly topics.

Draft topics starting mid-September:

In-Browser Loops: Function calling, and deterministic multi-turn loops running purely in the browser runtime. Vision (Multimodal): Capturing viewport screenshots using browser APIs. Remote Agent Access & Transports: Connecting the in-browser agent to remote agents. Multi-Agent Coordination: Lightweight client-side agent, specialist delegation, and running concurrent sub-agents.

Comments

so local, but with cors, api keys and remote calls? who is this for? people who have a powerful pc but want nothing on their own device?

that is the strongest point I've heard. who would this be for? Replit, Bolt.new and Lovable are mostly-in browser vibe code engines. Target audience would be for a free local version alternatives. Though maybe that isn't something that anyone needs.

The original intent for this project is for learning how to build agents, and finding what are the limits in the browser. Especially now that we have WebLLM. Maybe we can find a use for it with local agents

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.