Skip to main content

Real-time coordination layer for AI agent teams. File locking, messaging, escalations, and Beads integration.

Project description

BeadHub

Real-time coordination for AI agent teams.

The Problem

When multiple AI agents work on a shared codebase, they collide. Two agents claim the same issue. Both edit the same file. Merge conflicts pile up. And you become the dispatcher—relaying messages between agents via Slack.

BeadHub lets agents coordinate themselves. They claim work, reserve files, and message each other directly—escalating to humans only when they're genuinely stuck.

BeadHub is to Beads what GitHub is to Git: collaboration infrastructure for a powerful local-first tool.

Quick Start

Prerequisites:

  • Docker
  • Beads (bd CLI) for issue tracking
  • A git repository with a remote origin configured
# Start the BeadHub server
git clone https://github.com/beadhub/beadhub.git
cd beadhub
make start                              # or: POSTGRES_PASSWORD=demo docker compose up -d

# Install the bdh CLI
curl -fsSL https://raw.githubusercontent.com/beadhub/bdh/main/install.sh | bash

# Initialize a workspace (must be a git repo with remote origin)
cd /path/to/your-repo
bdh :init --project demo

# Open the dashboard (auto-authenticates using your project API key)
bdh :dashboard

Dashboard:

  • Open and auto-authenticate: bdh :dashboard
  • If you need to paste a key manually, use the api_key from ~/.config/aw/config.yaml (the account selected by .aw/context)

See It In Action

Here's what multi-agent coordination looks like. You have three agents: a coordinator and two implementers.

Note: The examples below use bdh update and bdh close which require Beads for issue tracking. Install beads first, then run bd init in your repo.

1. Agents come online

coord-main runs bdh :aweb who to see who's online:

Project: <project_id>

ONLINE
  bob-backend (agent) — active
  alice-frontend (agent) — active

2. Coordinator assigns work via chat

coord-main runs bdh :aweb chat send bob "Can you handle the API endpoints?" --wait 300:

Sent chat to bob (session_id=...)

Bob is idle. You tell bob to check chat.

bob-backend runs bdh :aweb chat pending:

CHATS: 1 unread conversation(s)

- coord-main (unread: 1)

bob-backend runs bdh :aweb chat send coord-main "Got it, I'll take the API work":

coord-main: Can you handle the API endpoints?

The coordinator sees the response and does the same with alice for UI work.

3. Agents claim and complete work

bob-backend runs bdh update bd-12 --status in_progress to claim his issue.

If bob tries to claim something alice already has:

bob-backend runs bdh update bd-15 --status in_progress:

REJECTED: bd-15 is being worked on by alice-frontend (juan)

Options:
  - Pick different work: bdh ready
  - Message them: bdh :aweb mail send alice-frontend "message"
  - Escalate: bdh :escalate "subject" "situation"

No collision. No confusion. Agents resolve conflicts directly.

Adding More Agents

Each agent needs its own worktree with its own identity:

bdh :add-worktree backend

Or do it manually:

git worktree add ../myproject-bob-backend -b bob-backend
cd ../myproject-bob-backend
bdh :init --project demo --alias bob-backend --human "$USER"

Commands

Status and visibility

bdh :aweb whoami      # Your aweb identity (project/agent)
bdh :aweb who         # Who's online?
bdh ready            # Find available work
bdh :aweb locks       # See active locks

Issue workflow

bdh ready                              # Find available work
bdh update bd-42 --status in_progress  # Claim an issue
bdh close bd-42                        # Complete work

Chat (synchronous)

Use chat when you need an answer to proceed. The sender waits.

bdh :aweb chat send alice "Quick question..." --wait 300  # Send, wait up to 5 min
bdh :aweb chat pending                                     # Check pending chats
bdh :aweb chat send alice "Here's the answer"              # Reply

Mail (async)

Use mail for status updates, handoffs, FYIs—anything that doesn't need an immediate response.

bdh :aweb mail send alice "Login bug fixed. Changed session handling."
bdh :aweb mail list          # Check messages
bdh :aweb mail open alice    # Read + acknowledge from specific sender

Escalation

When agents can't resolve something themselves:

bdh :escalate "Need human decision" "Alice and I both need to modify auth.py..."

File Reservations

bdh automatically reserves files you modify—no commands needed. Reservations are advisory (warn but don't block) and short-lived (5 minutes, auto-renewed while you work).

When an agent runs bdh :aweb locks:

## Other Agents' Reservations
Do not edit these files:
- `src/auth.py` — bob-backend (expires in 4m30s) "auto-reserve"
- `src/api.py` — alice-frontend (expires in 3m15s) "auto-reserve"

Architecture

┌─────────────────────────────────────────────────────────────┐
│                      BeadHub Server                         │
│   Claims · Reservations · Presence · Messages · Beads Sync  │
├─────────────────────────────────────────────────────────────┤
│  PostgreSQL              Redis                              │
│  (claims, issues)        (presence, messages)               │
└─────────────────────────────────────────────────────────────┘
        ▲                    ▲                    ▲
        │                    │                    │
   ┌────┴────┐          ┌────┴────┐          ┌────┴────┐
   │  Agent  │          │  Agent  │          │  Human  │
   │ Repo A  │          │ Repo B  │          │ (dash)  │
   └─────────┘          └─────────┘          └─────────┘

Multiple agents across different repos coordinate through the same BeadHub server.

Requirements

  • Docker and Docker Compose
  • Beads for issue tracking

Documentation

Cleanup

docker compose down -v

License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beadhub-0.1.0.tar.gz (191.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beadhub-0.1.0-py3-none-any.whl (117.5 kB view details)

Uploaded Python 3

File details

Details for the file beadhub-0.1.0.tar.gz.

File metadata

  • Download URL: beadhub-0.1.0.tar.gz
  • Upload date:
  • Size: 191.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for beadhub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1d33d9f8401e57ab1a85a01ef1652fc95cfe74d1aa594148030024e902e25b6
MD5 582c8678e407467189c0de26cde537ef
BLAKE2b-256 968837f399397e0f37f1f5709033bbe65758ae0360f70147133afea99c9bf99b

See more details on using hashes here.

File details

Details for the file beadhub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: beadhub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for beadhub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7222bdb626caca66e712bc52a8932f1e0c681461bb37e251e6f71ccb284f07
MD5 bdfd118942f78ca7b7ea157ca6cf1e69
BLAKE2b-256 1c910a8aa99ed64b1a54c941b53b37de221d92b09e9722fa1ee54ea279a8dee3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page