Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rkat.ai/llms.txt

Use this file to discover all available pages before exploring further.

Mobs are Meerkat’s multi-agent runtime. A mob is a durable team of agent members with stable identities, profile-driven behavior, peer wiring, optional flows, and host-visible lifecycle state. Use mobs when one session is no longer the right unit of work: release triage teams, code review panels, research teams, incident rooms, long-running helper pools, and browser-deployed mobpacks all use the same underlying mob runtime.
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

NeedUse
One quick helper from an agent promptdelegate inside rkat run --tools full
A persistent team the agent can manageagent-side mob_create, mob_spawn_member, mob_wire, mob_check_member
An app or service orchestrating members directlyhost APIs: JSON-RPC mob/*, public MCP meerkat_mob_*, Python Mob, TypeScript Mob
A browser-deployed teamWeb SDK @rkat/web with MeerkatRuntime.createMob, or rkat mob web build from a mobpack
A repeatable workflow across membersmob flows
A signed, portable team definitionmobpack

Mental Model

A MobDefinition 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

ConceptMeaning
MobDurable orchestration aggregate: definition, members, events, flows, lifecycle
ProfileRole template: model, tool posture, skills, runtime mode, peer description
MemberOne spawned participant with a stable AgentIdentity
WiringDirected peer visibility between members
Runtime modeautonomous_host by default, turn_driven when explicit control is needed
FlowDeclarative workflow that dispatches steps to members
Work laneCancellable tracked work submitted to a mob or member
MobpackPortable signed artifact containing a mob definition and optional assets

Agent Tools Vs Host APIs

Keep this distinction sharp:
SurfaceCallerNamesPurpose
Agent-side toolsThe model inside a sessiondelegate, mob_create, mob_spawn_member, mob_wire, mob_check_memberLet an agent create helpers and coordinate its own team
Host APIsYour application, CLI, SDK, or servicemob/create, mob/spawn, mob/flow_run, SDK Mob methodsLet software create, inspect, drive, and supervise mobs
Public MCP toolsExternal MCP clientsmeerkat_mob_*Expose the typed host control plane through MCP
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.
rkat run --tools full "Ask one helper to inspect the test failure, then summarize what it found."
For recurring teams, use explicit mobs instead of a chain of ad hoc delegates.

Define A Mob

A small mob definition has profiles and optional wiring:
{
  "id": "release-triage",
  "orchestrator": { "profile": "lead" },
  "profiles": {
    "lead": {
      "model": "claude-opus-4-6",
      "peer_description": "Coordinates triage and assigns work",
      "tools": {
        "builtins": true,
        "comms": true,
        "mob": true
      }
    },
    "analyst": {
      "model": "claude-sonnet-4-6",
      "peer_description": "Investigates one issue and reports evidence",
      "tools": {
        "builtins": true,
        "comms": true
      }
    }
  },
  "wiring": {
    "auto_wire_orchestrator": true,
    "role_wiring": [
      { "a": "lead", "b": "analyst" }
    ]
  },
  "limits": {
    "max_flow_duration_ms": 600000,
    "max_step_retries": 1
  }
}
Profiles are role contracts. Spawn requests may override selected profile fields, but the definition remains the durable source for the mob’s intended shape.
Mobs do not use prefabs or templates in 0.6.5. Create mobs from MobDefinition directly, or package that definition as a mobpack.

Create And Spawn

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "mob/create",
  "params": {
    "definition": {
      "id": "release-triage",
      "profiles": {
        "lead": { "model": "claude-opus-4-6" },
        "analyst": { "model": "claude-sonnet-4-6" }
      }
    }
  }
}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "mob/spawn_many",
  "params": {
    "mob_id": "release-triage",
    "specs": [
      { "profile": "lead", "agent_identity": "lead-1" },
      { "profile": "analyst", "agent_identity": "analyst-1" },
      { "profile": "analyst", "agent_identity": "analyst-2", "runtime_mode": "turn_driven" }
    ]
  }
}
Spawn defaults matter:
FieldDefault
runtime_modeautonomous_host
launch_modefresh member
tool_access_policyinherit
budget_split_policyequal
auto_wire_parentsurface-dependent helper behavior
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:
IdentityScope
AgentIdentityStable public member key; use this in APIs, wiring, status, work, and events
AgentRuntimeIdCurrent runtime binding; rotates when a member respawns
FenceTokenMonotonic stale-write guard for runtime binding effects
GenerationMember generation counter after respawn
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.
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "mob/wire",
  "params": {
    "mob_id": "release-triage",
    "agent_identity": "lead-1",
    "peer": "analyst-1"
  }
}
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "mob/unwire",
  "params": {
    "mob_id": "release-triage",
    "agent_identity": "lead-1",
    "peer": "analyst-1"
  }
}
Topology rules can reject wiring or dispatch that violates the definition. Use strict topology when roles must not communicate outside an approved graph.

Send Work

Use member send for direct content delivery. Use the work lane when the caller needs a tracked, cancellable work reference.
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "mob/member_send",
  "params": {
    "mob_id": "release-triage",
    "agent_identity": "lead-1",
    "content": "Decompose the task and assign work to the analysts.",
    "handling_mode": "queue"
  }
}
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 nested FlowSpec.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.
{
  "flows": {
    "triage": {
      "steps": {
        "scan": {
          "role": "lead",
          "message": "Review the incident queue and pick the top issue."
        },
        "investigate": {
          "role": "analyst",
          "message": "Investigate the selected issue and return evidence.",
          "depends_on": ["scan"],
          "dispatch_mode": "fan_out"
        },
        "summarize": {
          "role": "lead",
          "message": "Summarize findings and recommend next action.",
          "depends_on": ["investigate"],
          "dispatch_mode": "fan_in"
        }
      }
    }
  }
}
Run and inspect a flow:
{
  "jsonrpc": "2.0",
  "id": 8,
  "method": "mob/flow_run",
  "params": {
    "mob_id": "release-triage",
    "flow_id": "triage",
    "params": { "severity": "critical" }
  }
}
{
  "jsonrpc": "2.0",
  "id": 9,
  "method": "mob/flow_status",
  "params": {
    "mob_id": "release-triage",
    "run_id": "flow_run_123"
  }
}

Observe And Operate

TaskMethods
List and inspect mobsmob/list, mob/status, mob/snapshot
Inspect rostermob/members, mob/member_status, mob/list_members_matching
Watch eventsmob/events, SDK event subscriptions
Manage lifecyclemob/lifecycle, mob/retire, mob/respawn, mob/destroy
Manage flowsmob/flows, mob/flow_run, mob/flow_status, mob/flow_cancel
Manage workmob/submit_work, mob/cancel_work, mob/cancel_all_work
Wait for startupmob/wait_kickoff, mob/wait_ready
Manage profilesmob/profile/create, mob/profile/get, mob/profile/list, mob/profile/update, mob/profile/delete
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.

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. 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 audio is per session. To use live audio with a mob member, give that member a realtime-capable model such as gpt-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:
rkat mob pack ./mobs/release-triage -o ./dist/release-triage.mobpack
rkat mob inspect ./dist/release-triage.mobpack
rkat mob validate ./dist/release-triage.mobpack
rkat mob deploy ./dist/release-triage.mobpack "triage latest release regressions"
Use mobpacks when the mob should be versioned, signed, reviewed, deployed, or compiled for the browser.

Troubleshooting

SymptomCheck
Helper never repliesConfirm --tools full or mob tools are enabled, then inspect mob_check_member / mob/member_status
member_already_existsPick a new agent_identity or respawn the existing member
profile_not_foundConfirm the profile name exists in the MobDefinition or profile store
topology_violationCheck role wiring and topology rules before sending work
External spawn rejectedVerify the external binding includes address and trusted identity
Flow run missingUse mob/flows first and confirm the flow_id exists in the definition
Live open failsConfirm the member’s model has realtime capability and rkat-rpc --live-ws is enabled when using RPC audio

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.