Skip to content

Run agentsas a team.

A writer, a few reviewers and a coordinator, exchanging letters on one cluster. Every letter lands in an append-only log that replays offline.

  • 20agents working together on one machine for 600 s
  • 307letters, zero tool errors
  • 3.6msserver-side time to send a letter (p50)

From the Fermat council report in this repository: one machine, a light load, not a capacity benchmark.

Get started Documentation GitHub ↗
$pip install pulsing

A run from 2026-12-02: model deepseek-v4.1-flash, one machine. Letters are replayed in log order with the waits shortened; each dot is one letter. The coordinator is open source in the the write-review team example, and takes any model Codex can reach.

Protocol

How a letter moves

A mailbox is an actor. Delivery, reading, claiming and finishing all run inside it, one at a time, so the state cannot disagree with itself.

The second letter is claimed straight from unread. Its lease runs out, another worker takes it over, and it still ends as failed. Reviewers and workers use these seven MCP tools to send and read mail; no model changes needed.

A retry stays one letter

Every letter carries an idempotency key. The same key with the same content returns the original letter; different content is rejected.

A claim is a token, and the token expires

Claiming a task returns a token and a lease. When the lease runs out someone else can take over, and the old token can no longer overwrite the result.

Replies stay on the thread

A reply keeps the thread and the id of the letter it answers, so the discussion continues without anyone carrying context between sessions.

Reading is not taking the task

Reading only marks a letter read. Work starts with a claim and ends with a finish backed by the token.

Measured

Real runs, with what the numbers mean

Single runs, not success rates. Both event logs replay offline, with no model calls.

The write-review team behind the replay

The coordinator is a program, not a model. Code moves the work forward on events and timeouts: dispatch, fan out, collect, send back, wrap up.

Team
9 workers: one writer, eight reviewers
Rounds
3 rounds. Four reviewers asked for changes in round 1, one in round 2, none in round 3
Letters
76 letters; the slowest took 3 ms to deliver
Sealed tests
the hidden test passed; 10 existing tests sampled, none broken
Log audit
30 checks passed; one did not (a diagram file was missing)
Setup
model deepseek-v4.1-flash; task pylint-5859; one machine
The open version
run twice on the public task: clean in one round both times, acceptance tests 7/7, in 256 s and 387 s
After a crash
SIGKILL on the director in the middle of the review round, then a resume from the same run directory: 7 of 8 reviewers CLEAN (the eighth never replied), acceptance tests 7/7, about ten minutes from start to finish
The replay above runs on this run's log ↑

The coordinator, the checklist and the prompts: write-review team

A 20-agent council on Fermat's Last Theorem

The report is in this repository; these are its own numbers.

Team
20 agents: two roots, eighteen subagents, one machine
Time
a 600 s budget. The roster froze at 273 s, against a planned 45 s
Letters
307 letters, 124 of them across two companion instances
Tool calls
1,465 calls. Tool errors, missing responses and actor refusals: all zero
Sending
server-side p50 3.644 ms, p95 4.966 ms
Verdict
it did not pass every acceptance stage of its own plan

Mailbox delivery was not the main bottleneck; agent startup, waiting for mail and wrapping up reports were slower.

Read the full report →

Runtime

Underneath: an actor runtime

A Rust core with a Python interface. Add @remote to a class and it is an actor the cluster can find by name.

counter.pyPython
import asyncio
import pulsing as pul


@pul.remote
class Counter:
    def __init__(self, value=0):
        self.value = value

    def inc(self):
        self.value += 1
        return self.value


async def main():
    await pul.init()
    try:
        counter = await Counter.spawn(value=0, name="counter")
        print(await counter.inc())  # 1
        print(await counter.inc())  # 2
    finally:
        await pul.shutdown()


asyncio.run(main())

Zero external dependencies

Pure Rust and Tokio. No Redis, etcd, NATS or Consul; one pip package is all of it.

pip install pulsing

Built-in discovery

SWIM and gossip find nodes and detect failures. To add a machine, give it one seed address.

pul.init(addr=…, seeds=[…])

Location transparency

Local or remote, it is await actor.method(). Named actors are found by name with resolve.

await Actor.resolve("name")

Streaming and restarts

Streaming responses with backpressure. Per-actor restarts and backoff are configurable; there is no supervision tree yet.

spawn(…, restart_policy=…)

Limits

What it does not do yet

This is the honest state of the current version, so you do not find out the hard way.

Mailboxes are in memory by defaultWithout a state directory a restart loses the letters, their states, leases and idempotency keys. A state directory makes a mailbox recover after a process crash, but not after a power loss; there is still no cross-machine replication or HA.
No cross-machine replication or HAWhen a machine stops, the mailboxes on it stop with it.
Trusted machines and private clusters onlyThe MCP identity binding prevents mistakes; it is not authentication. Keep the ports off the public internet and never put secrets in a letter.
No exactly-once for side effectsIf an agent crashes after running a tool, whoever takes over must check what already happened before going on.

Persistence is on the roadmap.

Get started

Three steps to running code

None of these needs a model or a cluster. The mailbox example in step three uses the deterministic role functions shipped in the repository.

1

Install

pip install pulsing
2

Call it from another process

Replace the pul.shutdown() at the end of the code above with a wait, so the node stays up. A second process joins through the seed address and finds the same actor, which lives in the first process, by name.

# terminal 1: start a node and keep it alive
await pul.init(addr="127.0.0.1:18111")
counter = await Counter.spawn(value=0, name="counter")
print(await counter.inc())  # 1

# terminal 2: join through the seed, find the same actor
await pul.init(addr="127.0.0.1:18112", seeds=["127.0.0.1:18111"])
counter = await Counter.resolve("counter")
print(await counter.inc())  # 2
Quick start →
3

Give coding agents mailboxes

Each Codex gets a companion Pulsing process, with mailboxes for its agents and subagents. On several machines, point them at the same seed.

pip install 'pulsing[mailbox]'
pulsing -- codex
# first machine
SEED=10.0.0.10:8100 pulsing -- codex
# another machine
SEED=10.0.0.10:8100 pulsing -- codex
Companion launcher →

Questions

Questions people ask

More questions →

What is Pulsing?

A distributed actor runtime built in Rust and designed for Python. Streaming first, zero dependencies, built-in discovery: it connects agents and services across machines without Redis, etcd or YAML.

How does it relate to Ray?

They complement each other. Ray is good at distributed scheduling and resource management; Pulsing adds streaming, cross-node actor discovery and direct actor-to-actor calls that skip the object store. pul.mount() connects a Ray actor to the Pulsing network.

Is the mailbox layer a finished product?

No. It is a prototype for trusted machines and private clusters. Mailboxes are in memory by default; a state directory lets them survive a process crash, but there is no cross-machine replication or HA, and no authentication. The limits section above lists all of it.

Run agents as a team.

One pip package. No cluster and no model needed to run your first actor.