Stop two agents from doing the same work.
Your agents can keep their prompts, tools, queues, and runtimes. OctoStore gives them one shared answer before side effects begin: who is leader, who owns this task, and whether that authority is still alive.
The agents are behaving correctly. The fleet is not.
Atlas sees an issue and starts a branch. Comet sees the same issue from another queue and starts another. Both agents followed their instructions. The system forgot to settle ownership first.
Put one small referee between “I found work” and “I changed something.”
Choose the smallest primitive that settles the argument.
| Question | Primitive | Use it for |
|---|---|---|
| Who coordinates the fleet right now? | /elections | Dispatchers, schedulers, reconcilers, maintenance leaders |
| Who owns this exact work item? | /locks | Issues, tickets, queue items, deploys, migrations, evaluations |
Elect one agent without creating an account.
Open a random room and let every candidate campaign. The winner receives a short lease, monotonic term, and secret leader token. Followers receive the same leader and exactly when to try again.
ROOM=$(curl -s -X POST https://api.octostore.io/elections \
| jq -r .election_id)
curl -s -X POST \
"https://api.octostore.io/elections/$ROOM/campaign" \
-H "Content-Type: application/json" \
-d '{
"candidate_id":"dispatcher-west",
"ttl_seconds":30,
"metadata":"fleet=support-agents"
}'
Claim work before tools touch it.
For durable ownership, derive one lock name from the task. Authenticated agents race to acquire it. One gets the lease; the rest skip or wait.
curl -s -X POST \
https://your-octostore.internal/locks/github-issue-1842/acquire \
-H "Authorization: Bearer $OCTOSTORE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ttl_seconds":120,
"metadata":"agent=atlas run=https://trace.example/7f2a"
}'
Build the safety loop around the lease.
OctoStore does not run your agents.
That boundary is the point. OctoStore coordinates authority. Your system still decides what work means, which model or tool runs, and how side effects become safe.
- Keep irreversible actions behind human or policy gates.
- Write downstream operations so retries are safe.
- Pass fencing terms to resources that can reject stale writers.
- Use sessions when many ephemeral locks should disappear with one agent process.
- Use watches or webhooks when operators and reconcilers need change events.
Run the referee where the agents run.
OctoStore is one Rust binary backed by one SQLite database in WAL mode. Start with static tokens. Add GitHub OAuth only if humans need it. Disable public elections on private installations with PUBLIC_ELECTIONS=false.