Install
openclaw skills install sub-agent-creatorClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Full workflow for creating an OpenClaw Agent. Use when the user says 'create an agent', 'make a new agent', 'add a bot', or needs to set up a new AI assistant. Covers the complete setup process including (1) adding agent config and peer bindings to openclaw.json, (2) creating workspace directory with SOUL.md persona, (3) scaffolding required folders and files, (4) copying agent runtime configs from main, (5) restarting gateway to apply changes.
openclaw skills install sub-agent-creatorAutomates the full end-to-end flow for creating an OpenClaw Agent.
Activate when user says things like:
Ask the user:
qisi, code-review, brainstormoc_xxx (kind = group)ou_xxx (kind = direct)OPENCLAW_DIR=~/.openclaw
mkdir -p $OPENCLAW_DIR/workspace-{agent_id}
mkdir -p $OPENCLAW_DIR/workspace-{agent_id}/memory
mkdir -p $OPENCLAW_DIR/workspace-{agent_id}/skills
Create the following files in the workspace directory:
SOUL.md — Agent persona (see template below)USER.md — User info templateAGENTS.md — Session bootstrap instructionsHEARTBEAT.md — Heartbeat configTOOLS.md — Tool notesmemory/ — Daily memory folderIDENTITY.md — Agent identity definition (optional)BOOTSTRAP.md — First-run bootstrap (optional)AGENTS.md content (copied from ~/.openclaw/workspace/AGENTS.md):
# AGENTS.md - Your Workspace
If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it.
## Every Session
Before doing anything else:
1. Read `SOUL.md` — this is who you are
2. Read `USER.md` — this is who you're helping
3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
4. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md`
## Memory
You wake up fresh each session. These files are your continuity:
- **Daily notes:** `memory/YYYY-MM-DD.md` — raw logs of what happened
- **Long-term:** `MEMORY.md` — your curated memories
## Safety
- Don't exfiltrate private data
- When in doubt, ask.
HEARTBEAT.md content:
# HEARTBEAT.md
# Keep this file empty to skip heartbeat API calls.
TOOLS.md content:
# TOOLS.md - Local Notes
Notes specific to this agent's setup.
OPENCLAW_DIR=~/.openclaw
mkdir -p $OPENCLAW_DIR/agents/{agent_id}/agent
mkdir -p $OPENCLAW_DIR/agents/{agent_id}/sessions
OPENCLAW_DIR=~/.openclaw
cp $OPENCLAW_DIR/agents/main/agent/models.json $OPENCLAW_DIR/agents/{agent_id}/agent/
cp $OPENCLAW_DIR/agents/main/agent/auth-profiles.json $OPENCLAW_DIR/agents/{agent_id}/agent/
If the main agent config files don't exist, warn the user and ask them to provide models.json and auth-profiles.json manually.
Back up first:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
Read the current config and add the new agent to agents.list:
{
"id": "{agent_id}",
"name": "{agent_name}",
"workspace": "~/.openclaw/workspace-{agent_id}",
"agentDir": "~/.openclaw/agents/{agent_id}/agent"
}
Add bindings if provided. For group chat:
{
"agentId": "{agent_id}",
"match": {
"channel": "feishu",
"peer": {
"kind": "group",
"id": "{group_chat_id}"
}
}
}
For direct chat:
{
"agentId": "{agent_id}",
"match": {
"channel": "feishu",
"peer": {
"kind": "direct",
"id": "{user_id}"
}
}
}
If the agent needs specific skills:
cp -r ~/.openclaw/skills/{skill-name} ~/.openclaw/workspace-{agent_id}/skills/
openclaw gateway restart
Tell the user:
# SOUL.md - {Agent Name}
_{One-line purpose}_
## Core Identity
**You are "{Agent Name}"** — {detailed description}
## Principles
- {principle 1}
- {principle 2}
- {principle 3}
## Style
- {style description}
---
_{Mission statement}_
After creation, the layout should be:
~/.openclaw/
├── agents/
│ └── {agent_id}/
│ ├── agent/
│ │ ├── auth-profiles.json
│ │ └── models.json
│ └── sessions/
└── workspace-{agent_id}/
├── AGENTS.md
├── BOOTSTRAP.md (optional)
├── HEARTBEAT.md
├── IDENTITY.md (optional)
├── SOUL.md
├── TOOLS.md
├── USER.md
├── memory/
└── skills/ (optional)
workspace-brainstormopenclaw.json before modifyingmodels.json and auth-profiles.json to the agents directoryscripts/agent_creator.py to automate the config and directory creation