OpenClaw Multi Agent Org
Use this skill to create or maintain a company-style OpenClaw multi-agent organization.
It creates:
- A CEO strategic hub plus functional agents for BD, media, content, editors, community, and ops.
- One isolated workspace per agent.
- Rich role files:
AGENT.md,README.md,IDENTITY.md,SOUL.md,AGENTS.md,USER.md,TOOLS.md,TASKS.md,HEARTBEAT.md,BOOTSTRAP.md. - OpenClaw config entries in
~/.openclaw/openclaw.json. - Optional Feishu/Lark
channels.feishu.accountsentries andbindingsso each FeishuaccountIdroutes to the matching OpenClawagentId.
Fast Path
Inspect first:
openclaw config validate
openclaw agents list --bindings
Create or refresh the org locally:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --dry-run --skip-ceo
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --skip-ceo
--dry-run redacts secrets by default. Use --dry-run-raw only when local debugging requires raw credentials.
Regenerate role/persona files as well:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --role-files refresh --skip-ceo
Validate and restart:
openclaw config validate
openclaw agents list --bindings
openclaw gateway restart
Feishu One-Click Flow
Official Feishu one-click creation usually writes the newly created app into top-level channels.feishu.appId/appSecret. After the user scans and confirms, adopt that app into the intended account:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --adopt-top-level content-chief --restart
This will:
- Copy the top-level Feishu app credentials into
channels.feishu.accounts.content-chief. - Set the target account
enabled=true. - Restore the top-level/default Feishu app from the CEO account when available.
- Remove incompatible
tools.alsoAllowvalues sometimes written by installer flows. - Validate the config, and restart if
--restartis passed.
For repeated app creation, use one account at a time:
npx --yes @larksuite/openclaw-lark-tools install --verbose --secret-input-mode plaintext --skip-version-check
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --adopt-top-level media-lead --restart
Or use the wrapper command, which runs the official installer first and then adopts the returned top-level app into the target account:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --feishu-one-click media-lead --restart
Read references/feishu-one-click.md if you need the operator checklist or troubleshooting notes.
Credentials File Mode
Use this when credentials are already known:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --credentials /path/to/feishu-apps.json --skip-ceo --restart
Shape:
{
"ai-bd": {
"appId": "cli_xxx",
"appSecret": "xxx",
"enabled": true
}
}
Example: references/feishu-apps.example.json.
Custom Roles
Use a roles file when the user wants a different org chart:
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --roles /path/to/roles.json --dry-run
node <skill-dir>/scripts/create-multi-feishu-agents.mjs --roles /path/to/roles.json --role-files refresh
Example: references/roles.example.json.
Script Options
Primary script:
scripts/create-multi-feishu-agents.mjs
Common options:
--dry-run: print the planned config without writing.--dry-run-raw: print the planned config without writing, including secrets.--interactive: prompt for App ID / App Secret.--credentials PATH: read app credentials from JSON.--roles PATH: read custom role definitions from JSON.--only ACCOUNT_ID: update only one role/account/binding.--feishu-one-click ACCOUNT_ID: run the official Feishu installer, then adopt the created top-level app into the named account.--adopt-top-level ACCOUNT_ID: move the current top-level Feishu app into one account after scan-to-create.--skip-ceo: keep CEO/default credentials unchanged.--role-files missing|refresh|none: create missing files, overwrite generated role files, or skip role files.--no-validate: skipopenclaw config validate.--restart: restart OpenClaw gateway after successful write.
Default Roles
| Role | agentId | accountId |
|---|---|---|
| CEO Strategic Hub | ceo |
ceo |
| AI Business Development | ai-bd |
ai-bd |
| Media Lead | media-lead |
media-lead |
| Content Chief | content-chief |
content-chief |
| AI Content Editor / Video Editor A | content-editor-1 |
content-editor-1 |
| AI Content Editor / Visual Adapter B | content-editor-2 |
content-editor-2 |
| Community Operations | community-ops |
community-ops |
| AI Operations Assistant | ai-ops-assistant |
ai-ops-assistant |
Default paths:
~/.openclaw/agents/company-org/<agentId>/
~/.openclaw/workspace/company-org/<role-workspace>/
Safety Rules
- Always back up
~/.openclaw/openclaw.jsonbefore writing; the script does this automatically. - Do not print or paste App Secret values into chat responses.
- Do not enable placeholder accounts whose credentials still start with
__FILL_. - Keep detailed role/persona content in Markdown files, not arbitrary fields in
agents.list; OpenClaw config schema is strict. - Validate after every write.
- Preserve user-customized role files unless the user explicitly wants regeneration; default
--role-files missingis conservative.
Publishing Notes
For publishing or packaging this skill, keep SKILL.md concise and put operator details in references/. Human-facing overview is in README.md; agent-facing execution rules remain here.