Install
openclaw skills install creat-anget创建具有独立工作区和配置的独立 OpenClaw Agent。适用于用户需要完全隔离的 Agent(独立工作区、配置、身份),而不是临时子 Agent 会话的情况。支持飞书机器人绑定,用于多机器人部署。
openclaw skills install creat-anget此技能帮助你创建具有独立工作区、配置和可选飞书机器人绑定的 独立 OpenClaw Agent。
当用户希望执行以下操作时使用此技能:
触发请求示例:
创建一个完全隔离的 Agent,包含:
openclaw.json 中单独的 Agent 配置创建一个临时子 Agent 会话(用于快速任务)。仅用于短期的辅助工作。
询问用户(如果尚未提供):
| 问题 | 目的 |
|---|---|
| Agent ID | 唯一标识符(例如:support, hr-bot, designer) |
| Agent Name | 易读的名称 |
| Workspace Path | 存储 Agent 文件的位置(默认:~/.openclaw/workspace-{id}) |
| Feishu Bot? | 此 Agent 是否需要绑定飞书机器人? |
| Feishu Account ID | 如果绑定到飞书,使用哪个账户 ID?(例如:support, hr) |
| Model | 此 Agent 应该使用哪个模型? |
创建 Agent 目录:
~/.openclaw/agents/{agent-id}/
├── agent/
│ ├── auth-profiles.json
│ └── models.json
└── sessions/
将 Agent 添加到 agents.list:
{
"agents": {
"list": [
{
"id": "{agent-id}",
"name": "{agent-name}",
"workspace": "{workspace-path}",
"agentDir": "{agent-dir-path}"
}
]
}
}
如果 Agent 需要飞书机器人,添加绑定:
{
"bindings": [
{
"type": "route",
"agentId": "{agent-id}",
"match": {
"channel": "feishu",
"accountId": "{account-id}"
}
}
]
}
如果使用单独的飞书应用,添加到 channels.feishu.accounts:
{
"channels": {
"feishu": {
"accounts": {
"{account-id}": {
"enabled": true,
"appId": "{feishu-app-id}",
"appSecret": "{feishu-app-secret}",
"domain": "feishu",
"groupPolicy": "open"
}
}
}
}
}
创建包含必要文件的工作区目录:
{workspace-path}/
├── AGENTS.md
├── SOUL.md
├── USER.md
├── IDENTITY.md
├── MEMORY.md
├── TOOLS.md
├── HEARTBEAT.md
└── memory/
修改 openclaw.json 后,Gateway 需要重新加载:
openclaw gateway restart
或者通知用户手动重启。
使用提供的脚本自动创建 Agent:
python scripts/create_standalone_agent.py \
--agent-id support \
--agent-name "Customer Support Bot" \
--workspace "C:\Users\Administrator\.openclaw\workspace-support" \
--feishu-account support \
--feishu-app-id cli_xxx \
--feishu-app-secret xxx
| 字段 | 必填 | 示例 |
|---|---|---|
agent-id | ✅ | support, hr-bot, designer |
agent-name | ✅ | "Customer Support", "HR Assistant" |
workspace-path | ✅ | ~/.openclaw/workspace-support |
feishu-binding | ❌ | true 或 false |
feishu-account-id | ❌ | support, hr |
feishu-app-id | ❌ | cli_a9249b9ee9785cee |
feishu-app-secret | ❌ | PAY8vhyLkiLpfmun09sXSboJyoSQXK3g |
简单 Agent(无飞书)
{
"agent-id": "research-assistant",
"agent-name": "Research Assistant",
"workspace": "C:\\Users\\Administrator\\.openclaw\\workspace-research"
}
带飞书绑定的 Agent(共享应用)
{
"agent-id": "support",
"agent-name": "Customer Support",
"workspace": "C:\\Users\\Administrator\\.openclaw\\workspace-support",
"feishu-binding": true,
"feishu-account-id": "support"
}
带专用飞书应用的 Agent
{
"agent-id": "hr-bot",
"agent-name": "HR Assistant",
"workspace": "C:\\Users\\Administrator\\.openclaw\\workspace-hr",
"feishu-binding": true,
"feishu-account-id": "hr",
"feishu-app-id": "cli_xxx",
"feishu-app-secret": "xxx"
}
openclaw.json 后必须重启openclaw.json 中应具有适当的权限对于临时助手,你仍然可以使用 sessions_spawn:
sessions_spawn({
task: "<任务描述>",
runtime: "subagent" | "acp",
mode: "session" | "run",
label: "<Agent 名称>",
model: "<模型别名>",
thread: true | false
})
但对于生产环境 Agent,请首选独立模式。
references/standalone-agent-guide.md 以获取完整文档python scripts/create_standalone_agent.py --help# 简单 Agent(无飞书)
python scripts/create_standalone_agent.py \
--agent-id my-agent \
--agent-name "My Agent"
# 带飞书绑定的 Agent
python scripts/create_standalone_agent.py \
--agent-id support \
--agent-name "Support Bot" \
--feishu-account support
# 然后重启 Gateway
openclaw gateway restart