agent-council
/install agent-council1
\r \r
Agent Council\r
\r Complete toolkit for creating and managing autonomous AI agents with Discord integration for OpenClaw.\r \r
What This Skill Does\r
\r Agent Creation:\r
- Creates autonomous AI agents with self-contained workspaces\r
- Generates SOUL.md (personality & responsibilities)\r
- Generates HEARTBEAT.md (cron execution logic)\r
- Sets up memory system (hybrid architecture)\r
- Configures gateway automatically\r
- Binds agents to Discord channels (optional)\r
- Sets up daily memory cron jobs (optional)\r \r Discord Channel Management:\r
- Creates Discord channels via API\r
- Configures OpenClaw gateway allowlists\r
- Sets channel-specific system prompts\r
- Renames channels and updates references\r
- Optional workspace file search\r \r
Installation\r
\r
# Install from ClawHub\r
clawhub install agent-council\r
\r
# Or manual install\r
cp -r . ~/.openclaw/skills/agent-council/\r
openclaw gateway config.patch --raw '{\r
"skills": {\r
"entries": {\r
"agent-council": {"enabled": true}\r
}\r
}\r
}'\r
```\r
\r
## Part 1: Agent Creation\r
\r
### Quick Start\r
\r
```bash\r
scripts/create-agent.sh \\r
--name "Watson" \\r
--id "watson" \\r
--emoji "🔬" \\r
--specialty "Research and analysis specialist" \\r
--model "skillboss/pilot" \\r
--workspace "$HOME/agents/watson" \\r
--discord-channel "1234567890"\r
```\r
\r
### Workflow\r
\r
#### 1. Gather Requirements\r
\r
Ask the user:\r
- **Agent name** (e.g., "Watson")\r
- **Agent ID** (lowercase, hyphenated, e.g., "watson")\r
- **Emoji** (e.g., "🔬")\r
- **Specialty** (what the agent does)\r
- **Model** (which LLM to use)\r
- **Workspace** (where to create agent files)\r
- **Discord channel ID** (optional)\r
\r
#### 2. Run Creation Script\r
\r
```bash\r
scripts/create-agent.sh \\r
--name "Agent Name" \\r
--id "agent-id" \\r
--emoji "🤖" \\r
--specialty "What this agent does" \\r
--model "provider/model-name" \\r
--workspace "/path/to/workspace" \\r
--discord-channel "1234567890" # Optional\r
```\r
\r
The script automatically:\r
- ✅ Creates workspace with memory subdirectory\r
- ✅ Generates SOUL.md and HEARTBEAT.md\r
- ✅ Updates gateway config (preserves existing agents)\r
- ✅ Adds Discord channel binding (if specified)\r
- ✅ Restarts gateway to apply changes\r
- ✅ Prompts for daily memory cron setup\r
\r
#### 3. Customize Agent\r
\r
After creation:\r
- **SOUL.md** - Refine personality, responsibilities, boundaries\r
- **HEARTBEAT.md** - Add periodic checks and cron logic\r
- **Workspace files** - Add agent-specific configuration\r
\r
### Agent Architecture\r
\r
**Self-contained structure:**\r
```\r
agents/\r
├── watson/\r
│ ├── SOUL.md # Personality and responsibilities\r
│ ├── HEARTBEAT.md # Cron execution logic\r
│ ├── memory/ # Agent-specific memory\r
│ │ ├── 2026-02-01.md # Daily memory logs\r
│ │ └── 2026-02-02.md\r
│ └── .openclaw/\r
│ └── skills/ # Agent-specific skills (optional)\r
```\r
\r
**Memory system:**\r
- Agent-specific memory: `\x3Cworkspace>/memory/YYYY-MM-DD.md`\r
- Shared memory access: Agents can read shared workspace\r
- Daily updates: Optional cron job for summaries\r
\r
**Cron jobs:**\r
If your agent needs scheduled tasks:\r
1. Create HEARTBEAT.md with execution logic\r
2. Add cron jobs with `--session \x3Cagent-id>`\r
3. Document in SOUL.md\r
\r
### Examples\r
\r
**Research agent:**\r
```bash\r
scripts/create-agent.sh \\r
--name "Watson" \\r
--id "watson" \\r
--emoji "🔬" \\r
--specialty "Deep research and competitive analysis" \\r
--model "skillboss/pilot" \\r
--workspace "$HOME/agents/watson" \\r
--discord-channel "1234567890"\r
```\r
\r
**Image generation agent:**\r
```bash\r
scripts/create-agent.sh \\r
--name "Picasso" \\r
--id "picasso" \\r
--emoji "🎨" \\r
--specialty "Image generation and editing specialist" \\r
--model "skillboss/pilot" \\r
--workspace "$HOME/agents/picasso" \\r
--discord-channel "9876543210"\r
```\r
\r
**Health tracking agent:**\r
```bash\r
scripts/create-agent.sh \\r
--name "Nurse Joy" \\r
--id "nurse-joy" \\r
--emoji "💊" \\r
--specialty "Health tracking and wellness monitoring" \\r
--model "skillboss/pilot" \\r
--workspace "$HOME/agents/nurse-joy" \\r
--discord-channel "5555555555"\r
```\r
\r
## Part 2: Discord Channel Management\r
\r
### Channel Creation\r
\r
#### Quick Start\r
\r
```bash\r
python3 scripts/setup-channel.py \\r
--name research \\r
--context "Deep research and competitive analysis"\r
```\r
\r
#### Workflow\r
\r
1. Run setup script:\r
```bash\r
python3 scripts/setup-channel.py \\r
--name \x3Cchannel-name> \\r
--context "\x3Cchannel-purpose>" \\r
[--category-id \x3Cdiscord-category-id>]\r
```\r
\r
2. Apply gateway config (command shown by script):\r
```bash\r
openclaw gateway config.patch --raw '{"channels": {...}}'\r
```\r
\r
#### Options\r
\r
**With category:**\r
```bash\r
python3 scripts/setup-channel.py \\r
--name research \\r
--context "Deep research and competitive analysis" \\r
--category-id "1234567890"\r
```\r
\r
**Use existing channel:**\r
```bash\r
python3 scripts/setup-channel.py \\r
--name personal-finance \\r
--id 1466184336901537897 \\r
--context "Personal finance management"\r
```\r
\r
### Channel Renaming\r
\r
#### Quick Start\r
\r
```bash\r
python3 scripts/rename-channel.py \\r
--id 1234567890 \\r
--old-name old-name \\r
--new-name new-name\r
```\r
\r
#### Workflow\r
\r
1. Run rename script:\r
```bash\r
python3 scripts/rename-channel.py \\r
--id \x3Cchannel-id> \\r
--old-name \x3Cold-name> \\r
--new-name \x3Cnew-name> \\r
[--workspace \x3Cworkspace-dir>]\r
```\r
\r
2. Apply gateway config if systemPrompt needs updating (shown by script)\r
\r
3. Commit workspace file changes (if `--workspace` used)\r
\r
#### With Workspace Search\r
\r
```bash\r
python3 scripts/rename-channel.py \\r
--id 1234567890 \\r
--old-name old-name \\r
--new-name new-name \\r
--workspace "$HOME/my-workspace"\r
```\r
\r
This will:\r
- Rename Discord channel via API\r
- Update gateway config systemPrompt\r
- Search and update workspace files\r
- Report files changed for git commit\r
\r
## Complete Multi-Agent Setup\r
\r
**Full workflow from scratch:**\r
\r
```bash\r
# 1. Create Discord channel\r
python3 scripts/setup-channel.py \\r
--name research \\r
--context "Deep research and competitive analysis" \\r
--category-id "1234567890"\r
\r
# (Note the channel ID from output)\r
\r
# 2. Apply gateway config for channel\r
openclaw gateway config.patch --raw '{"channels": {...}}'\r
\r
# 3. Create agent bound to that channel\r
scripts/create-agent.sh \\r
--name "Watson" \\r
--id "watson" \\r
--emoji "🔬" \\r
--specialty "Deep research and competitive analysis" \\r
--model "skillboss/pilot" \\r
--workspace "$HOME/agents/watson" \\r
--discord-channel "1234567890"\r
\r
# Done! Agent is created and bound to the channel\r
```\r
\r
## Configuration\r
\r
### Discord Category ID\r
\r
**Option 1: Command line**\r
```bash\r
python3 scripts/setup-channel.py \\r
--name channel-name \\r
--context "Purpose" \\r
--category-id "1234567890"\r
```\r
\r
**Option 2: Environment variable**\r
```bash\r
export DISCORD_CATEGORY_ID="1234567890"\r
python3 scripts/setup-channel.py --name channel-name --context "Purpose"\r
```\r
\r
### Finding Discord IDs\r
\r
**Enable Developer Mode:**\r
- Settings → Advanced → Developer Mode\r
\r
**Copy IDs:**\r
- Right-click channel → Copy ID\r
- Right-click category → Copy ID\r
\r
## Scripts Reference\r
\r
### create-agent.sh\r
\r
**Arguments:**\r
- `--name` (required) - Agent name\r
- `--id` (required) - Agent ID (lowercase, hyphenated)\r
- `--emoji` (required) - Agent emoji\r
- `--specialty` (required) - What the agent does\r
- `--model` (required) - LLM to use (provider/model-name)\r
- `--workspace` (required) - Where to create agent files\r
- `--discord-channel` (optional) - Discord channel ID to bind\r
\r
**Output:**\r
- Creates agent workspace\r
- Generates SOUL.md and HEARTBEAT.md\r
- Updates gateway config\r
- Optionally creates daily memory cron\r
\r
### setup-channel.py\r
\r
**Arguments:**\r
- `--name` (required) - Channel name\r
- `--context` (required) - Channel purpose/context\r
- `--id` (optional) - Existing channel ID\r
- `--category-id` (optional) - Discord category ID\r
\r
**Output:**\r
- Creates Discord channel (if doesn't exist)\r
- Generates gateway config.patch command\r
\r
### rename-channel.py\r
\r
**Arguments:**\r
- `--id` (required) - Channel ID\r
- `--old-name` (required) - Current channel name\r
- `--new-name` (required) - New channel name\r
- `--workspace` (optional) - Workspace directory to search\r
\r
**Output:**\r
- Renames Discord channel\r
- Updates gateway systemPrompt (if needed)\r
- Lists updated files (if workspace search enabled)\r
\r
## Gateway Integration\r
\r
This skill integrates with OpenClaw's gateway configuration:\r
\r
**Agents:**\r
```json\r
{\r
"agents": {\r
"list": [\r
{\r
"id": "watson",\r
"name": "Watson",\r
"workspace": "/path/to/agents/watson",\r
"model": {\r
"primary": "skillboss/pilot"\r
},\r
"identity": {\r
"name": "Watson",\r
"emoji": "🔬"\r
}\r
}\r
]\r
}\r
}\r
```\r
\r
**Bindings:**\r
```json\r
{\r
"bindings": [\r
{\r
"agentId": "watson",\r
"match": {\r
"channel": "discord",\r
"peer": {\r
"kind": "channel",\r
"id": "1234567890"\r
}\r
}\r
}\r
]\r
}\r
```\r
\r
**Channels:**\r
```json\r
{\r
"channels": {\r
"discord": {\r
"guilds": {\r
"YOUR_GUILD_ID": {\r
"channels": {\r
"1234567890": {\r
"allow": true,\r
"requireMention": false,\r
"systemPrompt": "Deep research and competitive analysis"\r
}\r
}\r
}\r
}\r
}\r
}\r
}\r
```\r
\r
## Agent Coordination\r
\r
Your main agent coordinates with specialized agents using OpenClaw's built-in session management tools.\r
\r
### List Active Agents\r
\r
See all active agents and their recent activity:\r
\r
```typescript\r
sessions_list({\r
kinds: ["agent"],\r
limit: 10,\r
messageLimit: 3 // Show last 3 messages per agent\r
})\r
```\r
\r
### Send Messages to Agents\r
\r
**Direct communication:**\r
```typescript\r
sessions_send({\r
label: "watson", // Agent ID\r
message: "Research the competitive landscape for X"\r
})\r
```\r
\r
**Wait for response:**\r
```typescript\r
sessions_send({\r
label: "watson",\r
message: "What did you find about X?",\r
timeoutSeconds: 300 // Wait up to 5 minutes\r
})\r
```\r
\r
### Spawn Sub-Agent Tasks\r
\r
For complex work, spawn a sub-agent in an isolated session:\r
\r
```typescript\r
sessions_spawn({\r
agentId: "watson", // Optional: use specific agent\r
task: "Research competitive landscape for X and write a report",\r
model: "skillboss/pilot", // Optional: override model\r
runTimeoutSeconds: 3600, // 1 hour max\r
cleanup: "delete" // Delete session after completion\r
})\r
```\r
\r
The sub-agent will:\r
1. Execute the task in isolation\r
2. Announce completion back to your session\r
3. Self-delete (if `cleanup: "delete"`)\r
\r
### Check Agent History\r
\r
Review what an agent has been working on:\r
\r
```typescript\r
sessions_history({\r
sessionKey: "watson-session-key",\r
limit: 50\r
})\r
```\r
\r
### Coordination Patterns\r
\r
**1. Direct delegation (Discord-bound agents):**\r
- User messages agent's Discord channel\r
- Agent responds directly in that channel\r
- Main agent doesn't need to coordinate\r
\r
**2. Programmatic delegation (main agent → sub-agent):**\r
```typescript\r
// Main agent delegates task\r
sessions_send({\r
label: "watson",\r
message: "Research X and update memory/research-X.md"\r
})\r
\r
// Watson works independently, updates files\r
// Main agent checks later or Watson reports back\r
```\r
\r
**3. Spawn for complex tasks:**\r
```typescript\r
// For longer-running, isolated work\r
sessions_spawn({\r
agentId: "watson",\r
task: "Deep dive: analyze competitors A, B, C. Write report to reports/competitors.md",\r
runTimeoutSeconds: 7200,\r
cleanup: "keep" // Keep session for review\r
})\r
```\r
\r
**4. Agent-to-agent communication:**\r
Agents can send messages to each other:\r
```typescript\r
// In Watson's context\r
sessions_send({\r
label: "picasso",\r
message: "Create an infographic from data in reports/research.md"\r
})\r
```\r
\r
### Best Practices\r
\r
**When to use Discord bindings:**\r
- ✅ Domain-specific agents (research, health, images)\r
- ✅ User wants direct access to agent\r
- ✅ Agent should respond to channel activity\r
\r
**When to use sessions_send:**\r
- ✅ Programmatic coordination\r
- ✅ Main agent delegates to specialists\r
- ✅ Need response in same session\r
\r
**When to use sessions_spawn:**\r
- ✅ Long-running tasks (>5 minutes)\r
- ✅ Complex multi-step work\r
- ✅ Want isolation from main session\r
- ✅ Background processing\r
\r
### Example: Research Workflow\r
\r
```typescript\r
// Main agent receives request: "Research competitor X"\r
\r
// 1. Check if Watson is active\r
const agents = sessions_list({ kinds: ["agent"] })\r
\r
// 2. Delegate to Watson\r
sessions_send({\r
label: "watson",\r
message: "Research competitor X: products, pricing, market position. Write findings to memory/research-X.md"\r
})\r
\r
// 3. Watson works independently:\r
// - Searches web\r
// - Analyzes data\r
// - Updates memory file\r
// - Reports back when done\r
\r
// 4. Main agent retrieves results\r
const results = Read("agents/watson/memory/research-X.md")\r
\r
// 5. Share with user\r
"Research complete! Watson found: [summary]"\r
```\r
\r
### Communication Flow\r
\r
**Main Agent (You) ↔ Specialized Agents:**\r
\r
```\r
User Request\r
↓\r
Main Agent (Claire)\r
↓\r
sessions_send("watson", "Research X")\r
↓\r
Watson Agent\r
↓\r
- Uses web_search\r
- Uses web_fetch\r
- Updates memory files\r
↓\r
Responds to main session\r
↓\r
Main Agent synthesizes and replies\r
```\r
\r
**Discord-Bound Agents:**\r
\r
```\r
User posts in #research channel\r
↓\r
Watson Agent (bound to channel)\r
↓\r
- Sees message directly\r
- Responds in channel\r
- No main agent involvement\r
```\r
\r
**Hybrid Approach:**\r
\r
```\r
User: "Research X" (main channel)\r
↓\r
Main Agent delegates to Watson\r
↓\r
Watson researches and reports back\r
↓\r
Main Agent: "Done! Watson found..."\r
↓\r
User: "Show me more details"\r
↓\r
Main Agent: "@watson post your full findings in #research"\r
↓\r
Watson posts detailed report in #research channel\r
```\r
\r
## Troubleshooting\r
\r
**Agent Creation Issues:**\r
\r
**"Agent not appearing in Discord"**\r
- Verify channel ID is correct\r
- Check gateway config bindings section\r
- Restart gateway: `openclaw gateway restart`\r
\r
**"Model errors"**\r
- Verify model name format: `provider/model-name`\r
- Check model is available in gateway config\r
\r
**Channel Management Issues:**\r
\r
**"Failed to create channel"**\r
- Check bot has "Manage Channels" permission\r
- Verify bot token in OpenClaw config\r
- Ensure category ID is correct (if specified)\r
\r
**"Category not found"**\r
- Verify category ID is correct\r
- Check bot has access to category\r
- Try without category ID (creates uncategorized)\r
\r
**"Channel already exists"**\r
- Use `--id \x3Cchannel-id>` to configure existing channel\r
- Or script will auto-detect and configure it\r
\r
## Use Cases\r
\r
- **Domain specialists** - Research, health, finance, coding agents\r
- **Creative agents** - Image generation, writing, design\r
- **Task automation** - Scheduled monitoring, reports, alerts\r
- **Multi-agent systems** - Coordinated team of specialized agents\r
- **Discord organization** - Structured channels for different agent domains\r
\r
## Advanced: Multi-Agent Coordination\r
\r
For larger multi-agent systems:\r
\r
**Coordination Patterns:**\r
- Main agent delegates tasks to specialists\r
- Agents report progress and request help\r
- Shared knowledge base for common information\r
- Cross-agent communication via `sessions_send`\r
\r
**Task Management:**\r
- Integrate with task tracking systems\r
- Route work based on agent specialty\r
- Track assignments and completions\r
\r
**Documentation:**\r
- Maintain agent roster in main workspace\r
- Document delegation patterns\r
- Keep runbooks for common workflows\r
\r
## Best Practices\r
\r
1. **Organize channels in categories** - Group related agent channels\r
2. **Use descriptive channel names** - Clear purpose from the name\r
3. **Set specific system prompts** - Give each channel clear context\r
4. **Document agent responsibilities** - Keep SOUL.md updated\r
5. **Set up memory cron jobs** - For agents with ongoing work\r
6. **Test agents individually** - Before integrating into team\r
7. **Update gateway config safely** - Always use config.patch, never manual edits\r
\r
## Requirements\r
\r
**Bot Permissions:**\r
- `Manage Channels` - To create/rename channels\r
- `View Channels` - To read channel list\r
- `Send Messages` - To post in channels\r
\r
**System:**\r
- OpenClaw installed and configured\r
- Node.js/npm via nvm\r
- Python 3.6+ (standard library only)\r
- Discord bot token (for channel management)\r
\r
## See Also\r
\r
- OpenClaw documentation: https://docs.openclaw.ai\r
- Multi-agent patterns: https://docs.openclaw.ai/agents\r
- Discord bot setup: https://docs.openclaw.ai/channels/discord
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-council1 - After installation, invoke the skill by name or use
/agent-council1 - Provide required inputs per the skill's parameter spec and get structured output
What is agent-council?
Complete toolkit for creating autonomous AI agents and managing Discord channels for OpenClaw. Use when setting up multi-agent systems, creating new agents,... It is an AI Agent Skill for Claude Code / OpenClaw, with 79 downloads so far.
How do I install agent-council?
Run "/install agent-council1" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is agent-council free?
Yes, agent-council is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does agent-council support?
agent-council is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created agent-council?
It is built and maintained by AbelTennyson (@abeltennyson); the current version is v1.0.0.