关于 agent-council
Agent Council 是通过 OpenClaw 创建和管理自主 AI Agent 的技能,并集成 Discord。配套脚本可处理工作区、Agent 注册、频道路由、类别归属、认证配置文件和可选定时任务。
主要功能
- 01创建和移除 Agent 工作区
- 02通过 OpenClaw 注册 Agent
- 03创建或绑定 Discord 频道
- 04管理 Discord 类别归属
- 05复制认证配置文件
- 06配置可选定时任务
适用场景
- 01为 Agent 创建并配置新的 Discord 频道
- 02将现有 Agent 绑定到更多频道
- 03将 Discord 类别分配给 Agent
- 04移除 Agent,并可选择删除工作区或频道
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ itsahedge/ agent-council --skill agent-council安装后在 Claude Code 中输入/agent-council确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
.gitignoreLICENSEREADME.mdexamples/category-owners.example.jsoncron-jobs-principles.mdchannels-cache.example.jsonscripts/claim-category.shbind-channel.shlist-agents.shlist-categories.shremove-agent.shsync-category.shcreate-agent.sh详细介绍
Agent Council
创建和管理具备完整 Discord 集成功能的自主 AI Agent。
已针对 OpenClaw 2026.3.x 更新——尽可能使用原生 CLI 命令(openclaw agents add/delete/bind/unbind/bindings/set-identity),仅在处理 Discord 频道专属路由时使用配置补丁(CLI 暂不支持此功能)。
功能
- 创建 Agent 工作区(SOUL.md、HEARTBEAT.md、IDENTITY.md、memory/)
- 通过
openclaw agents add注册 Agent - 创建 Discord 频道(可选),并设置主题
- 将 Agent 绑定到频道(通过配置补丁设置路由)
- 复制身份验证配置(由 SecretRef 提供,从默认 Agent 复制)
- 设置 cron 作业(可选,每日记忆)
CLI 快速参考
无需使用此技能即可执行以下原生命令:
# List agents and bindings
openclaw agents list
openclaw agents bindings
# Add/remove agents
openclaw agents add <id> --workspace <dir> --model <model> --non-interactive
openclaw agents delete <id>
# Channel-level routing (telegram, discord — not per-Discord-channel)
openclaw agents bind --agent <id> --bind discord
openclaw agents unbind --agent <id> --bind discord
# Identity
openclaw agents set-identity --agent <id> --name "Name" --emoji "🔬"
注意:openclaw agents bind 在频道级别(discord、telegram)执行,而不是针对每个 Discord 频道 ID。若要将特定 Discord 频道路由到特定 Agent,仍需使用此技能的配置补丁功能。
脚本
| 脚本 | 用途 |
|---|---|
create-agent.sh | 完整设置 Agent 并集成 Discord |
bind-channel.sh | 将现有 Agent 绑定到其他 Discord 频道 |
list-agents.sh | 显示所有 Agent 及其 Discord 绑定 |
remove-agent.sh | 移除 Agent(配置、cron 作业,以及可选的工作区/频道) |
claim-category.sh | 将 Discord 分类设为 Agent 的专属分类 |
sync-category.sh | 将分类中的所有频道同步到其所有者 |
list-categories.sh | 显示分类归属 |
用法
创建 Agent 并新建 Discord 频道
export DISCORD_GUILD_ID="123456789012345678"
~/.openclaw/skills/agent-council/scripts/create-agent.sh \
--id watson \
--name "Watson" \
--emoji "🔬" \
--specialty "Deep research and competitive analysis" \
--create "research" \
--category "987654321098765432"
此操作将:
- 创建
<workspace>/agents/watson/,并包含 SOUL.md、HEARTBEAT.md、IDENTITY.md - 通过
openclaw agents add注册 Agent - 在指定分类中创建 Discord #research 频道
- 将 watson 绑定到 #research(通过配置补丁设置频道专属路由)
- 将 #research 添加到服务器允许列表
- 从默认 Agent 复制身份验证配置(由 SecretRef 提供)
- 在晚上 11:00 创建每日记忆 cron 作业(使用
--no-cron跳过)
将 Agent 绑定到现有频道
./create-agent.sh \
--id sage \
--name "Sage" \
--emoji "💰" \
--specialty "Personal finance" \
--channel "234567890123456789"
将 Agent 绑定到其他频道
./bind-channel.sh --agent forge --channel "345678901234567890"
./bind-channel.sh --agent forge --create "defi" --category "456789012345678901"
查看当前设置
./list-agents.sh
移除 Agent
# Remove from config only (keeps workspace)
./remove-agent.sh --id test-agent
# Full removal (workspace trashed, channels deleted)
./remove-agent.sh --id test-agent --delete-workspace --delete-channel
分类归属
./claim-category.sh --agent chief --category 123456789012345678 --sync
./list-categories.sh
./sync-category.sh --category 123456789012345678
Agent Cron 作业
投递方式
选项 A:--announce(简单作业的首选方式)
openclaw cron add \
--name "My Task" \
--agent myagent \
--cron "0 9 * * *" \
--session isolated \
--model sonnet \
--announce --channel discord --to "channel:YOUR_CHANNEL_ID" \
--message "Do the task."
选项 B:delivery: none + message 工具(用于自定义格式)
openclaw cron add \
--name "My Task" \
--agent myagent \
--cron "0 9 * * *" \
--session isolated \
--model sonnet \
--message "Do the task. Then send the result to Discord using the message tool (action=send, channel=discord, target=channel:YOUR_CHANNEL_ID)."
⚠️ 常见错误:--channel 需要平台名称(discord),--to 需要目标地址(channel:ID)。
Heartbeat 与 Cron
- **Heartbeat:**批量执行多项检查,需要对话上下文,执行时间可能漂移
- **Cron:**时间精准、任务隔离、可使用不同模型、支持单次提醒
关键规则
- 当负载通过 message 工具自行投递时,
delivery.mode应设为"none" - 对于使用工具的任务,将
timeoutSeconds设为 90-120(默认值 60 通常过短) - 创建前始终检查是否存在同名 cron 作业:
cron action=list
选项参考
create-agent.sh
| 选项 | 必填 | 说明 |
|---|---|---|
--id | ✓ | Agent ID(小写,不含空格) |
--name | ✓ | 显示名称 |
--emoji | ✓ | Agent 表情符号 |
--specialty | ✓ | Agent 的职责 |
--model | 模型(默认:claude-sonnet-4-6) | |
--channel | 现有 Discord 频道 ID | |
--create | 使用此名称创建新频道 | |
--category | 新频道的分类 ID | |
--topic | 频道主题(若未设置则自动生成) | |
--cron | 每日记忆 cron 作业时间(默认:23:00) | |
--no-cron | 跳过每日记忆 cron 作业设置 | |
--tz | 时区(默认:America/New_York) | |
--own-category | 将 Discord 分类设为专属分类(自动绑定所有频道) |
环境变量
| 变量 | 必需 | 描述 |
|---|---|---|
DISCORD_GUILD_ID | 用于 --create | 你的 Discord 服务器 ID |
AGENT_WORKSPACE_ROOT | 否 | Agent 工作区根目录(默认值:~/workspace/agents) |
评论
支持 Markdown