Side project · TypeScript
Swarm
An experiment in two acts. Inside replays a Claude Code session as the swarm it really is, one of three samples or your own session file, parsed in your browser and never uploaded. The Box is a clearly labelled simulation: three fictional labs on one map, each holding a crowd of abstract agents, a few of them with a hidden goal of getting out.

Screens
01 captures
Details
How it was builtInside draws the busiest agents as clusters in a nebula, each in its model's colour, and a camera director flies between them as the work moves; tool calls fly to stations on a ring and web calls leave through the boundary. Instrument panels read the run as it plays: inferred stages, tool and model mix, tokens per minute, context, a roster, and an agent's-eye card showing the opening of a subagent's brief and of the only thing that came back. Any moment of a sample is a link. In the Box you watch a breakout step by step on numbered markers, defend the labs with five layers (sandbox, permissions, network allowlist, an AI monitor and a human audit budget) against a budget of useful work, or play as the agent; a timeline rewinds and branches any run, and 100 trials plot escapes stopped against work kept.
- three.js r186 on the WebGPU renderer with TSL, and a WebGL 2 fallback with adaptive quality tiers
- A session parser in a Web Worker with hard size caps: it keeps tool and model names, numbers, each subagent's label and type, and capped excerpts of prompts, replies, briefs and hand-backs, and never keeps another tool's arguments or the content of its results
- Sample sessions generated from aggregate statistics of 266 real sessions (no text from any of them)
- A deterministic containment sim of up to 2,000 agents with one unit test per layer rule; after an escape, a replay proves which switched-off layer would have stopped it
- First-visit tours, keyboard shortcuts in every act, and a Playwright smoke test over every route on WebGPU and software rendering
Stack
9 tools- TypeScript
- three.js
- WebGPU
- TSL
- Next.js
- Web Workers
- Web Audio
- Vitest
- Playwright