Mobs are the multi-agent path in Meerkat. The agent-facing
delegate tool,
explicit mob_* tools, SDK Mob classes, mob/* RPC methods, public MCP mob
tools, and mobpack deployment all route through the mob system.Choose A Path
Mental Model
AMobDefinition describes profiles, limits, wiring rules, topology, and
flows. The running mob records the roster, member lifecycle, events, flow runs,
and work state. Each member is an agent session, but public mob APIs address the
member by stable AgentIdentity, not by an internal session or runtime binding.
Core Concepts
Agent Tools Vs Host APIs
Keep this distinction sharp:
Agent-side tools are late-bound through the session build path. Host APIs are
the stable control plane for applications and SDKs. Do not treat raw
mob_*
agent tools as if they were JSON-RPC methods.
Fast Path: Delegate
delegate creates an implicit session-owned mob on first use, spawns a helper,
and wires the helper to the creating session. Use it for bounded helper work
that should report back.
Define A Mob
A small mob definition has profiles and optional wiring:Profile model and provider fields
Beyondmodel, a profile can pin provider identity and per-member behavior:
Custom model registry entries
[models.<id>] tables declare uncatalogued models once, at the definition
level. One entry feeds provider inference, compaction scaling, capability
gates, and call timeouts for every profile that references the model:
[models.<id>] table shape works in the host’s config.toml under
[models], next to the per-provider default model strings.
At load time, rkat mob validate rejects a profile model that is neither
catalogued, custom-defined under [models.<id>], nor provider-annotated
(unknown_model), instead of failing at the member’s first delivery.
Create And Spawn
- JSON-RPC
- Python
- TypeScript
- Web SDK
- CLI
Autonomous members run as long-lived peers.
turn_driven members are useful
when a host wants explicit dispatch control.
Identity And Respawn
Mobs separate stable member identity from runtime binding details:
Use
AgentIdentity for facts that survive respawn, such as wiring and durable
configuration. Runtime IDs and fence tokens protect the lower-level binding.
Wire Peers
Wiring controls which members can see and message each other.- JSON-RPC
- Python
- TypeScript
Send Work
Use member send for direct content delivery. Use the work lane when the caller needs a tracked, cancellable work reference.- Member send
- Tracked work
member_ref is an opaque handle returned by spawn, member list, member send,
helper spawn, fork, and respawn responses. Application code should pass it back
to work-lane APIs as-is instead of constructing it from mob_id and
agent_identity.
Flows
Flows are declarative mob workflows. They let a host dispatch repeatable work without hard-coding all member turns in application code. The classic flow shape is a flat DAG: steps declare roles, messages, dependencies, fan-out/fan-in behavior, optional conditions, and tool overlays. Frame-based flows add nestedFlowSpec.root frames and repeat_until loops.
Both are owned by the mob runtime; support modules such as flow-run projection
are not separate public machines.
- JSON-RPC
- Python
- TypeScript
- CLI
Observe And Operate
The event log is append-only. For UI and service loops, prefer event cursors or
SDK subscriptions over repeated full snapshots.
Persistence
Persistent mobs use SQLite/WAL-backed storage. In-memory storage is used for tests and WASM/browser-embedded paths. The mob store is realm-scoped in the runtime-backed surfaces, so a process restart can recover mob state, members, events, flow snapshots, and work records.Supervisor Rotation
mob/rotate_supervisor is a synchronous-looking view over a durable
operation. The mob records a stable operation ID and the complete target
authority before sending the one-way handoff to any member. Each member fences
the old epoch, advances the handoff independently, and exposes a durable
pending, completed, or rejected receipt for that operation ID.
A caller timeout means only that the terminal receipt was not observed before
the deadline. It does not cancel or roll back the member operation; a retry
uses the persisted operation ID and resumes observation. See
Delivery, Interaction, and Durable Operations
for the protocol boundary and recovery semantics.
External Members
Most members are normal session-backed agents. External members are advanced: they require an external runtime binding with a concrete address and trusted peer identity so the orchestrator can route supervisor bridge traffic to the right process. For a remoterkat process, start it with the signed comms
listener and write the binding file:
--comms-binding-out writes the current external binding shape: kind: "external", advertised address, Ed25519 public identity, and typed
bootstrap_token. Current mob supervisors require that typed bootstrap token
for external bridge binding; a bare External backend tag, a raw address, or a
query-string-only bootstrap token is rejected.
Use external members only when the member must run outside the local Meerkat
runtime, such as another host, sandbox, or service process.
Live Channels
Live channels are per session. To use live audio/text or model-gated image input with a mob member, give that member a realtime-capable model such asgpt-realtime-2, spawn the member, then open a live channel against the
member’s session through the live/* surface.
See Live channels.
Mobpacks
A mobpack packages a mob definition and optional assets into a portable artifact:Troubleshooting
See Also
Mob architecture
Runtime ownership, member identity, flows, persistence, and live-channel boundaries.
Mobs concept
The conceptual model behind members, profiles, wiring, and host-vs-agent surfaces.
Mobpack
Package, sign, validate, deploy, and build browser-target mob artifacts.
