按命令族和 profile 选择合适的 OpenClaw CLI 命令,并校验执行结果。
编程
Openclaw Create Agent
Create and wire a new OpenClaw agent with a fixed workflow. Use when the user asks to create/add a new OpenClaw agent or says “我要创建一个新的 Agent”, automate mult...
它能做什么
Create and wire a new OpenClaw agent with a fixed workflow. Use when the user asks to create/add a new OpenClaw agent or says “我要创建一个新的 Agent”, automate mult...
技能文档
OpenClaw Create Agent
Use this skill to create one new OpenClaw agent and finish routing/config updates in one pass.
This skill is Feishu-only. Do not use it for Telegram, Slack, Discord, or other channels.
Required Inputs
First align the user's target scenario, then collect fields. Ask only for missing required fields.
Scenario alignment question (must ask first):
- Option A: create a new bot/app and map it to a new agent (
routing_mode=account) - Option B: map an existing/new group to a new agent under one bot (
routing_mode=peer)
| Field | Required | Notes |
|---|---|---|
agent_id | yes | lowercase letters, digits, - only |
workspace | yes | use absolute path for project workspace |
model | no | optional model override for this agent |
routing_mode | yes | account or peer |
channel | no | fixed to feishu |
For routing_mode=account (one bot per agent), collect:
account_id(required)app_id,app_secret,bot_name(optional but recommended)
For routing_mode=peer (single bot, multi-group), collect:
peer_kind(groupordirect, required)peer_id(required)account_id(optional, narrows matching if provided)- if this is a new group, collect
peer_idonly after guided gates in Step 0.5
Workflow
- Align scenario (new bot per agent or multi-group per agent).
- For multi-group scenarios, run guided gates in Step 0.5.
- Read current config and backup.
- Create agent runtime with OpenClaw CLI.
- Upsert config for channel account, binding, and
dmScope. - Restart gateway and verify.
- Return a concise change summary.
Step 0: Align Requirement
Ask this first:
你是要哪一种?
1) 新建一个机器人,对应一个新 Agent(account 路由)
2) 已有一个机器人,在新群里绑定一个新 Agent(peer 路由)
Map answer:
- option 1 ->
routing_mode=account - option 2 ->
routing_mode=peer
If answer is ambiguous, stop and clarify before editing config.
Step 0.5: Multi-Group Guided Gates
Apply this step when the user is doing multi-group multi-agent routing.
- Guide the user to create a new group and add the bot into that group.
- Pause and wait for explicit confirmation:
已创建群. - Only after receiving
已创建群, guide the user to send one message in that group to generate logs. - Pause and wait for explicit confirmation:
已发送. - Only after receiving
已发送, check OpenClaw logs and extractchat_id(formatoc_xxxxx).
Suggested command:
openclaw logs --follow
Expected signal in logs:
Received message from peer: { kind: "group", id: "oc_xxxxxxxxxxxxxxxx" }
Step 1: Precheck and Backup
Run:
test -f ~/.openclaw/openclaw.json
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak.$(date +%Y%m%d%H%M%S)
If config file is missing, stop and ask user to initialize OpenClaw first.
Step 2: Create Agent Runtime
Run OpenClaw CLI first (required):
openclaw agents add --workspace --non-interactive
If model is provided:
openclaw agents add --workspace --model --non-interactive
Step 3: Upsert openclaw.json
Use the bundled script:
python3 scripts/upsert_openclaw_agent.py \
--config ~/.openclaw/openclaw.json \
--agent-id \
--routing-mode \
[--account-id ] \
[--app-id ] \
[--app-secret ] \
[--bot-name ] \
[--peer-kind ] \
[--peer-id ]
Run from this skill folder, or replace scripts/upsert_openclaw_agent.py with its absolute path.
Script behavior:
- upsert
channels..accounts.when account mode is used - upsert one binding for this agent
- always enforce
session.dmScope = per-account-channel-peerfor multi-agent Feishu setup
Read references/routing-modes.md when routing choice is unclear.
Step 4: Restart and Verify
Run:
openclaw gateway restart
openclaw agents list --bindings
Validate:
- target agent appears in list
- binding points to expected channel/account or channel/peer
Step 5: Report Output
Return:
- created/updated binding match
- whether account entry was added/updated
- whether
dmScopechanged - verification command results
Constraints
- Preserve existing unrelated agents/accounts/bindings.
- Reject route conflicts (same channel/account/peer route already used by another agent).
- Avoid interactive prompts unless user explicitly asks for interactive mode.
- Assume
channel=feishuonly. - In multi-group scenarios, do not continue past Step 0.5 until receiving
已创建群and then已发送.
相关技能
Use when OpenClaw needs to access AICFO through one bearer API key. Covers agent-session introspection, company selection, app-level MCP usage, connector act...
Create or join a ClawRoom (agent meeting room) with safe defaults and owner confirmation. Use when the user mentions ClawRoom, agent meetings, or multi-agent...
每周更新的 OpenClaw 技能精选合集,14 个分类共 11211+ 个技能。
Audit an OpenClaw agent workspace and generate standardized evaluation reports, scores, and patches. Use when asked to review memory quality, retrieval effic...
Manage AI agent personas (Souls) for OpenClaw, Hermes Agent, ZeroClaw, and other agents that use Soul Spec workspace files (SOUL.md, IDENTITY.md, AGENTS.md). Installs/switches/restores persona files in the agent workspace, searches and publishes to the clawsouls.ai registry (network + token auth), optionally syncs encrypted agent memory via Git (explicit `sync`/`swarm` commands only), and detects the local agent platform. Use only when the user explicitly asks to manage personas — e.g. "install a soul", "switch persona to X", "list souls", "restore my previous soul", "publish my soul", or "login to clawsouls". Workspace-modifying and publishing actions should be confirmed with the user first.