Skip to main content
For the full guide, see Mobs.

Mob definition

A mob definition declares profiles (agent templates), wiring rules, and flows. Definitions can be JSON or TOML.
{
  "id": "release-triage",
  "profiles": {
    "lead": {
      "model": "claude-opus-4-6",
      "peer_description": "Coordinates triage, assigns issues",
      "tools": { "builtins": true, "comms": true, "mob": true, "mob_tasks": true },
      "skills": ["triage-workflow"],
      "runtime_mode": "autonomous_host"
    },
    "analyst": {
      "model": "claude-sonnet-4-5",
      "peer_description": "Investigates assigned 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": {
      "description": "Triage incoming issues",
      "steps": {
        "scan": {
          "role": "lead",
          "message": "Scan the issue tracker and prioritize"
        },
        "investigate": {
          "role": "analyst",
          "message": "Investigate the top priority issue",
          "depends_on": ["scan"],
          "dispatch_mode": "fan_out"
        },
        "summarize": {
          "role": "lead",
          "message": "Summarize findings and recommend actions",
          "depends_on": ["investigate"],
          "depends_on_mode": "all"
        }
      }
    }
  },
  "limits": {
    "max_flow_duration_ms": 300000,
    "max_step_retries": 2,
    "max_orphaned_turns": 10
  }
}

Profile fields

FieldTypeDescription
modelstringLLM model name
skillsstring[]Skill references to load
toolsobjectTool categories: builtins, shell, comms, memory, mob, mob_tasks, mcp (server names)
peer_descriptionstringVisible to peers in comms discovery
runtime_modestring"autonomous_host" (default) or "turn_driven"
external_addressableboolVisible for cross-mob comms
output_schemaobjectJSON Schema for structured output extraction

Flow step fields

FieldTypeDescription
rolestringProfile name to execute this step
messagestringPrompt sent to the member
depends_onstring[]Step IDs that must complete first
depends_on_modestring"all" (default) or "any"
dispatch_modestring"fan_out" (default), "one_to_one", "fan_in"
conditionobjectGuard expression (eq, in, gt, lt, and, or, not)
branchstringBranch label for conditional routing
timeout_msnumberStep-level timeout
allowed_tools / blocked_toolsstring[]Per-step tool overlay

Mob tools reference

When enable_mob is set, the agent gets these tools:
ToolParametersDescription
mob_createdefinition (JSON)Create a mob from definition
mob_listmob_id?List mobs, or get status of one
mob_lifecyclemob_id, action (stop/resume/complete/destroy)Control mob state
mob_eventsmob_id, after_cursor?, limit?Read mob event log
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
meerkat_spawnmob_id, specs (array of {profile, meerkat_id, runtime_mode?, initial_message?})Spawn members (batch)
meerkat_retiremob_id, meerkat_idRemove a member
meerkat_wiremob_id, a, bEstablish trusted comms channel
meerkat_listmob_idList mob members and their state
meerkat_messagemob_id, meerkat_id, contentSend a direct turn to a member

List prefabs

rkat mob prefabs

Create a mob

# From a prefab template
rkat mob create --prefab coding_swarm

# From a definition file
rkat mob create --definition ./mobs/triage/definition.json

Spawn members

rkat mob spawn my-mob lead lead-1
rkat mob spawn my-mob worker worker-1
rkat mob spawn my-mob worker worker-2

Wire and unwire peers

rkat mob wire my-mob lead-1 worker-1
rkat mob unwire my-mob lead-1 worker-2

Retire a member

rkat mob retire my-mob worker-2

Send a turn

Send a message directly to a specific mob member, triggering an LLM turn.
rkat mob turn my-mob lead-1 "Decompose the task and assign to workers."

Run a flow

Execute a named DAG flow. Steps execute in dependency order with configured dispatch modes.
rkat mob run-flow my-mob --flow triage --params '{"pr": 42}'
rkat mob run-flow my-mob --flow triage --stream --stream-view mux

Check status

rkat mob status my-mob
rkat mob list
rkat mob flows my-mob
rkat mob flow-status my-mob <run_id>

Mob events

Read the structural event log (spawns, retires, wires, flow transitions).
rkat mob events my-mob

Lifecycle

Control mob state transitions.
rkat mob stop my-mob       # pause all members
rkat mob resume my-mob     # restart members
rkat mob complete my-mob   # mark as done
rkat mob destroy my-mob    # tear down all resources

Tool-driven mob usage

The primary pattern across all surfaces: enable mob tools and let the agent orchestrate everything from a natural language request.
rkat run -M "Create a research team with a lead and 3 analysts. \
  Wire them, then run the synthesis flow."

Runtime modes

ModeBehaviorUse case
autonomous_host (default)Member runs a long-lived runtime-backed loop: admit inbox work → process → respond → sleepLong-lived agents that react to messages
turn_drivenMember only executes when explicitly given a turn via meerkat_message content dispatch or flow dispatchControlled execution, deterministic ordering
Set per-profile in the definition:
{"model": "claude-sonnet-4-5", "runtime_mode": "turn_driven", "tools": {"comms": true}}
Or per-spawn:
rkat mob spawn my-mob worker worker-1 --runtime-mode turn_driven