cd /news/ai-agents/an-experimental-web-browser-written-… · home › topics › ai-agents › article
[ARTICLE · art-173326] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

An experimental web browser written from scratch in Rust by an AI agent (Claude)

An experimental web browser called swb, written from scratch in Rust, has its entire codebase designed, written and maintained by an AI agent (Claude), with the project owner setting goals and checking results. The browser uses general-purpose libraries for HTTP, TLS, HTML tokenizing, image decoding, WOFF/WOFF2 decoding, font shaping, 2D rasterization and windowing, while the CSS, style, layout, painting, page loading, JavaScript engine, DOM and other web APIs and user interface are written in the repository. Eight target pages match Chromium — senko.net, Hacker News, a Wikipedia article, a Craigslist posting, the Ars Technica and BBC front pages, the repository's GitHub page and an OpenStreetMap map — and 41,842 tests of swb's own JavaScript engine test262 subset pass, though workers, window.open and tabs, media playback, WebGL and CSS anchor positioning remain undone.

key takeaway

An AI agent (Claude) wrote and maintains the full swb browser in Rust, and its own JavaScript engine passes 41,842 tests of its test262 subset, with headless flags (--screenshot, --dump-layout, --eval, --bench) and a WebSocket remote-control port for driving it from tests.

read4 min views27 publishedNov 20, 2026
An experimental web browser written from scratch in Rust by an AI agent (Claude)
Image: Michielbdejong (auto-discovered)

An experimental web browser, written from scratch in Rust.

An AI agent (Claude) designs, writes and maintains all of the code. The project owner sets the goals and checks the results. See docs/ground-rules.md.

swb shows the GitHub page of this repository, with JavaScript on.

swb uses general-purpose libraries (HTTP, TLS, HTML tokenizing, image decoding, WOFF and WOFF2 decoding, font shaping, 2D rasterization, windowing). The browser parts (CSS, style, layout, painting, page , the JavaScript engine, the DOM and the other web APIs, user interface) are written in this repository.

swb is developed and tested on Linux (Wayland or X11). Other platforms are not tested.

Requirements (Debian/Ubuntu package names):

  • Rust toolchain via rustup . The version is pinned inrust-toolchain.toml and installed automatically.
  • libfontconfig-dev ,libxkbcommon-dev ,libwayland-dev ,pkg-config .
  • A C compiler, make andsh (build-essential ): the build compiles jemalloc, the memory allocator of the binaries, from source (ADR 0029).
  • just (optional).
git clone https://github.com/senko/swb.git
cd swb
just run https://senko.net/                    # build (release) and open a window
just run --js https://github.com/senko/swb     # the same, with JavaScript on

Without just: cargo run --release -p swb -- https://senko.net/. The binary is target/release/swb.

The toolbar has back, forward and reload buttons, the JavaScript toggle (JS) and the address bar. In the address bar, an address without a scheme gets https://, and an absolute path opens a local file. On the command line, a relative file path also works.

Key Action
Ctrl+L Focus the address bar
Alt+Left, Alt+Right, mouse back and forward buttons Back, forward
Backspace Back (when no text field has the focus)
F5, Ctrl+R Reload
Escape Stop
Tab, Shift+Tab Move the focus between links and form controls
Enter Follow the focused link
Ctrl+A, Ctrl+C Select all text, copy the selection
Ctrl+X, Ctrl+V Cut, paste (in text fields and the address bar)
Ctrl+Shift+J Turn JavaScript on or off
Ctrl+Q, Ctrl+W Quit

JavaScript is off by default. The JS button and Ctrl+Shift+J apply to the next page that loads; reload to apply the change to the current page. --js starts with JavaScript on. JavaScript needs a stack limit of at least 8 MiB (ulimit -s). Below it, the button is gray and JavaScript stays off.

Headless mode (for tests and scripts):

swb --headless --screenshot page.png https://senko.net/
swb --headless --full-page --screenshot page.png https://senko.net/
swb --headless --with-chrome --screenshot window.png https://senko.net/
swb --headless --dump-layout https://senko.net/
swb --headless --js --eval 'document.title' https://senko.net/
swb --headless --bench 20 https://senko.net/   # time each pipeline stage

Remote control: swb --headless --remote-port 0 starts a WebSocket server on 127.0.0.1 that tests and tools use to drive the browser (also with a window: swb --remote-port 9222). See docs/automation.md.

See swb --help for all options.

Early development.

  • Eight target pages match Chromium: senko.net, Hacker News, a Wikipedia article, a Craigslist posting, the Ars Technica and BBC front pages, the GitHub page of this repository, and an OpenStreetMap map. All of them except senko.net also work with JavaScript on, with the interactions that the targets list names.
  • swb has its own JavaScript engine (crates/js* ); 41,842 tests of itstest262 subset pass.
  • Not done: running scripts in workers (Worker exists but runs no script),window.open and tabs, media playback, WebGL, CSS anchor positioning.

The roadmap lists the milestones, what each one includes, and the backlog. The development log has the latest changes.

just check    # format check, clippy, all tests, license check
just --list   # all commands

docs/testing.md describes the tests and the tools that compare swb with Chromium. CLAUDE.md has the instructions and the workflow of the AI agents that write the code.

swb's own source code is MIT-licensed. See LICENSE.

Some of swb's source code and some of the material in swb binaries are third-party material that keeps its own license; the MIT License does not apply to it:

  • the Public Suffix List under the Mozilla Public License 2.0 (MPL-2.0, a one-off exception, ADR 0014 );
  • stylesheets based on the WHATWG HTML Standard under CC BY 4.0;
  • code derived from Chromium and Skia under the BSD-3-Clause license (copies of swb's source code and binaries must include their license texts), and one file derived from Servo under the MPL-2.0;
  • the WebIDL files of crates/web/idl/ , copied from WHATWG standards (BSD-3-Clause) and W3C specifications (W3C Software and Document License);
  • tables generated from the Unicode Character Database and Unicode CLDR (Unicode License v3).

See THIRD_PARTY_NOTICES.md for the details and license texts.

The test data in fixtures/ (snapshots of web pages, fonts) is third-party material under its own licenses; see fixtures/pages/README.md and fixtures/fonts/README.md. It is not part of swb binaries. The fixtures for JavaScript (fixtures/js/) are local only and not in the repository.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/an-experimental-web-…] indexed:0 read:4min 2026-11-20 · —