Skip to main content
blog.philz.dev

Itsy Bitsy Agent Bookmarklet (or, adding an agent to a PyBricks simulator)

As we recall from my earlier post, an agent is just 9 lines of code. So, I built my own agent (by instructing the sketch coding assistant to follow my blog post!), that embeds itself in any web page via a bookmarklet. Content-Security Policy headers can prevent it from working.

You bring your own Anthropic API key (which I promise not to steal, though the target web page could, with some effort), and, voila.

Try it at this link: The Itsy Bitsy Agent Bookmarklet.

This demos well with a video, in which we give a Lego simulator an agent.

Saying that "I built" this is a bit of exaggeration. I used a variety of LLM Coding Agents, but mostly the one I work on, Sketch, with Claude Sonnet 4.0 as the underlying model.