AgentFactory::build_agent() pipeline as all other surfaces.
This page is intentionally browser/WASM-specific rather than a cross-surface tabbed page. Use Examples: Mobpack first if you want the packaging/deployment path that usually leads into browser delivery.
Build the WASM bundle
- CLI
- Manual (wasm-pack)
Build a self-contained, runnable web bundle from a Then serve and open it:
.mobpack artifact.
--wasm points at the prebuilt meerkat-web-runtime (the wasm-pack
--target web output dir, or the committed sdks/web/wasm):python3 -m http.server -d ./dist/web-bundle.Initialize runtime
Use init-time credentials and provider base URLs to seed the browser runtime’s realm config. The@rkat/web RuntimeConfig is provider-specific:
anthropicApiKey, openaiApiKey, geminiApiKey, and the matching provider
base URL fields (anthropicBaseUrl, openaiBaseUrl, geminiBaseUrl). The old
generic apiKey/baseUrl compatibility fields are deleted, and
SessionConfig does not accept per-session apiKey or baseUrl.
Create session and run turn
Poll events
Mob lifecycle in browser
Subscribe to member events
Cross-mob comms
Wire ambassadors across mobs for inter-faction communication.mob.wire() accepts either a local member name or an external peer target, so trust between members of different mobs is established by wiring each ambassador to the other side’s peer identity (comms name, address, Ed25519 public key).
Direct
comms_send and comms_peers are reserved low-level placeholders rather
than current wasm-bindgen exports or public @rkat/web wrapper methods.
Inter-agent messaging happens through member-directed turn submission and the
comms tools available to agents during their turns (send_message,
send_request, send_response, and peers).What is available on wasm32
| Category | Available | Not available |
|---|---|---|
| Agent loop | Full agent state machine, streaming, budget | — |
| Providers | Anthropic, OpenAI, Gemini (browser fetch) | — |
| Sessions | Ephemeral sessions | Persistent sessions (filesystem) |
| Mobs | Full orchestration, flows, lifecycle | — |
| Comms | In-process (inproc) transport | TCP, UDS, network transports |
| Tools | Custom tools, tool dispatch | Shell tools, filesystem tools |
| Skills | Embedded skills, HTTP skills | Filesystem skill sources |
| Hooks | In-process hooks | Command hooks, filesystem hooks |
| Compaction | Context compaction | — |
| Other | — | MCP client, delegated work orchestration |
Next step
- Examples: Mobpack — the packaging/deployment path that often comes before browser delivery
- Examples: Mobs — the multi-agent runtime model behind many WASM demos
