Skip to main content
The WASM runtime is the full Meerkat agent stack compiled to wasm32 for browser deployment. It routes through the same 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

Assemble a self-contained, runnable web bundle from a .mobpack artifact. The command does not compile wasm32; it copies the required prebuilt meerkat-web-runtime from the generated wasm-pack --target web output directory named by --wasm:
Then serve and open it: 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.
For proxy deployments, pass a provider-specific dummy key and base URL. The proxy injects the real server-side credential.

Create session and run turn

For OAuth or host-owned cloud credentials, register an external auth resolver and bind the session to a structural auth binding. The selected realm binding must be configured to use the WASM external-resolver credential source.

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

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