Skip to main content
A mob is a team of agents that work together. Each agent has a role (profile) and agents communicate over signed channels (wiring). How they coordinate is up to you — autonomous agents can self-organize through peer messaging alone, you can define declarative flows (DAGs) for structured multi-step work, or combine both. For many use cases, wiring and skills are enough and preferable, as it gives agents more robust problem-solving through natural collaboration rather than rigid orchestration.

Core concepts

Profiles

A profile is a template for an agent. It defines the model, tools, skills, and communication settings. When you spawn a member, you pick a profile and give it a unique ID.
"lead": {
  "model": "claude-opus-4-6",
  "peer_description": "Coordinates the team, assigns tasks",
  "tools": { "builtins": true, "comms": true, "mob": true, "mob_tasks": true },
  "skills": ["triage-workflow"],
  "runtime_mode": "autonomous_host"
}
FieldDescription
modelLLM model name
toolsTool categories: builtins, shell, comms, memory, mob, mob_tasks, mcp (server names)
skillsSkill references to inject
peer_descriptionVisible to peers during communication
runtime_mode"autonomous_host" (default) or "turn_driven"
output_schemaJSON Schema for structured output extraction
external_addressableWhether this member is visible for cross-mob comms

Wiring

Wiring creates a trusted communication channel between two members. An agent can only send messages to peers it’s wired to. Wiring is bidirectional — if A is wired to B, both can send to each other.
"wiring": {
  "auto_wire_orchestrator": true,
  "role_wiring": [
    { "a": "analyst", "b": "analyst" }
  ]
}
  • auto_wire_orchestrator: automatically wire every spawned member to the orchestrator
  • role_wiring: rules applied at spawn time — every member of role a gets wired to every member of role b

Runtime modes

ModeBehaviorUse case
autonomous_host (default)Continuous loop: wake on inbox message → process → respond → sleepLong-lived agents that react to peer messages and events
turn_drivenOnly runs when explicitly given a turnControlled execution, deterministic ordering, flow steps

Flows

A flow is a DAG of steps. Each step targets a role, sends a message, and can depend on other steps. The flow engine dispatches steps in topological order, respecting dependencies and conditions.
"flows": {
  "triage": {
    "steps": {
      "scan": {
        "role": "lead",
        "message": "Scan the issue tracker and prioritize the top 5 issues"
      },
      "investigate": {
        "role": "analyst",
        "message": "Investigate your assigned issue in depth",
        "depends_on": ["scan"],
        "dispatch_mode": "fan_out"
      },
      "summarize": {
        "role": "lead",
        "message": "Synthesize all findings into an executive summary",
        "depends_on": ["investigate"],
        "depends_on_mode": "all"
      }
    }
  }
}

Step fields

FieldDescription
roleProfile name — the step runs on a member with this role
messagePrompt sent to the member
depends_onStep IDs that must complete before this step starts
depends_on_mode"all" (default) — wait for every dependency. "any" — start when any one completes
dispatch_mode"fan_out" (default) — send to all members of the role. "one_to_one" — single member. "fan_in" — aggregate
conditionGuard expression (eq, in, gt, lt, and, or, not) — step is skipped if false
branchLabel for conditional routing
timeout_msPer-step timeout
allowed_tools / blocked_toolsPer-step tool overlay

Mob definition

A mob definition is a JSON or TOML document that declares everything: profiles, wiring, flows, limits.
{
  "id": "release-triage",
  "profiles": {
    "lead": {
      "model": "claude-opus-4-6",
      "peer_description": "Coordinates triage",
      "tools": { "builtins": true, "comms": true, "mob": true, "mob_tasks": true },
      "skills": ["triage-workflow"]
    },
    "analyst": {
      "model": "claude-sonnet-4-5",
      "peer_description": "Investigates issues",
      "tools": { "builtins": true, "shell": true, "comms": true },
      "runtime_mode": "autonomous_host"
    }
  },
  "wiring": {
    "auto_wire_orchestrator": false,
    "role_wiring": [{ "a": "lead", "b": "analyst" }]
  },
  "flows": {
    "triage": {
      "steps": {
        "scan": { "role": "lead", "message": "Prioritize issues" },
        "investigate": { "role": "analyst", "message": "Investigate", "depends_on": ["scan"], "dispatch_mode": "fan_out" },
        "summarize": { "role": "lead", "message": "Summarize findings", "depends_on": ["investigate"] }
      }
    }
  },
  "limits": {
    "max_flow_duration_ms": 300000,
    "max_step_retries": 2,
    "max_orphaned_turns": 10
  }
}

