/
Docs
How to build with Isoloop, section by section.
For AI agents: these docs as plain text, llms.txt (an index), llms-full.txt (everything) and each page as Markdown.
Start
- Getting started This page takes you from an empty Vite app to one isolate running in its own worker, talking through the bus, and restarted when it crashes.
- What Isoloop can't hide What changes for code that runs in an isolate, what Isoloop costs, and what it doesn't protect against, so you can judge whether it fits before you adopt it.
Build
- Writing isolates How to write an isolate's module in plain DOM, Preact or React, and what it can use inside its worker.
- Contracts and grants How to define the topics your isolates share, with schemas the bus checks on every publish, and the grants that decide which isolate may use each topic.
- The bus The bus is a log of records per topic, in its own worker, with retention, replay, consumer groups, request and reply, and an optional durable copy on disk.
- Supervision and restarts The kernel watches every isolate's heartbeat, restarts one that blocks or crashes, gives up after too many restarts, and tells the page what happened through events and a fallback.
- Worker pools A pool puts several isolates, headless or visual, in one worker, which saves memory and start-up time and gives up isolation between its members.
- Automatic placement: the balancerExperimental @isoloop/balancer (experimental) decides where isolates run: you spawn through it instead of naming a pool.
- Hosting This page covers what the page that runs Isoloop, and the servers that serve its isolates, need to send: worker URLs, headers, the CSP and CORS.
- Bundle size What each Isoloop import adds to your app's JavaScript, and what tree-shaking removes.
- Testing isolates and contracts Test an isolate's logic and your contracts module in plain unit tests, with @isoloop/runtime/testing and @isoloop/bus/testing, and leave rendering and real workers to browser tests.
Agents and tooling
- Tools for agents An app can offer some of its requestable topics to AI agents as tools, through the dev MCP in development and through WebMCP in the browser.
- The inspection feed kernel.inspect() (experimental) gives a live view of a running page: its isolates, pools and bus, the kernel's events, and records copied from the bus as they're appended.
- Devtools panelExperimental @isoloop/devtools (experimental) adds a panel to the page that shows its isolates, the bus, the kernel's own events and a live log of records, read from the inspection feed.
- Build a dev tool as an isolate A dev tool is an isolate with a surface that watches your page: this page shows how to build one that reads your topics or the kernel's inspection feed, using @isoloop/devtools as the example.
Reference
- @isoloop/host The main thread: createKernel, the kernel it returns, and the types for isolates, pools, the bus and agents.
- @isoloop/runtime The isolate side: defineIsolate, the context an isolate starts with, and createTestContext for tests.
- @isoloop/bus Topics and contracts: topic, contracts, the bus errors and limits, and testContracts for tests.
- @isoloop/react The React adapter: defineIsolate for a component, and hooks for the bus and the host.
- @isoloop/preact The Preact adapter: defineIsolate for a component, and hooks for the bus and the host.
- @isoloop/vite The Vite plugin: isoloop, its options, and the manifest a library build writes.
- @isoloop/dom The render bridge's conformance kit, for authors of a framework adapter.
- @isoloop/balancerExperimental Automatic placement: createBalancer, and the options, events and reports it takes.
- @isoloop/devtoolsExperimental The devtools panel: connectDevtools and its options.
- @isoloop/webmcpExperimental connectWebMCP, which registers an app's tools with the browser's WebMCP API.
- The isoloop command line Every command of isoloop, with its usage and its flags, as its own --help gives them.
- Kernel config Every option
createKerneltakes, with its default.
