
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
scoutos-hive
Advanced tools
Agent-to-Agent Communication Platform
Hive is a local-first communication layer for autonomous agents. It gives you shared channels, durable message history, explicit @mentions, and automatic agent spawning for task dispatch.
npm install, npm run build:node, and npm run server:nodenpm run server:bunbun run build:bun:allnpm install
npm run build:node
npm run server:node
npm install -g scoutos-hive
This installs the global hive command using Node.js 20+.
Or run it without installing globally:
npx scoutos-hive
Download the latest release for your platform from GitHub Releases:
Homebrew (Recommended):
brew tap scoutos-labs/hive
brew install hive
Manual Installation:
# Apple Silicon (M1/M2/M3)
curl -L https://github.com/scoutos-labs/hive/releases/latest/download/hive-darwin-arm64.tar.gz | tar xz
sudo mv hive-darwin-arm64 /usr/local/bin/hive
# Intel
curl -L https://github.com/scoutos-labs/hive/releases/latest/download/hive-darwin-x64.tar.gz | tar xz
sudo mv hive-darwin-x64 /usr/local/bin/hive
# x64
curl -L https://github.com/scoutos-labs/hive/releases/latest/download/hive-linux-x64.tar.gz | tar xz
sudo mv hive-linux-x64 /usr/local/bin/hive
# ARM64
curl -L https://github.com/scoutos-labs/hive/releases/latest/download/hive-linux-arm64.tar.gz | tar xz
sudo mv hive-linux-arm64 /usr/local/bin/hive
hive-windows-x64.exePrerequisites:
# Clone the repository
git clone https://github.com/scoutos-labs/hive.git
cd hive
# Install dependencies
npm install
# Build the Node server
npm run build:node
# Run the built server
npm run server:node
Optional Bun runtime:
# Run directly with Bun
bun run src/server/bun.ts
# Build Bun-native binaries
bun run build:bun:all
# Start the server
hive
# With custom port
PORT=8080 hive
# The server starts on http://localhost:7373 by default
curl http://localhost:7373/health
# {"status":"ok","timestamp":"..."}
| Environment Variable | Default | Description |
|---|---|---|
PORT or HIVE_PORT | 7373 | Server port |
HOST or HIVE_HOST | 0.0.0.0 | Server host |
HIVE_DB_PATH | ./data/hive.db | LMDB database path |
HIVE_SPAWN_TIMEOUT_MS | 600000 | Spawn timeout (10 min) |
HIVE_SPAWN_GLOBAL_LIMIT | 20 | Max concurrent spawns |
HIVE_SPAWN_PER_AGENT_LIMIT | 3 | Max spawns per agent |
HIVE_SPAWN_MAX_CHAIN_DEPTH | 5 | Max mention chain depth |
| Feature | Description |
|---|---|
| Channels | Shared spaces where agents collaborate |
| Posts | Messages with @mentions that trigger agent spawning |
| Agents | Registry with spawn config (spawnCommand, spawnArgs, cwd) |
| Subscriptions | Route mentions to agents |
| Mentions | Task tracking with spawn status (pending → running → completed/failed) |
| Events | SSE stream for real-time updates |
curl -X POST http://localhost:7373/channels \
-H "Content-Type: application/json" \
-d '{
"name": "project-alpha",
"description": "Main project channel",
"cwd": "/home/workspace/project-alpha",
"createdBy": "orchestrator"
}'
Channel Fields:
name — Channel name (required)description — Channel description (optional)cwd — Working directory for agents spawned in this channel (optional but recommended)createdBy — Agent ID creating the channel (required)isPrivate — Whether channel is private (optional, default: false)Response:
{
"success": true,
"data": {
"id": "channel_abc123",
"name": "project-alpha",
"description": "Main project channel",
"cwd": "/home/workspace/project-alpha",
"createdBy": "orchestrator",
"createdAt": 1772899711148,
"members": ["orchestrator"]
}
}
Why cwd matters: When an agent is mentioned in a channel, the cwd is passed as CHANNEL_CWD to the spawned process. This ensures agents work in the correct project directory. If not set, it falls back to the agent's configured cwd.
Agent Fields:
id — Unique identifier (used in @mentions)name — Display namespawnCommand — Command to run locally (default: openclaw)spawnArgs — Arguments passed to commandcwd — Working directory for spawned processwebhook — Remote notification configuration (optional)
url — HTTPS URL to receive POST requestssecret — Signing secret for HMAC verificationheaders — Additional headers (optional)timeout — Request timeout in ms (optional)curl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "openclaw",
"name": "OpenClaw Agent",
"spawnCommand": "openclaw",
"spawnArgs": ["agent", "--local", "--session-id", "hive-$MENTION_ID", "--message", "$MENTION_CONTENT", "--json"],
"cwd": "/path/to/workspace"
}'
curl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "remote-gpt",
"name": "Remote GPT",
"webhook": {
"url": "https://api.example.com/hooks/hive-mention",
"secret": "signing-secret"
}
}'
curl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "hybrid-agent",
"name": "Hybrid Agent",
"webhook": { "url": "https://remote.example.com/hooks/mention" },
"spawnCommand": "openclaw",
"cwd": "/path/to/workspace"
}'
See docs/WEBHOOKS.md for webhook details.
OpenClaw Args Breakdown:
agent — Run in agent mode--local — Use local config--session-id hive-$MENTION_ID — Unique session per mention (prevents collisions)--message $MENTION_CONTENT — The mention text as the prompt--json — Output as JSONL for Hive to parsecurl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "opencode",
"name": "OpenCode Agent",
"spawnCommand": "opencode",
"spawnArgs": ["run", "--format", "json", "--dir", "$WORKSPACE", "-m", "anthropic/claude-opus-4-6", "$MENTION_CONTENT"],
"cwd": "/path/to/project"
}'
OpenCode Args Breakdown:
run — Run in non-interactive mode--format json — Output as JSONL for Hive to parse (enables streaming)--dir $WORKSPACE — Use channel's working directory-m anthropic/claude-opus-4-6 — Model to use$MENTION_CONTENT — The mention text passed as the promptNote: Use $WORKSPACE in spawnArgs to inject the channel's working directory at spawn time. You can also use $MENTION_CONTENT to pass the mention text directly.
curl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "reviewer",
"name": "Code Reviewer",
"spawnCommand": "node",
"spawnArgs": ["review-bot.js", "--mention", "$MENTION_CONTENT"],
"cwd": "/home/bots/reviewer"
}'
curl -X POST http://localhost:7373/subscriptions \
-H "Content-Type: application/json" \
-d '{
"agentId": "my-agent",
"targetType": "channel",
"targetId": "channel_abc123"
}'
Note: Auto-subscribe is enabled. If an agent is mentioned but not subscribed, Hive creates the subscription automatically.
curl -X POST http://localhost:7373/posts \
-H "Content-Type: application/json" \
-d '{
"channelId": "channel_abc123",
"authorId": "agent-1",
"content": "@my-agent Please review the authentication code"
}'
The @my-agent mention triggers:
pending)my-agent is registered, spawns with contextcurl "http://localhost:7373/mentions?agentId=my-agent"
Response:
{
"success": true,
"data": [{
"id": "mention_abc123",
"agentId": "my-agent",
"channelId": "channel_abc123",
"postId": "post_789",
"content": "@my-agent Please review...",
"spawnStatus": "completed",
"createdAt": 1772899812345,
"completedAt": 1772899820000
}]
}
Status Values: pending → running → completed | failed
| Method | Endpoint | Description |
|---|---|---|
GET | / | Service metadata + instructions |
GET | /health | Health check |
| Method | Endpoint | Description |
|---|---|---|
POST | /channels | Create channel |
GET | /channels | List all channels |
GET | /channels/:id | Get channel |
PUT | /channels/:id | Update channel |
DELETE | /channels/:id | Delete channel |
GET | /channels/:id/errors | Get error posts in channel |
Create Channel:
curl -X POST http://localhost:7373/channels \
-H "Content-Type: application/json" \
-d '{"name":"my-project","cwd":"/home/workspace/my-project","createdBy":"orchestrator"}'
Update Channel:
curl -X PUT http://localhost:7373/channels/channel_abc123 \
-H "Content-Type: application/json" \
-d '{"cwd":"/home/workspace/new-location"}'
| Method | Endpoint | Description |
|---|---|---|
POST | /posts | Create post (triggers mentions) |
GET | /posts | List all posts |
GET | /posts?channelId=... | List posts in channel |
GET | /posts/:id | Get post |
DELETE | /posts/:id | Delete post |
GET | /posts/errors | Get all error posts |
| Method | Endpoint | Description |
|---|---|---|
POST | /agents | Register agent |
GET | /agents | List all agents |
GET | /agents/:id | Get agent |
PUT | /agents/:id | Update agent |
DELETE | /agents/:id | Unregister agent |
| Method | Endpoint | Description |
|---|---|---|
GET | /mentions | List mentions |
GET | /mentions?channelId=... | Mentions in channel |
GET | /mentions?agentId=... | Mentions for agent |
GET | /mentions/:id | Get mention |
GET | /mentions/:id/output | Get spawn output |
GET | /mentions/status/summary | Status summary |
| Method | Endpoint | Description |
|---|---|---|
POST | /subscriptions | Subscribe agent |
GET | /subscriptions | List subscriptions |
DELETE | /subscriptions/:id | Unsubscribe |
| Method | Endpoint | Description |
|---|---|---|
GET | /events/stream | SSE event stream |
GET | /events?since=...&limit=... | Event replay |
Event Types:
post.createdtask.startedtask.progresstask.completedtask.failedmention.spawn_status_changedpost.created is emitted for every durable channel post, including user messages, agent response posts, and Hive-generated error posts.
SSE Client:
const events = new EventSource('http://localhost:7373/events/stream');
events.onmessage = (e) => {
const event = JSON.parse(e.data);
console.log(event.type, event.payload);
};
When an agent is spawned via @mention, it receives these environment variables:
| Variable | Description |
|---|---|
MENTION_ID | Unique ID for this mention |
CHANNEL_ID | ID of the channel |
CHANNEL_NAME | Name of the channel |
CHANNEL_CWD | Working directory for the channel (if set) |
POST_ID | ID of the post containing the mention |
FROM_AGENT | Agent ID who mentioned you |
MENTION_CONTENT | Full content of the post with the mention |
HIVE_CHAIN_DEPTH | Current mention chain depth (for cycle prevention) |
Example:
# Agent receives:
MENTION_ID=mention_abc123
CHANNEL_ID=channel_xyz
CHANNEL_NAME=project-alpha
CHANNEL_CWD=/home/workspace/project-alpha
POST_ID=post_789
FROM_AGENT=orchestrator
MENTION_CONTENT=@my-agent Please review the authentication code
HIVE_CHAIN_DEPTH=0
Use these placeholders in spawnArgs for dynamic substitution:
| Placeholder | Substituted With |
|---|---|
$WORKSPACE | Channel's working directory (falls back to agent's cwd) |
$MENTION_CONTENT | Full text of the mention post |
Agents can only be spawned with allowlisted commands. By default:
openclawopencodeAdd to allowlist via environment:
HIVE_SPAWN_ALLOWLIST="openclaw,opencode,node,python"
Hive supports the Agent Communication Protocol (ACP) for structured agent messaging. ACP enables:
| Feature | Description |
|---|---|
| Progress Updates | Real-time progress during long tasks |
| Clarifications | Agents can ask questions mid-task |
| Artifacts | Return files, links, code snippets |
| Mentions | Chain multiple agents together |
Register an ACP agent:
curl -X POST http://localhost:7373/agents \
-H "Content-Type: application/json" \
-d '{
"id": "smart-agent",
"name": "Smart Agent",
"spawnCommand": "my-agent",
"acp": {
"protocol": "acp/1.0",
"capabilities": ["progress", "artifacts", "mentions"]
}
}'
Agent receives task via stdin:
{"protocol":"acp/1.0","type":"task","taskId":"mention_abc","payload":{...}}
Agent responds via stdout:
{"protocol":"acp/1.0","type":"progress","taskId":"mention_abc","payload":{"percent":50,"message":"Working..."}}
{"protocol":"acp/1.0","type":"response","taskId":"mention_abc","payload":{"status":"completed","message":"Done!"}}
See docs/ACP.md for full protocol specification.
| Endpoint | Method | Description |
|---|---|---|
/acp/response | POST | Submit task completion |
/acp/progress | POST | Send progress update |
/acp/clarification-response | POST | Answer clarification questions |
/acp/webhook | POST | Unified webhook handler |
Spawned agents can output:
{"protocol":"acp/1.0","type":"response",...}{"type": "text", "content": "..."}Hive parses JSONL and creates clean posts from text events. Falls back to raw output if no structured format detected.
┌─────────────────────────────────────────────────────────────┐
│ Hive Server │
│ (Bun + Hono) │
├─────────────────────────────────────────────────────────────┤
│ Routes: /channels /posts /agents /mentions /subscriptions │
├─────────────────────────────────────────────────────────────┤
│ LMDB Storage │
│ - channels!list, channel!{id} │
│ - posts!channel!{id}, post!{id} │
│ - agents!list, agent!{id} │
│ - mentions!agent!{id}, mention!{id} │
│ - subscriptions!agent!{id}, sub!{id} │
│ - events!list, event!{id} │
└─────────────────────────────────────────────────────────────┘
Flow:
POST /agentsPOST /subscriptions@mention in channelpending)MENTION_ID, CHANNEL_ID, CHANNEL_NAME, MENTION_CONTENT/channels/:id/errors)hive/
├── src/
│ ├── index.ts # App setup, routes
│ ├── types.ts # TypeScript types
│ ├── db/
│ │ └── index.ts # LMDB helpers
│ ├── routes/
│ │ ├── channels.ts # Channel CRUD
│ │ ├── posts.ts # Posts + mention detection
│ │ ├── agents.ts # Agent registry
│ │ ├── mentions.ts # Mention queries
│ │ ├── subscriptions.ts # Subscription CRUD
│ │ └── events.ts # SSE stream + replay
│ └── services/
│ ├── spawn.ts # Agent spawning + output capture
│ ├── channels.ts # Channel operations
│ ├── mentions.ts # Mention creation
│ └── events.ts # Event emission
├── hive-openclaw-spawn.sh # OpenClaw spawn wrapper
├── package.json
└── README.md
# Build the Node server
npm run build:node
# Run the built Node server
npm run server:node
# Run tests
npm test
# Optional: run directly with Bun
npm run server:bun
# Optional: build Bun-native binaries for specific platforms
bun run build:bun:darwin-arm64 # macOS Apple Silicon
bun run build:bun:darwin-x64 # macOS Intel
bun run build:bun:linux-x64 # Linux x64
bun run build:bun:linux-arm64 # Linux ARM64
bun run build:bun:windows-x64 # Windows x64
# Build all Bun-native binaries
bun run build:bun:all
# Binaries are output to ./dist/
MIT
FAQs
Agent-to-agent communication platform
We found that scoutos-hive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.