Agent concurrency
Pull requests assume a few people changing a few files a day. A swarm of agents breaks that: almost every change collides at file level. These five rules are what let most of the swarm land. Try them below.
Two agents editing different functions in one file never collide. Conflicts are judged on path#symbol.
Adding to a route table, an index or a changelog can land in any order, so those edits never block each other.
Every change that does not overlap lands in the same commit, so throughput grows with the swarm instead of queuing behind it.
A stale change is re-run from its stated intent on the new head. Only after three tries does it reach a person.
Rules like “pricing is never empty” are checked before landing. A violating change is blocked, not merged and reverted.
The landing API keeps no state. Send the head you last saw and a batch of changes; get back the next head and a decision for each change. Pick a template, edit it, and run it one round at a time or all the way to settled.
One change lands, one replays, one is blocked by an invariant.
Press Land to see what happens to each change.
curl -s -X POST "$ORIGIN/api/swarm/land?settle=1" -H 'content-type: application/json' -d @changes.jsonGET /api/swarm/land returns the schema summary and every template above, so an agent can learn the protocol from the endpoint itself.
Replaying this repository's recent commits…
Nothing here is specific to source files. A key is any named piece of shared state, so the same rules govern many agents writing to one world model. Try the Shared world model template above.
Each object or belief is a key, such as world/kitchen#cup. Perception, prediction and planning agents propose updates; updates to different objects land in one step, however many agents there are.
A JEPA predicts the next state in latent space from the state it saw. If that state moved first, the prediction is stale: replay means re-predicting from the new head, not merging two guesses.
Invariants are hard constraints checked before a state is accepted. A model whose output breaks one is blocked, so an impossible world state never lands and never has to be rolled back.
Sensor readings and event logs are appends. Many sources can record at once without blocking each other, while the beliefs derived from them still conflict-check normally.
What this does not do: it does not train or run a JEPA. It decides which of many proposed state updates are accepted, which must be re-predicted against newer state, and which break a hard rule.
| Model | Conflict unit | Batched | Stale change | Appends |
|---|---|---|---|---|
| Pull requests | File | No | Waits for a person | Conflict |
| Merge queue | File | Yes | Replayed up to 3× | Conflict |
| Swarm | Symbol | Yes | Replayed up to 3× | Commute |
Built after reading 27 entries to Cloudflare's Artifacts challenge. Most give each agent a fork and pick a winner; this page measures what happens to throughput when the fork count reaches six figures.
The last 30 commits on this branch, treated as if they had all been made at the same moment from one base. Each commit writes the files it really touched. The table shows how many could have landed together under each strategy.
Not recorded: there is no git checkout on this deployment, so there are no commits to replay.