AgentFactory::build_agent() pipeline as the native surfaces, but intentionally uses standalone in-memory session and mob state. It does not provide runtime-backed keep-alive recovery or cross-process persistence.
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)
Assemble a self-contained browser bootstrap from a Then serve and open it:
.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:python3 -m http.server -d ./dist/web-bundle.
The generated page trust-verifies the pack and initializes the runtime. A
host application must still create the mob, spawn members, and provide its
own prompt/transcript UI.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.
mobpackTrust: { policy: "permissive" }.
initFromMobpack() verifies the archive and makes its skills available to
standalone sessions. It does not create a mob or expose the complete packed
definition. A host that wants the declared topology must separately load a
MobDefinition, call createMob(), and spawn its members as shown below.
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
CredentialSourceSpec::ExternalResolver { handle: "wasm_host" } before that
binding can use the callback. The following fragment only shows registration;
it is not an external-binding bootstrap for the stock npm bundle:
withAuthBinding(authBinding, config) only sets a structural selector for an
already-configured binding; it cannot install one.
Poll events
Mob lifecycle in browser
Subscribe to member events
Cross-mob comms
Wire ambassadors across mobs for inter-faction communication. Resolve each member’s opaque peer target through its owning mob, then install trust in both directions. This keeps address and Ed25519 identity construction inside the runtime rather than hand-authoring an external target.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
