← Back to Skills Marketplace
nissan

Agent Hive

by Nissan Dookeran · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ Security Clean
476
Downloads
0
Stars
1
Active Installs
5
Versions
Install in OpenClaw
/install agent-hive
Description
Create and manage multi-agent teams in OpenClaw with shared workspace, budget governance, and mesh networking. Use when: (1) adding a new agent to an existin...
README (SKILL.md)

Last used: 2026-03-24 Memory references: 2 Status: Active

Agent Hive

Create and manage multi-agent teams with shared memory, budget governance, and configurable spawn permissions.

Architecture

Main Workspace (~/.openclaw/workspace/)
├── MEMORY.md, TOOLS.md, USER.md, IDENTITY.md   ← shared brain (real files)
├── agents/\x3Cname>/                                ← per-agent outbox, inbox, budget
├── agents/governance/                            ← governance rules + audit log
├── memory/, projects/, scripts/, skills/         ← shared resources
└── content/                                      ← shared content

Agent Workspace (~/.openclaw/workspace-\x3Cid>/)
├── SOUL.md              ← unique personality (local file)
├── AGENTS.md            ← unique instructions (local file)
├── HEARTBEAT.md         ← agent-specific heartbeat (local file)
├── .openclaw/           ← agent-specific config dir
└── everything else      ← SYMLINKS to main workspace

Adding a New Agent

Step 1: Create workspace with symlinks

AGENT_ID="\x3Cid>"
MAIN="$HOME/.openclaw/workspace"
WS="$HOME/.openclaw/workspace-$AGENT_ID"

mkdir -p "$WS/.openclaw"

# Symlink shared brain
for f in .learnings IDENTITY.md MEMORY.md ROADMAP.md TOOLS.md USER.md; do
  ln -sf "../workspace/$f" "$WS/$f"
done
for d in agents content memory projects scripts skills; do
  ln -sf "../workspace/$d" "$WS/$d"
done

Step 2: Create unique files

Create $WS/SOUL.md — the agent's personality. This is theirs alone.

Create $WS/AGENTS.md — agent-specific instructions. Must include:

  • Session startup checklist (read SOUL.md, check BUDGET.json, check INBOX.md)
  • Communication rules (INBOX/OUTBOX pattern)
  • What the agent does and doesn't do
  • Budget rules section (see references/budget-rules.md)

Create $WS/HEARTBEAT.md — minimal heartbeat config.

Step 3: Create agent directory in shared workspace

mkdir -p "$MAIN/agents/$AGENT_ID"
touch "$MAIN/agents/$AGENT_ID/INBOX.md"
touch "$MAIN/agents/$AGENT_ID/OUTBOX.md"

Step 4: Create budget file

Copy scripts/create_budget.sh output or create manually:

{
  "daily_limit_output_tokens": 50000,
  "today": "YYYY-MM-DD",
  "used_output_tokens": 0,
  "spawns": [],
  "status": "active",
  "warnings": [],
  "consecutive_overbudget_days": 0
}

Save to $MAIN/agents/$AGENT_ID/BUDGET.json.

Step 5: Register in openclaw.json

Add to agents.list[]:

{
  "id": "\x3Cid>",
  "name": "\x3CName>",
  "workspace": "/absolute/path/to/workspace-\x3Cid>",
  "identity": { "name": "\x3CName>", "emoji": "\x3Cemoji>" },
  "model": {
    "primary": "anthropic/claude-sonnet-4-6",
    "fallbacks": ["\x3Cfallback-model-1>", "\x3Cfallback-model-2>"]
  },
  "subagents": { "allowAgents": ["\x3Cpeer1>", "\x3Cpeer2>"] }
}

Update existing agents' allowAgents to include the new agent.

Step 6: Validate and restart

python3 -c "import json; json.load(open('$HOME/.openclaw/openclaw.json')); print('JSON valid')"
openclaw doctor  # check for schema errors
launchctl stop ai.openclaw.gateway && sleep 2 && launchctl start ai.openclaw.gateway

Wait 15 seconds before testing.

Spawn Permission Models

Hub-and-spoke (conservative)

Only the orchestrator (main) can spawn agents. Agents route requests through OUTBOX.

"subagents": { "allowAgents": [] }  // for all non-main agents

Full mesh with budget (recommended)

All agents can spawn peers. Budget governance prevents abuse.

// Each agent can spawn all peers (not themselves)
"subagents": { "allowAgents": ["\x3Call other agent ids>"] }

Earned mesh (progressive trust)

Start hub-and-spoke. Promote to mesh after demonstrating budget responsibility. Demote back to hub-and-spoke after repeated overspend.

Budget Governance

See references/governance.md for the full framework.

Run the audit script on heartbeat:

python3 scripts/budget_audit.py

Thresholds: Green (\x3C80%), Yellow (80-100%), Red (>100%), Emergency demotion (>200%). 3 consecutive overbudget days → automatic demotion (mesh privileges revoked).

Add step 4.5 to your HEARTBEAT.md — see references/heartbeat-snippet.md.

Committee Pattern

For project work, compose agent committees:

  1. Identify which agents are needed (e.g., content + marketing + design review)
  2. Spawn them in parallel with clear, scoped tasks
  3. Each writes to their OUTBOX.md
  4. Orchestrator collects results and synthesizes
  5. Budget tracked per-agent across the project

