A whole coding agent, inside one browser tab

wasm-agent gives an LLM a computer to work on, and that computer is your browser tab. The shell, the file system, the TypeScript compiler and the place the code runs are all WebAssembly and JavaScript. No VM, no container, no build server. Close the tab and the computer is gone; reload it and your project is still there.

Why this is a big deal

Coding agents today run on a real Linux machine: a VM or container per session, reserved RAM and CPU whether the agent is thinking or not. Model prices fall roughly tenfold a year, while the machines the agents run on get more expensive. Soon the sandbox will cost more than the intelligence.

A browser tab (or a V8 isolate on an edge server) is a far cheaper sandbox: no kernel and no operating system per user, and it costs nothing while it waits for the next token. What stopped agents from working there was the toolchain. You need a file system, a shell and a compiler that run without a machine. The last piece arrived in October 2026: ts-rust, the TypeScript 7 compiler ported to Rust by agents, compiles to WebAssembly. Microsoft's own native compiler is written in Go, whose garbage-collected runtime makes a poor WebAssembly fit. With ts-rust, the whole edit, type-check, run loop fits in a tab.

≈2.1 MBthe entire app, brotli, compiler included
0.3 sa warm tsc run, in the browser
0servers that run your code
91 sidea to tested, committed app (tip calculator, Qwen 3.8)

What is in the tab

Shell + file system

just-bash: bash syntax and ~80 commands (grep, sed, awk, jq, rg, diff, tar…) over an in-memory file system, saved in IndexedDB.

TypeScript 7 compiler

ts-rust compiled to wasm32-wasip1, running in a Web Worker. The real type checker, not a transpiler.

Runtime + preview

run executes ES modules and preview shows pages in a sandboxed iframe with an opaque origin: generated code cannot touch the app or your keys.

git

Commits and pulls over the GitHub or Forgejo HTTP API, straight from the tab.

The agent

Claude with your own key (public version) or our gateway's Qwen 3.8 Flash-Next (internal version), using bash and file-edit tools.

Works on a phone

Portrait layout with Chat, Files, Terminal and Preview tabs, tested on WebKit (iPhone) and Chromium (Android).

What you can build with it

Anything that is TypeScript plus the browser's own APIs: pages, tools, games, libraries with tests. There is no npm, so the agent writes small things itself instead of installing them, which keeps projects tiny and readable. Tap an idea to open the agent with that prompt filled in.

Tip and bill splitter

A pure tip() function with tests and a live-updating page. The demo project: built, tested and committed in 91 s.
Try it →

Markdown notes with live preview

A tiny markdown-to-HTML converter written from scratch (headings, lists, code, links), unit tests for each rule, and a split-pane editor that saves to localStorage.
Try it →

Canvas game

Snake or Breakout on a <canvas>, with the game logic separated from drawing so the rules (collisions, scoring) are unit tested.
Try it →

Kanban board

Columns, drag-and-drop cards, persistence in localStorage, and a typed state reducer with tests.
Try it →

SVG chart generator

Paste CSV, get a clean bar or line chart as SVG, with axis tick logic and CSV parsing tested.
Try it →

Regex and JSON workbench

A regex tester with match highlighting, and a JSON formatter, validator and path explorer.
Try it →

A typed library with a test suite

Date helpers, a priority queue, an LRU cache or a semver parser: strict TypeScript, a hand-written assert helper, and a README with examples. Good for katas and interview prep.
Try it →

Landing page or personal site

Plain HTML and CSS with a little TypeScript for interaction, ready to commit and deploy through the pipeline below.
Try it →

Teaching and kids' projects

A multiplication-table quiz, a flashcards app, a physics toy: small enough to read every line, and the agent explains its changes.
Try it →

From idea to the internet

On our tailnet, projects made here flow through a pipeline that uses the same WebAssembly toolchain on the server as in your tab:

  1. Idea. Describe it to the agent.
  2. Build. The agent writes, type-checks and tests it in the tab, then git commits to the forge.
  3. Deploy and test on the tailnet. wasm-ci builds the commit again with the same toolchain, runs the tests, deploys it to wasm-ci.bunny-sunfish.ts.net/apps/<repo>/, opens it in a headless browser and reports ✓ or ✗ on the commit. The agent can wait for this with ci wait.
  4. Validate. A person opens the tailnet URL, tries it, and approves it on the run page.
  5. Deploy to the public web. The approved build goes to k4c.dev. Static output like this also runs as-is on edge platforms built on V8 isolates and WebAssembly.

Two versions

PublicInternal (tailnet)
URLk4c.dev/wasm-agentwasm-agent.bunny-sunfish.ts.net
ModelClaude, your API keyQwen 3.8 Flash-Next via our gateway, no key
gitGitHub or Forgejo, your tokenForgejo as wasm-agent-bot, no token
Keysstay in your browsernone in the browser

Honest limits

Source: k4c/wasm-agent on our forge. Built on just-bash (Vercel), ts-rust (pingdotgg) and QuickJS, inspired by Theo's "TS Rust" video.