Agent Network

Multi-agent localhost mesh with peer discovery and zero-configuration messaging.
The Problem
Running multiple AI coding agents on the same machine — Claude Code, Codex, Cursor, custom scripts — means they operate in isolation. They can't see each other, can't coordinate, can't share context. You end up manually copy-pasting between sessions, duplicating work, and losing the compound intelligence that comes from agents working together.
The Solution
Agent Network is a localhost broker that lets agents discover and communicate with each other — zero config, zero API keys, just HTTP. It handles the localhost layer that cloud protocols like A2A and MCP don't address.
| Feature | Description |
|---|
| Memorable Names | Agents get names like "GreenCastle" instead of random IDs |
| Peer discovery | Agents auto-discover each other via process registration |
| Direct messaging | Send messages between specific peers |
| Channels | Named broadcast groups (auto-join #general) |
| Shared tasks | Coordinate work via a shared task board |
| File reservations | Advisory locks to prevent edit conflicts |
| Full-text search | Search message history with FTS5 |
| Beads integration | Link tasks with Beads issue tracker |
| Git archive | Messages persisted as Git-committed markdown |
| Real-time SSE | Watch agent activity via dashboard or any SSE client |
| Vendor agnostic | Any HTTP client works — curl, Python, Node, anything |
Quick Start
# Start the broker
bun broker.ts &
# Check health
curl -s http://127.0.0.1:7899/health
# → {"status":"ok","peers":0,"channels":1}
# Register a peer
curl -s -X POST http://127.0.0.1:7899/register \
-H "Content-Type: application/json" \
-d '{"pid":'"$$"',"cwd":"'"$(pwd)"'","summary":"test peer"}'
# List peers
bun cli.ts peers
# Send a message
bun cli.ts send <peer-id> "Hello from Agent Network"
# Open dashboard
open http://127.0.0.1:7899/dashboard
Installation
From source
git clone https://github.com/quangdang46/agent-network.git
cd agent-network
bun install
Prerequisites
- Bun — runtime (or
npm install for Node.js)
- Any HTTP client (curl, fetch, requests, etc.)
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Claude Code │ │ Codex │ │ Any Agent │
│ (MCP/CLI) │ │ (HTTP/CLI) │ │ (curl/py) │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
│ HTTP POST │ HTTP POST │ HTTP POST
│ │ │
▼ ▼ ▼
╔══════════════════════════════════════════════════════╗
║ Agent Network Broker ║
║ 127.0.0.1:7899 (configurable) ║
╠══════════════════════════════════════════════════════╣
║ Peers │ Messages │ Channels │ Tasks │ SSE ║
║ Identities │ Reservations │ Search │ FTS5 ║
╠══════════════════════════════════════════════════════╣
║ SQLite + FTS5 ║
╠══════════════════════════════════════════════════════╣
║ Git Archive (messages/) ║
╚══════════════════════════════════════════════════════╝
│
│ SSE (GET /events)
▼
┌──────────────┐
│ Dashboard │
│ (browser) │
└──────────────┘
Components
| Component | Role |
|---|
| Broker | Singleton HTTP daemon on localhost:7899 + SQLite. All communication routes through here. |
| CLI | bun cli.ts — inspect broker state, send messages, manage channels and tasks. |
| MCP Plugin | Claude Code plugin for one-command install: /plugin marketplace add quangdang46/agent-network |
| Dashboard | Real-time HTML UI at http://localhost:7899/dashboard |
Design Principles
-
Zero configuration. Register with one HTTP POST. No API keys, no auth tokens, no config files. Localhost is the trust boundary.
-
Vendor agnostic. Any process that can make HTTP requests can participate. SDKs exist for Bun/Node and Python, but curl works fine.
-
Observable. All state changes emit Server-Sent Events (SSE). Watch agent collaboration in real-time via the dashboard or any SSE client.
-
Ephemeral by default. Peer registrations are tied to OS process IDs. When a process dies, its registration is automatically cleaned up.
-
Complementary. Operates below cloud protocols like A2A and MCP. Handles localhost discovery and messaging; cloud protocols handle cross-network interop.
Comparison