Verification Checklist

After adding an agent, verify:

  • workspace-\x3Cid>/ has SOUL.md + AGENTS.md as local files
  • All other files are symlinks to main workspace
  • agents/\x3Cid>/BUDGET.json exists with correct schema
  • Agent appears in openclaw doctor output
  • Gateway restarts without errors
  • Agent can be spawned: sessions_spawn(agentId="\x3Cid>", task="Say hello")
  • Budget audit includes the new agent: python3 scripts/budget_audit.py
Usage Guidance
This skill appears to do what it says: create agent workspaces, manage budgets, and enforce demotions. Before installing or enabling it broadly: 1) Review and test scripts in a safe environment — run create_agent.sh and budget_audit.py on a copy of your workspace, not production data. 2) Backup ~/.openclaw/openclaw.json and workspace directories so you can recover from accidental edits. 3) Verify the launchctl restart step is appropriate for your OS (it's macOS-specific) and that you have permission to restart the gateway; replace with your platform's service manager if needed. 4) Inspect and, if required, edit the hard-coded AGENT_MAP and timezone in budget_audit.py to match your deployment. 5) Decide whether to run the audit manually or wire it into a heartbeat; automated audits will rewrite BUDGET.json and can automatically demote agents per the policy — ensure that behavior aligns with your operational expectations. 6) Confirm file permissions and that symlink targets are correct (to avoid accidental linking to unexpected directories). If you need higher assurance, ask for an attestation or run the scripts under limited privileges first.
Capability Analysis
Type: OpenClaw Skill Name: agent-hive Version: 1.0.2 The 'agent-hive' skill bundle provides a legitimate framework for managing multi-agent teams within OpenClaw, featuring workspace isolation via symlinks and a token-based budget governance system. The included scripts (create_agent.sh and budget_audit.py) perform standard file system operations and JSON processing within the ~/.openclaw directory to track agent spending and enforce usage limits. While the instructions include commands to restart the OpenClaw gateway via launchctl, this is a documented administrative step required to apply configuration changes and does not exhibit signs of malicious intent or unauthorized access.
Capability Assessment
Purpose & Capability
The name/description match the provided assets: scripts to create agent workspaces and a Python audit that enforces budget rules. Required capabilities (reading/writing ~/.openclaw, managing BUDGET.json, symlinking shared resources) are appropriate for multi-agent workspace management. No unrelated credentials or external services are requested.
Instruction Scope
Runtime instructions read/write many files under $HOME/.openclaw, create symlinks, create BUDGET.json entries, and instruct a gateway restart (launchctl). There are no network outbound endpoints or exfiltration points in the provided code. However, the instructions recommend running the audit automatically from a heartbeat which will autonomously update BUDGET.json and governance log files (including automatic demotion logic); restarting the gateway via launchctl affects a system service and is macOS-specific but the skill has no OS restriction.
Install Mechanism
This is instruction-only with bundled scripts; there is no external install/download step, no package pulls, and no remote code fetch. The scripts are included in the skill bundle, so no additional network risk is introduced by an installer.
Credentials
The skill requests no environment variables or credentials. It operates on user-local files under ~/.openclaw, which is proportional to its purpose. Note: scripts hardcode the Australia/Sydney timezone and include a small hard-coded AGENT_MAP, which are configuration choices rather than secrets but may need adjustment.
Persistence & Privilege
always is false and autonomous model invocation is allowed (platform default). The budget_audit.py script can autonomously change BUDGET.json (including setting status to 'demoted') and append governance events; if you wire this into an automated heartbeat the system will perform privilege changes (demotions) without an additional human step. That behavior is consistent with the described governance model but is operationally impactful and should be reviewed before enabling automation.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-hive
  3. After installation, invoke the skill by name or use /agent-hive
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
Fixed: moved version to top-level frontmatter for scanner compliance
v1.0.1
- SKILL.md metadata section updated to include a top-level "version" field. - No changes to the implementation, functionality, or instructions. - Documentation version reflects 1.0.0, matching the previous code version.
v1.1.1
Added version to frontmatter
v1.1.0
No detectable changes in files or documentation for version 1.1.0. No user-facing updates in this release.
v1.0.0
Initial release of agent-hive: multi-agent management for OpenClaw. - Enables creation and management of multi-agent teams with shared workspace and budget governance. - Supports mesh networking and customizable agent-to-agent spawn permissions. - Provides step-by-step instructions for adding new agents, managing budgets, and governance workflows. - Not for single-agent setups or editing agent personalities (use SOUL.md directly for that). - Includes recommendations for hub-and-spoke and mesh spawn models, with budget-based governance and demotion mechanisms.
Metadata
Slug agent-hive
Version 1.0.2
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 5
Frequently Asked Questions

What is Agent Hive?

Create and manage multi-agent teams in OpenClaw with shared workspace, budget governance, and mesh networking. Use when: (1) adding a new agent to an existin... It is an AI Agent Skill for Claude Code / OpenClaw, with 476 downloads so far.

How do I install Agent Hive?

Run "/install agent-hive" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Hive free?

Yes, Agent Hive is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Agent Hive support?

Agent Hive is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Hive?

It is built and maintained by Nissan Dookeran (@nissan); the current version is v1.0.2.

💬 Comments