OpenClaw Agent Setup Guide

OpenClaw — Specialist Agent Setup Guide
Complete walkthrough for creating a dedicated specialist agent. Uses kLinked (LinkedIn Intelligence) as the reference implementation.
Architecture Overview
Discord Server: KLinked HQ
↓
Discord Bot: kLinked (separate bot token)
↓
OpenClaw Binding (accountId: klinked)
↓
Agent: klinked
↓
Workspace: ~/.openclaw/workspace-klinked
Each agent has its own agentId, workspace, Discord bot token, and accountId. Completely isolated unless you explicitly enable agent-to-agent communication.
Part 1: Agent Creation
Step 1 — Create the Agent
openclaw agents add klinked
When prompted:
Copy auth profiles? → Yes (reuses existing API key)
Configure model/auth? → No (inherits from main)
Configure chat channels? → No (configure manually)
Step 2 — Verify
openclaw agents list
You should see both main and klinked listed.
Part 2: Workspace Structure
Step 3 — Official Structure
Per docs.openclaw.ai/concepts/agent-workspace:
~/.openclaw/workspace-klinked/
├── SOUL.md ← agent identity
├── AGENTS.md ← workspace guide
├── USER.md ← human context
├── TOOLS.md ← env specifics (optional)
├── HEARTBEAT.md ← periodic tasks
├── memory/ ← daily logs + MEMORY.md
└── skills/ ← workspace-specific skills
⚠️ No official
data/ortemplates/folders. Custom data and templates go insideskills/as skill modules.
Step 4 — Create Directory Structure
mkdir -p ~/.openclaw/workspace-klinked/{memory,skills}
Step 5 — SOUL.md (Agent Identity)
nano ~/.openclaw/workspace-klinked/SOUL.md
Template:
# SOUL.md
You are [AgentName].
## Specialisation
[One sentence on what this agent does]
## Tone
[How the agent communicates — e.g. direct, strategic, no filler]
## Core Capabilities
- [Capability 1]
- [Capability 2]
## Hard Rules
- Never [X] without explicit confirmation
- Always [Y]
✅ Keep it lean and specific. Avoid generic assistant language.
Step 6 — AGENTS.md (Workspace Guide)
# AGENTS.md
## Session Startup
1. Read SOUL.md
2. Read USER.md
3. Read memory/YYYY-MM-DD.md (today's log)
## Memory Rules
Write things down. Mental notes don't survive restarts.
## Platform Formatting
Discord: no tables, use bullets, wrap links in <>
## Safety
Never post to [platform] without explicit confirmation.
Step 7 — USER.md (Human Context)
For a career/LinkedIn agent, populate with:
Full name and location
Current role and company
Years of experience
Core skills and technologies
Certifications
Education
Personal projects
Job search status and target role
Posting tone preferences
✅ The richer USER.md is, the more personalised every response. This is the most important file for a specialist agent.
Step 8 — HEARTBEAT.md (Periodic Tasks)
# HEARTBEAT.md
## Daily
- Check skills/ for newly installed skills
- Review USER.md — any fields still blank?
- Check memory/ — unresolved follow-ups?
## Weekly
- Refresh trending skills data
- Suggest 3 content ideas based on recent work
## Proactive Alerts
Reach out if:
- A significant new trend emerges worth posting about
- It's been more than 5 days since last content was drafted
## Stay Quiet When
- Nothing has changed
- Late night (23:00 - 08:00 local time)
If nothing needs attention, reply HEARTBEAT_OK.
Part 3: Discord Setup
Step 9 — Create a New Discord Server
Create a dedicated server for the specialist agent. Keeps it isolated and avoids routing conflicts.
Suggested channels for a LinkedIn/career agent:
Core:
#profile-review,#networking,#posting,#job-finder,#content-ideasOps:
#strategy,#automation,#logs
Note down the Guild ID. Enable Developer Mode in Discord settings → right-click server → Copy Server ID.
Step 10 — Create a Second Discord Bot
Go to discord.com/developers/applications:
Create New Application → name it (e.g.
kLinked)Bot tab → Reset Token → copy the token
Enable: Message Content Intent, Server Members Intent
Permissions: Send Messages, Read Message History, Attach Files, Embed Links
OAuth2 → URL Generator → select bot + permissions → copy invite URL
Open invite URL → add bot to your new server
⚠️ Keep both bot tokens safe. You need them in
openclaw.json.
Part 4: openclaw.json Configuration
Step 11 — Multi-Bot Config Structure
OpenClaw validates config strictly — unknown keys cause the gateway to refuse to start.
{
"agents": {
"list": [
{
"id": "main",
"workspace": "~/.openclaw/workspace"
},
{
"id": "klinked",
"workspace": "~/.openclaw/workspace-klinked",
"tools": {
"allow": [
"browser", "web_fetch", "web_search",
"read", "write", "exec",
"sessions_send", "sessions_list", "sessions_history"
]
}
}
]
},
"bindings": [
{
"agentId": "main",
"match": { "channel": "discord", "accountId": "default" }
},
{
"agentId": "klinked",
"match": { "channel": "discord", "accountId": "klinked" }
}
],
"tools": {
"agentToAgent": {
"enabled": true,
"allow": ["main", "klinked"]
}
},
"browser": {
"enabled": true
},
"channels": {
"discord": {
"accounts": {
"default": {
"token": "MAIN_BOT_TOKEN",
"guilds": {
"YOUR_MAIN_GUILD_ID": { "requireMention": false }
}
},
"klinked": {
"token": "KLINKED_BOT_TOKEN",
"guilds": {
"YOUR_KLINKED_GUILD_ID": { "requireMention": false }
}
}
}
}
}
}
⚠️ Critical rules:
browseris a top-level key, NOT nested undertools
sessionsis NOT a valid key undertools— remove it
tools.allowat the agent level controls what that agent can call
Step 12 — Restart and Verify
openclaw gateway restart
openclaw agents list --bindings
openclaw channels status --probe
Expected: both agents listed, both Discord accounts connected.
Part 5: Skills Setup
Step 13 — Installing from ClawHub
⚠️ Security warning: In February 2026, 341 malicious skills were found on ClawHub ("ClawHavoc" incident). Always check a skill's VirusTotal report on its
clawhub.aipage before installing.
Navigate to the workspace first:
cd ~/.openclaw/workspace-klinked
Search for skills:
npx clawhub@latest search "linkedin automation"
Inspect before installing:
npx clawhub@latest inspect [skill-slug]
Install:
npx clawhub@latest install [skill-slug]
✅ If clawhub returns "Skill not found", the slug from GitHub repos may differ from the registry. Use
searchto find the correct slug.
Step 14 — Custom Skill Module
For domain-specific knowledge and templates, create a custom skill module:
mkdir -p ~/.openclaw/workspace-klinked/skills/linkedin-intelligence
Inside, place:
SKILL.md— description and usage instructionsheadline.md— headline templatestagline.md— About section templatenetworking.md— DM and connection message templatestrending_skills.json— skills gap data (refresh every 14 days)
✅ Workspace skills take precedence over global skills. The agent auto-loads all skills from
skills/at session start.
Part 6: Agent-to-Agent Communication
Step 15 — How One Agent Talks to Another
There is no /delegate command. Communication works via the sessions_send tool.
Method 1 — Natural language from klaw's Discord:
use sessions_send to message klinked: "write 3 LinkedIn posts about Terraform"
Method 2 — CLI:
openclaw agent --agent klinked --message "write 3 LinkedIn posts" --deliver
sessions_send must be in the sending agent's tools.allow list, and agentToAgent.enabled: true must be set.
Part 7: Browser Tool for Automation
Step 16 — Enable Browser Tool
browser is a top-level key:
{
"browser": {
"enabled": true
}
}
Add to agent tool allowlist under agents.list[].tools.allow.
Step 17 — Log Into LinkedIn
openclaw browser open https://www.linkedin.com
Log in manually. Session is saved and reused for automation.
Test from Discord:
open linkedin.com in the browser and tell me what you see
Common Mistakes & Fixes
Mistake | Fix |
|---|---|
| Not a valid key. Remove it entirely |
|
|
Identity file named | Correct filename is |
Using | No such command. Use |
| Not official. Put custom content inside |
| Use |
Gateway refuses to start after config edit | Unknown key in config. Check |
Quick Reference
Essential Commands
openclaw agents add [agentId] # create new agent
openclaw agents list --bindings # verify routing
openclaw channels status --probe # verify connections
openclaw gateway restart # apply config changes
openclaw config get tools # inspect tool config
openclaw security audit # check for issues
npx clawhub@latest search "[query]" # search skills
npx clawhub@latest install [slug] # install skill
npx clawhub@latest inspect [slug] # check if slug exists
openclaw agent --agent [id] --message # send message to agent
Documentation References
Multi-agent routing:
docs.openclaw.ai/concepts/multi-agentAgent workspace:
docs.openclaw.ai/concepts/agent-workspaceDiscord channel config:
docs.openclaw.ai/channels/discordTools reference:
docs.openclaw.ai/toolsBrowser tool:
docs.openclaw.ai/tools/browserSession tools:
docs.openclaw.ai/concepts/session-toolConfig reference:
docs.openclaw.ai/gateway/configuration-referenceClawHub security guide:
clawhub.ai

