Coordination tools manage the entire swarm lifecycle: initializing a topology, spawning typed agents into it, assigning tasks, and tearing down when work is complete. All coordination calls return instantly — they write state records that the learning loop and monitoring tools consume. The executor (Claude Code or Codex) continues working immediately after each call.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ruvnet/ruflo/llms.txt
Use this file to discover all available pages before exploring further.
swarm_init
Initialize a new agent swarm for coordinated task execution. This is typically the first tool call in any multi-agent session. The returned swarmId is passed to subsequent agent_spawn and task_orchestrate calls.
Swarm topology. Controls how agents communicate and share context.
hierarchical— Queen-led. Strategic queen directs tactical queens which direct worker agents. Best for large, structured tasks.mesh— Peer-to-peer. All agents communicate directly. Best for parallel, loosely coupled tasks.ring— Agents pass context in a ring. Best for pipeline-style workflows.star— Centralized coordinator with spoke workers. Best for tasks requiring a single point of coordination.
Maximum number of agents in the swarm. Additional spawn requests above this limit are queued until a slot opens.
Consensus algorithm for fault-tolerant decision-making when agents disagree.
raft— Leader-elected majority. Best general-purpose choice.byzantine— Tolerates up tof < n/3malicious or faulty agents. Use when correctness is critical.gossip— Eventually consistent, low overhead. Best for large swarms where strict consistency is not required.
Optional high-level task objective stored in the swarm record. Surfaced in
swarm_status output and used by the intelligence loop to match patterns.agent_spawn
Spawn a specialized agent within an existing swarm. Each agent type carries a pre-trained skill set. Spawning is fast — the call registers the agent in the coordination ledger and returns immediately.
Agent specialization. Determines which skills and routing patterns apply.
| Type | Purpose |
|---|---|
coder | Writes, refactors, and debugs code |
tester | Generates and runs test suites |
reviewer | Performs code review and quality checks |
architect | Designs system structure and ADRs |
security | Runs vulnerability scans and threat modeling |
docs | Generates and maintains documentation |
coordinator | Orchestrates other agents in the swarm |
researcher | Analyzes requirements and investigates unknowns |
Human-readable agent name. Used in monitoring output and memory namespacing. If omitted, Ruflo generates a name like
coder-7f2a.Swarm to join. If omitted, the agent is spawned without a swarm and operates independently. Pass the
swarmId returned by swarm_init to add the agent to a coordinated swarm.LLM model override for this specific agent. Useful for routing expensive architecture work to
claude-opus while keeping coder agents on claude-haiku for cost efficiency. If omitted, the Thompson sampling model router selects the best tier automatically.task_orchestrate
Assign and orchestrate a task across swarm agents. The coordinator routes the task to the most suitable idle agent based on type preference, current load, and learned routing patterns from the intelligence loop.
Natural language task description. The intelligence loop uses this for semantic matching against stored patterns — more descriptive descriptions produce better routing.
Target swarm. The task is distributed among the swarm’s agents according to the swarm’s topology and consensus rules.
Preferred agent type for this task. If an agent of this type is idle in the swarm, it receives the task first. Falls back to the best available agent if the preferred type is busy.
Task priority in the queue.
low— Processed after all normal and high priority tasksnormal— Default queue positionhigh— Jumps ahead of normal priority taskscritical— Processed immediately, may preempt running tasks
swarm_stop
Stop a running swarm and gracefully terminate its agents. In-progress tasks are checkpointed to memory before shutdown.
The swarm to stop.
When
true, successful task patterns are written to the memory store before shutdown so the intelligence loop can reuse them in future sessions.