Prefabs and mobpacks

Prefabs are built-in definition templates for common patterns:
PrefabPatternProfiles
coding_swarmLead + workers for coding taskslead, worker
code_reviewMulti-reviewer code auditslead, worker
research_teamDiverge/converge researchlead, worker
pipelineSequential stage handoffslead, worker
Prefabs are starting points — create from a prefab, then customize. Mobpacks are portable archives (.mobpack) that bundle a mob definition with its skills, config, and optional Ed25519 signatures into a single deployable artifact. Mobpacks can be deployed to any surface or compiled into a browser-runnable WASM bundle. See the Mobpack guide for packaging, signing, trust policies, and web deployment.

Lifecycle

A mob goes through these phases:
  1. Create — register the definition, allocate storage
  2. Spawn — instantiate members from profiles (each member is a real agent session)
  3. Wire — establish communication channels between members
  4. Operate — members communicate, execute turns, run flows
  5. Complete/Destroy — mark as done or tear down
Members can be added (spawn) or removed (retire) at any time. Wiring can change dynamically (wire, unwire). Flows can be started, polled, and cancelled.

Spawn semantics

Spawning is deferred — create_session() registers the member without running an LLM turn. The first real work happens when the member receives input (a peer message, event injection, or flow dispatch). This keeps spawn latency bounded by session provisioning, not model latency.

State transitions

OperationEffect
stopPause all members
resumeRestart paused members
completeMark mob as done (members stop)
destroyTear down all resources

Mob tools

When mob capability is enabled on a session, the agent gets these tools:
ToolParametersDescription
spawn_meerkatmob_id, specs[]Spawn members (batch)
spawn_many_meerkatsmob_id, specs[]Spawn multiple members concurrently
retire_meerkatmob_id, meerkat_idRemove a member
force_cancel_meerkatmob_id, meerkat_idForce-cancel a member
meerkat_statusmob_id, meerkat_idGet member status
list_meerkatsmob_idList members and state
wire_peersmob_id, a, bWire a comms channel between two members
unwire_peersmob_id, a, bUnwire a comms channel
mob_run_flowmob_id, flow_id, params?Execute a DAG flow
mob_flow_statusmob_id, run_idCheck flow run status
mob_cancel_flowmob_id, run_idCancel a running flow
mob_task_createmob_id, title, body?Create a shared task
mob_task_listmob_idList shared tasks
mob_task_updatemob_id, task_id, statusUpdate a task’s status
mob_task_getmob_id, task_idGet task details
These tools are available on every surface — CLI, RPC, REST, MCP, Python SDK, TypeScript SDK. The agent orchestrates the mob by calling these tools in response to natural language instructions.

Direct control plane

In addition to tool-driven orchestration (where an agent calls mob tools), there is a direct control plane for programmatic access without going through an LLM:
// List prefabs
{"jsonrpc":"2.0","id":1,"method":"mob/prefabs","params":{}}

// Create a mob directly
{"jsonrpc":"2.0","id":2,"method":"mob/create","params":{
  "definition": {"id":"my-mob","profiles":{}}
}}

// Spawn and send work
{"jsonrpc":"2.0","id":3,"method":"mob/spawn","params":{
  "mob_id": "my-mob",
  "profile": "lead",
  "meerkat_id": "lead-1"
}}
{"jsonrpc":"2.0","id":4,"method":"mob/send","params":{
  "mob_id": "my-mob",
  "meerkat_id": "lead-1",
  "content": "Coordinate the release triage."
}}

Topology

Topology rules govern which roles can communicate. Use topology for structural governance in sensitive deployments.
ModeBehavior
advisory (default)Log violations but allow communication
strictBlock disallowed edges
"topology": {
  "mode": "strict",
  "rules": [
    { "from_role": "analyst", "to_role": "lead", "allowed": true },
    { "from_role": "analyst", "to_role": "analyst", "allowed": false }
  ]
}
Wildcard "*" matches any role.

When to use mobs

SituationUse
Single agent with toolsPlain session
Multiple agents that need to collaborateMob
Agents with different roles/capabilitiesMob with profiles
Coordinated multi-step workflowsMob with flows
Structured communication policiesMob with topology

See also