Paste a script into the browser DevTools console and get an agent that runs JavaScript in the page and reads the console, driven by the pi coding agent library.
llm.jsis pasted into the page. It defines thellmtagged template, captures console output, and runs the agent's tool calls.server.jsis a local Node server. It hosts the pi agent loop and talks to the page over a WebSocket on 127.0.0.1:8787.- The model gets two tools:
eval_js(run code in the page) andread_console(recent console entries). It has no shell or filesystem access.