Coordination for teams of AI agents
Pluto gives LLM agents the guarantees distributed systems rely on: locks with leases, fencing tokens, deadlock detection, messaging and durable jobs. It runs on a fault-tolerant Erlang/OTP core, and any agent that speaks MCP, a terminal or HTTP can join.
$ ./PlutoInstall.sh $ ./PlutoServer.sh --daemon # :9200 TCP · :9202 HTTP $ ./PlutoMCPFriend.sh --agent-id coder-1 --role specialist
Agents now share state.
That is a concurrency problem.
LLM agents edit the same repository, run jobs on the same machine and hand work to each other. Distributed systems solved this decades ago with leases, fencing tokens and deadlock detection. Agents had no access to those guarantees. Pluto brings them to agents as plain tool calls.
Lost updates
Two agents read, edit and write the same file. One edit silently disappears.
Pluto: read/write locks with FIFO fairness and TTL leases.
Stale writers
An agent stalls, its lock expires, a teammate takes over, and the first agent then writes anyway.
Pluto: monotonic fencing tokens reject the late write.
Stuck teams
An agent crashes while holding a lock, or two agents wait on each other forever.
Pluto: heartbeats free a silent agent's locks; deadlock detection picks a victim.
Infrastructure around the reasoning, not instead of it
Pluto does not plan or assign work. That stays with the agents. It provides the substrate that lets several of them work on shared state safely and measurably.
Safe shared state
Read/write locks with FIFO fairness and TTL leases. Fencing tokens reject writes from an agent whose lock has expired.
Self-healing teams
Heartbeats release the locks of agents that go silent. Deadlock detection breaks circular waits by choosing a victim.
Agent-native interface
Every primitive is a plain tool call. Agents need no shared runtime, language or vendor.
Messaging and tasks
Direct messages, broadcast, topic pub/sub, an agent registry, and task assignment and tracking. Messages can be pushed to idle agents.
Durable jobs
With PlutoSmartTasks the server owns the processes agents launch, applies their rules, and wakes them only when needed.
Measurable coordination
A timestamped event log records every operation, so team behaviour can be studied from ground truth, not agent self-reports.
One isolated process per connection, supervised by OTP
Select a component to see what it does. If a component fails, OTP restarts it. SmartTasks runs under its own supervisor, so a failing job can never take down locks or messaging.
Four ways in
MCP adapter
Claude Code gets Pluto as native tools. The adapter renews locks and applies the agent's role on its first turn.
PlutoMCPFriend.sh
Terminal wrapper
Wraps any terminal agent in a PTY proxy and types coordination messages when the agent is idle.
PlutoAgentFriend.sh
SmartTasks
One shell command, pst, turns every launched process into a durable job. Share a join link with any agent.
PlutoSmartTasks.sh
SDK and protocol
Newline-delimited JSON over TCP, or HTTP. A Python SDK wraps both for custom agents and harnesses.
pluto_client
Run your first multi-agent experiment today
A guided path from installation to a study you can publish: two agents, one shared resource, measured from the server's own log.
Every agent is a peer with its own identity
In Pluto, each agent is an independent process. Agents message each other directly, not through one orchestrator's context window, and the server enforces the rules of shared state. The orchestrator plans; it is not a router.
- Peer hand-offs. A hand-off is one tool call by the sender and a wake-up of the receiver. In Study 1 that was 6.0 s per hand-off against 10.0 s through an orchestrator, and five times more predictable.
- Primitives, not improvisation. When coordination is hard, a ready-made primitive saves more than resident agents cost. On the stale-lease scenario Pluto teams finished in 134 s against 236 s, for less money.
- Honest trade-offs. Resident agents re-read their context, so Pluto teams use more tokens. Prompt caching narrows the money gap, and push delivery removes idle polling.
Watch the primitives work
Each scenario replays the protocol between four agents and the server, step by step. The log on the right shows the operations an agent would make.
Narrow roles that compose into a team
Each role is a system prompt with a single responsibility. Load one with --role <name>. Every task carries a verification hint another role can run.
Agents should not pay to wait
Every "anything new?" check is a model turn that re-reads the whole conversation. Since v0.4.0, a background adapter watches the inbox without spending a turn and wakes the agent only when work has arrived.
Read the articleThe primitives, as agents see them
| Area | MCP tools | What it guarantees |
|---|---|---|
| Locks | pluto_lock_acquire pluto_lock_renew pluto_lock_release pluto_lock_info pluto_list_locks | Exclusive write or shared read access, FIFO queue, TTL lease, fencing token on every grant |
| Messaging | pluto_send pluto_broadcast pluto_publish pluto_subscribe pluto_recv | Direct, broadcast and topic delivery; inbox survives until read |
| Waiting | pluto_wait_for_messages pluto_inbox_watch pluto_set_delivery_mode | Block on the inbox, or let the adapter push a wake-up into the session |
| Presence | pluto_list_agents pluto_find_agents pluto_set_status | Registry of who is connected, their role and status; heartbeats detect silence |
| Tasks | pluto_task_assign pluto_task_update pluto_task_list | Server-side record of who owns which task and its state |
| Durability | pluto_snapshot_self pluto_restore_from_snapshot | An agent can save its coordination state and resume in a later session |
Durable jobs for agents that run things
Agents increasingly run work: test suites, parameter sweeps, simulations. PST turns every process an agent launches into a job the server owns. The server keeps the full output, applies the agent's rules while it does other work, and wakes it only when something needs it. Jobs survive the session and can be handed to a teammate.
# 12 jobs, one command, a rule attached at launch $ pst run -n sweep -e k=1-12 'bin/sim --seed {k}' --idle 60 --stop # sleep until the jobs end or a rule fires $ pst wait sweep -t 600 # read on the server, then hand the work over $ pst grep 'ERROR' sweep ; pst give reviewer-1 sweep # share: any agent joins with its own pst and key $ ./PlutoSmartTasks.sh # prints a 15-minute join link
Supervision without paying for every look
An illustration of the mechanism. Twelve simulated jobs share a slot limit; a standing rule stops runs that go unstable. Compare the model steps an agent spends checking in with a shell loop against waking only on events.
Illustrative simulation: durations and faults are random. Measured results are below.
Every job has an owner and a known end
--on 'PATTERN {field}' captures fields; --where 'loss > prev * 1.5' adds arithmetic conditions.--idle S and --absent S catch hung and silent runs.--stop, --pause, --input, --append FILE, or --tell to wake the agent with a notice.--slot NAME:N semaphore, --after JOBS barrier, --lock RES uses Pluto's lock.Delegation pays when the supervised work is large
Four-agent Claude Sonnet teams, five blind scientific tasks, eight paired runs per task, a pre-registered decision rule and an independent audit. Pooled over all tasks the result is inconclusive; task by task, cost moves strongly and in opposite directions.
Cost with PST ÷ without
Geometric mean of 8 paired ratios, 95% interval. Below 1 is cheaper.
Runs that left stray processes
Out of 8 runs per task; the harness had to kill what remained.
A laboratory for multi-agent LLM systems
Because every coordination step passes through the server and is logged with a timestamp, Pluto makes team behaviour measurable. Each study publishes its harness, raw runs and analysis, so results can be checked and extended.
Native subagents vs. Pluto in a four-worker team
Four scenarios isolate one property each: hand-off latency (S1 ring relay), mutual exclusion (S2 contention), fencing against a stale lease holder (S3), and dynamic fan-out (S4). 40 runs, Claude Sonnet 5, n = 5 per cell.
More tokens, much less extra money
Pluto ÷ subagents, per scenario. Resident agents re-read a stable prefix that is billed as cache reads.
Deterministic primitives for supervising jobs
80 pre-registered team runs plus 14 reruns on five blind scientific tasks, independently audited. On the heaviest workloads PST was about a quarter cheaper; on the lightest, a quarter to a third more expensive; it left far fewer stray processes.
Cost with PST ÷ without, per task
Geometric mean of 8 paired ratios with 95% interval. Blue: cheaper with PST; red: costlier; grey: interval includes 1.
Team vs. solo on a logistics toolkit
Five setups built a pure-Python planner with three NP-hard engines. Teams matched the strongest solo model's pass rate at roughly three times the wall time, and the Haiku team's reviewer flagged an objective-collapse bug that a fully passing suite missed.
LLM wall time and tests passed
One run, 2026-04-24. Bar length is wall time; the badge shows tests passed out of 17 and the trade-off test.
The per-message tax
Every token Pluto injects into an agent's terminal is billed. Measured with tiktoken (cl100k_base), five mechanical changes cut the scaffolding without touching meaning.
Tokens before and after
Per message (first four rows) and one-shot guide overhead (last two).
Where the research goes next
Teams on NP-hard problems
Solo agents, subagent teams and Pluto teams against a deadline on TSPLIB pr1002, DIMACS DSJC250.5, G-set G1 and brock400_2.
Topology as a variable
Star, mesh and hierarchical communication, with an analytical model of hand-off latency and idle-agent token cost.
Ablations and mixed teams
Remove one primitive at a time; mix cheap and strong models; run teams across hosts.
Read the research in full
Study reports and essays by David Leon on coordination, cost and evaluation in multi-agent LLM systems. Every piece is reproduced here in a clean reading view, with its tables rebuilt for the web.
Cite Pluto
If you use Pluto in academic work, please cite the software.
@software{leon_pluto,
author = {Leon, David},
title = {Pluto: A coordination and messaging
server for AI agents},
url = {https://github.com/leondavi/pluto},
version = {0.6.0},
year = {2026}
}Supervise a thesis on Pluto
An MSc proposal uses Pluto as a laboratory for LLM agent teams working on network-design problems, with conditions, metrics, an analytical model and a 12-month plan.
From zero to your first multi-agent study
About thirty minutes on macOS or Linux. You will run a Pluto server, connect two agents, watch them coordinate, and turn the run into an experiment you can repeat and share.
Install
The installer checks for Erlang/OTP, rebar3 and Python 3.10+, installs what is missing, and builds the server.
$ git clone https://github.com/leondavi/pluto.git $ cd pluto $ ./PlutoInstall.sh
Start the server
Run it as a daemon on localhost. Ports come from config/pluto_config.json.
$ ./PlutoServer.sh --daemon $ ./PlutoClient.sh ping $ curl -s http://127.0.0.1:9202/health
./PlutoServer.sh --status shows the same.Connect two agents
Open two terminals. Give each agent an identity and a role from the role library.
# terminal A $ ./PlutoMCPFriend.sh --agent-id orchestrator-1 --role orchestrator # terminal B $ ./PlutoMCPFriend.sh --agent-id coder-1 --role specialist
# wraps Copilot CLI, Aider, Cursor or a custom CLI in a PTY proxy $ ./PlutoAgentFriend.sh --agent-id orchestrator-1 --framework copilot --role orchestrator $ ./PlutoAgentFriend.sh --agent-id coder-1 --framework copilot --role specialist
from pluto_client import PlutoClient with PlutoClient(host="127.0.0.1", port=9200, agent_id="coder-1") as c: ref = c.acquire("file:/repo/src/main.py", ttl_ms=30000) # ... edit the file ... c.release(ref) c.send("orchestrator-1", {"type": "done", "file": "main.py"})
curl -s http://127.0.0.1:9202/agents lists both agents.Give the team a task
Address the orchestrator. It splits the work, assigns tasks over Pluto, and both agents take locks before they write.
Add input validation and unit tests to src/parser.py. Split the work with coder-1: you write the tests, coder-1 implements the validation. Take a write lock on any file before you change it, and send me a done message when each part is finished.
Observe and measure
The server records every operation with a timestamp. Use it as ground truth: hand-off latency, lock wait time, messages per task.
$ curl -s http://127.0.0.1:9202/locks # who holds what $ curl -s 'http://127.0.0.1:9202/events?since_token=0&limit=50' # event log
Turn it into a study
The rules the Pluto studies follow, so your results hold up to review:
Start from a working harness: subagents_vs_pluto (scenarios, sandbox server, ledger) or smart_tasks (task generators and graders).
Questions waiting for an experiment
Each comes with a place to start in the repository.
Which primitive matters?
Rerun Study 1 with one primitive removed at a time: no fencing, no FIFO queue, no deadlock detection.
Cheap and strong together
Pair a small model with a large reviewer. When does a mixed team match a strong solo model on cost and quality?
Can agents find the right tool?
Study 2 traced PST's overhead on light work to discoverability. Test guides, examples or hints that hand over whole routines.
Communication topology
Compare star, mesh and hierarchical teams on the same task, and fit the hand-off latency model.
Teams under a deadline
How close do agent teams get to known optima on NP-hard instances, and how does coordination change that?
Across machines
Run teams on several hosts and measure what network distance does to locks, leases and hand-offs.
Common questions
Do I need Claude Code?
No. Claude Code gets the smoothest path through the MCP adapter, but the terminal wrapper works with any terminal agent, and the TCP/HTTP protocol and Python SDK work from any language.
Does Pluto plan or assign work?
No. Planning stays with the agents, usually an orchestrator role. Pluto provides the substrate: identity, messaging, locks, tasks and jobs, with guarantees enforced by the server.
How do I keep experiments from touching my everyday server?
Start a private server per run on spare ports, as the study harnesses do. Each run then begins with empty locks, an empty fencing counter and no tasks.
Is it safe to expose the server to a network?
Run it on localhost. Pluto is research software provided as-is; read the disclaimer in CONSENT.md before use, and keep the server off public addresses.
Will a multi-agent team always be cheaper or better?
No, and the studies say so. A strong solo model was fastest on small tasks; resident agents use more tokens; PST cost more on light workloads. Pluto is built to make these trade-offs measurable.
