← 返回 Skills 市场
nissan

Agent Hive

作者 Nissan Dookeran · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
476
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-hive
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-hive 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug agent-hive
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 5
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 476 次。

如何安装 Agent Hive?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-hive」即可一键安装,无需额外配置。

Agent Hive 是免费的吗?

是的,Agent Hive 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Hive 支持哪些平台?

Agent Hive 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Hive?

由 Nissan Dookeran(@nissan)开发并维护,当前版本 v1.0.2。

💬 留言讨论