Magnus Muller's Event-Driven Agent Architecture
Table of content

Magnus Muller is a software developer and startup founder who co-created Browser Use, the open-source library that lets AI agents control web browsers. While his co-founder Gregor Zunic handles product strategy, Magnus designed the event-driven architecture and maintains the CLAUDE.md file that makes the codebase AI-navigable. The project hit 50,000 GitHub stars in three months and raised $17 million from Felicis, Paul Graham, and Y Combinator (W25 batch).
Background
- Grew up in a small German farming town (500 people, 5000 cows)
- BSc Cognitive Science from Osnabruck University (2020-22)
- Exchange year at National University of Singapore (2022)
- MSc Computer Science at ETH Zurich (2023-25, paused for Browser Use)
- AI research at Cambridge CARES in Singapore
- Previously co-founded GreenWAI (traffic light optimization with reinforcement learning)
- Twitter: @mamagnus00
- GitHub: @MagMueller
The CLAUDE.md Approach
Browser Use includes a CLAUDE.md file that gives AI assistants full context on the codebase. This file describes the architecture, code style requirements, and development workflow in a format Claude Code can consume.
From the CLAUDE.md:
# Browser-Use Library: Architecture & Development Guide
## Core Architecture
Browser-Use is an async Python 3.11+ library enabling AI agents
to autonomously navigate and interact with web pages using LLMs
and Chrome DevTools Protocol (CDP).
Key sections in the file:
| Section | Purpose |
|---|---|
| Core Architecture | Maps Agent, BrowserSession, Tools, DomService, LLM |
| Code Style | Tabs, modern typing, Pydantic v2, service.py pattern |
| Development Workflow | uv commands for setup, testing, quality checks |
| Testing Philosophy | Real instances over mocks, pytest-httpserver |
| Strategic Development | Event buses and job queues for isolation |
This makes the codebase navigable by AI agents, not just human developers. Claude Code can understand where to make changes without extensive exploration.
Event-Driven Architecture
Magnus built bubus, a production-ready Python event bus that powers Browser Use. The library coordinates five watchdog services through async event dispatching:
- DownloadsWatchdog - Monitors file downloads
- PopupsWatchdog - Handles unexpected dialogs
- SecurityWatchdog - Manages certificate warnings
- DOMWatchdog - Tracks page state changes
- AboutBlankWatchdog - Catches navigation failures
from browser_use import Agent, Browser
from langchain_openai import ChatOpenAI
agent = Agent(
task="Find the cheapest flight from SF to NYC",
llm=ChatOpenAI(model="gpt-4o"),
browser=Browser()
)
result = await agent.run()
The agent observes, reasons, acts, then repeats. All coordination happens through the event bus, keeping components isolated and testable.
Technical decisions encoded in the architecture:
| Choice | Rationale |
|---|---|
| Event buses | Decouple watchdogs from main agent loop |
uuid7str for IDs | Time-ordered UUIDs for debugging |
| Pydantic v2 models | Strict validation at boundaries |
service.py pattern | Logic separate from data models |
| No mocking in tests | Real instances catch real bugs |
Five-Day Shipping Philosophy
Magnus advocates for rapid iteration over planning:
“Ship so much, see if it works, otherwise build something else. Just ship all the time. That’s the most important thing - don’t overthink, just ship.”
Browser Use was built in five days as an experiment. The prototype combined web scraping with LLMs to enable action-taking. Magnus and Gregor posted it to Hacker News expecting criticism. Instead, it went viral.
His development principles:
- Five-day MVPs - If it takes longer, scope is wrong
- Direct user testing - Walked around ETH Zurich’s main building asking students to try the tool
- Post before you’re ready - The “really shitty” prototype became a company
Cognitive Science Background
Magnus studied cognitive science before computer science. He sees browser automation as an interface problem:
“Computers should understand what you want to do, not force you to learn their interface.”
This shapes Browser Use’s design. Instead of making users learn Selenium selectors or Playwright syntax, agents observe pages like humans do and act accordingly. The LLM handles the translation from intent to action.
Key Takeaways
| Principle | Implementation |
|---|---|
| Ship in five days | Prototype became a company |
| Write CLAUDE.md | Make codebase AI-navigable |
| Use event buses | Isolate components, improve testability |
| Test with real users | Walk around and ask people to try it |
| Small-town work ethic | 14-hour days without complaint |
Links
- Browser Use
- GitHub: browser-use/browser-use
- GitHub: browser-use/bubus
- CLAUDE.md file
- Y Combinator Profile
- Twitter: @mamagnus00
- GitHub: @MagMueller
- Interview: Building Browser Use
Next: Jesse Vincent’s Superpowers Framework
Get updates
New guides, workflows, and AI patterns. No spam.
Thank you! You're on the list.