Agent Council
by @itsahedge
Complete toolkit for creating autonomous AI agents and managing Discord channels for OpenClaw. Use when setting up multi-agent systems, creating new agents, or managing Discord channel organization.
clawhub install agent-councilπ About This Skill
name: agent-council description: Complete toolkit for creating autonomous AI agents and managing Discord channels for OpenClaw. Use when setting up multi-agent systems, creating new agents, or managing Discord channel organization.
Agent Council
Complete toolkit for creating and managing autonomous AI agents with Discord integration for OpenClaw.
What This Skill Does
Agent Creation:
Discord Channel Management:
Installation
# Install from ClawHub
clawhub install agent-councilOr manual install
cp -r . ~/.openclaw/skills/agent-council/
openclaw gateway config.patch --raw '{
"skills": {
"entries": {
"agent-council": {"enabled": true}
}
}
}'
Part 1: Agent Creation
Quick Start
scripts/create-agent.sh \
--name "Watson" \
--id "watson" \
--emoji "π¬" \
--specialty "Research and analysis specialist" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/watson" \
--discord-channel "1234567890"
Workflow
#### 1. Gather Requirements
Ask the user:
#### 2. Run Creation Script
scripts/create-agent.sh \
--name "Agent Name" \
--id "agent-id" \
--emoji "π€" \
--specialty "What this agent does" \
--model "provider/model-name" \
--workspace "/path/to/workspace" \
--discord-channel "1234567890" # Optional
The script automatically:
#### 3. Customize Agent
After creation:
Agent Architecture
Self-contained structure:
agents/
βββ watson/
β βββ SOUL.md # Personality and responsibilities
β βββ HEARTBEAT.md # Cron execution logic
β βββ memory/ # Agent-specific memory
β β βββ 2026-02-01.md # Daily memory logs
β β βββ 2026-02-02.md
β βββ .openclaw/
β βββ skills/ # Agent-specific skills (optional)
Memory system:
/memory/YYYY-MM-DD.md Cron jobs:
If your agent needs scheduled tasks:
1. Create HEARTBEAT.md with execution logic
2. Add cron jobs with --session
3. Document in SOUL.md
Examples
Research agent:
scripts/create-agent.sh \
--name "Watson" \
--id "watson" \
--emoji "π¬" \
--specialty "Deep research and competitive analysis" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/watson" \
--discord-channel "1234567890"
Image generation agent:
scripts/create-agent.sh \
--name "Picasso" \
--id "picasso" \
--emoji "π¨" \
--specialty "Image generation and editing specialist" \
--model "google/gemini-3-flash-preview" \
--workspace "$HOME/agents/picasso" \
--discord-channel "9876543210"
Health tracking agent:
scripts/create-agent.sh \
--name "Nurse Joy" \
--id "nurse-joy" \
--emoji "π" \
--specialty "Health tracking and wellness monitoring" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/nurse-joy" \
--discord-channel "5555555555"
Part 2: Discord Channel Management
Channel Creation
#### Quick Start
python3 scripts/setup-channel.py \
--name research \
--context "Deep research and competitive analysis"
#### Workflow
1. Run setup script:
python3 scripts/setup-channel.py \
--name \
--context "" \
[--category-id ]
2. Apply gateway config (command shown by script):
openclaw gateway config.patch --raw '{"channels": {...}}'
#### Options
With category:
python3 scripts/setup-channel.py \
--name research \
--context "Deep research and competitive analysis" \
--category-id "1234567890"
Use existing channel:
python3 scripts/setup-channel.py \
--name personal-finance \
--id 1466184336901537897 \
--context "Personal finance management"
Channel Renaming
#### Quick Start
python3 scripts/rename-channel.py \
--id 1234567890 \
--old-name old-name \
--new-name new-name
#### Workflow
1. Run rename script:
python3 scripts/rename-channel.py \
--id \
--old-name \
--new-name \
[--workspace ]
2. Apply gateway config if systemPrompt needs updating (shown by script)
3. Commit workspace file changes (if --workspace used)
#### With Workspace Search
python3 scripts/rename-channel.py \
--id 1234567890 \
--old-name old-name \
--new-name new-name \
--workspace "$HOME/my-workspace"
This will:
Complete Multi-Agent Setup
Full workflow from scratch:
# 1. Create Discord channel
python3 scripts/setup-channel.py \
--name research \
--context "Deep research and competitive analysis" \
--category-id "1234567890"(Note the channel ID from output)
2. Apply gateway config for channel
openclaw gateway config.patch --raw '{"channels": {...}}'3. Create agent bound to that channel
scripts/create-agent.sh \
--name "Watson" \
--id "watson" \
--emoji "π¬" \
--specialty "Deep research and competitive analysis" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/watson" \
--discord-channel "1234567890"Done! Agent is created and bound to the channel
Configuration
Discord Category ID
Option 1: Command line
python3 scripts/setup-channel.py \
--name channel-name \
--context "Purpose" \
--category-id "1234567890"
Option 2: Environment variable
export DISCORD_CATEGORY_ID="1234567890"
python3 scripts/setup-channel.py --name channel-name --context "Purpose"
Finding Discord IDs
Enable Developer Mode:
Copy IDs:
Scripts Reference
create-agent.sh
Arguments:
--name (required) - Agent name--id (required) - Agent ID (lowercase, hyphenated)--emoji (required) - Agent emoji--specialty (required) - What the agent does--model (required) - LLM to use (provider/model-name)--workspace (required) - Where to create agent files--discord-channel (optional) - Discord channel ID to bindOutput:
setup-channel.py
Arguments:
--name (required) - Channel name--context (required) - Channel purpose/context--id (optional) - Existing channel ID--category-id (optional) - Discord category IDOutput:
rename-channel.py
Arguments:
--id (required) - Channel ID--old-name (required) - Current channel name--new-name (required) - New channel name--workspace (optional) - Workspace directory to searchOutput:
Gateway Integration
This skill integrates with OpenClaw's gateway configuration:
Agents:
{
"agents": {
"list": [
{
"id": "watson",
"name": "Watson",
"workspace": "/path/to/agents/watson",
"model": {
"primary": "anthropic/claude-opus-4-5"
},
"identity": {
"name": "Watson",
"emoji": "π¬"
}
}
]
}
}
Bindings:
{
"bindings": [
{
"agentId": "watson",
"match": {
"channel": "discord",
"peer": {
"kind": "channel",
"id": "1234567890"
}
}
}
]
}
Channels:
{
"channels": {
"discord": {
"guilds": {
"YOUR_GUILD_ID": {
"channels": {
"1234567890": {
"allow": true,
"requireMention": false,
"systemPrompt": "Deep research and competitive analysis"
}
}
}
}
}
}
}
Agent Coordination
Your main agent coordinates with specialized agents using OpenClaw's built-in session management tools.
List Active Agents
See all active agents and their recent activity:
sessions_list({
kinds: ["agent"],
limit: 10,
messageLimit: 3 // Show last 3 messages per agent
})
Send Messages to Agents
Direct communication:
sessions_send({
label: "watson", // Agent ID
message: "Research the competitive landscape for X"
})
Wait for response:
sessions_send({
label: "watson",
message: "What did you find about X?",
timeoutSeconds: 300 // Wait up to 5 minutes
})
Spawn Sub-Agent Tasks
For complex work, spawn a sub-agent in an isolated session:
sessions_spawn({
agentId: "watson", // Optional: use specific agent
task: "Research competitive landscape for X and write a report",
model: "anthropic/claude-opus-4-5", // Optional: override model
runTimeoutSeconds: 3600, // 1 hour max
cleanup: "delete" // Delete session after completion
})
The sub-agent will:
1. Execute the task in isolation
2. Announce completion back to your session
3. Self-delete (if cleanup: "delete")
Check Agent History
Review what an agent has been working on:
sessions_history({
sessionKey: "watson-session-key",
limit: 50
})
Coordination Patterns
1. Direct delegation (Discord-bound agents):
2. Programmatic delegation (main agent β sub-agent):
// Main agent delegates task
sessions_send({
label: "watson",
message: "Research X and update memory/research-X.md"
})// Watson works independently, updates files
// Main agent checks later or Watson reports back
3. Spawn for complex tasks:
// For longer-running, isolated work
sessions_spawn({
agentId: "watson",
task: "Deep dive: analyze competitors A, B, C. Write report to reports/competitors.md",
runTimeoutSeconds: 7200,
cleanup: "keep" // Keep session for review
})
4. Agent-to-agent communication: Agents can send messages to each other:
// In Watson's context
sessions_send({
label: "picasso",
message: "Create an infographic from data in reports/research.md"
})
Best Practices
When to use Discord bindings:
When to use sessions_send:
When to use sessions_spawn:
Example: Research Workflow
// Main agent receives request: "Research competitor X"// 1. Check if Watson is active
const agents = sessions_list({ kinds: ["agent"] })
// 2. Delegate to Watson
sessions_send({
label: "watson",
message: "Research competitor X: products, pricing, market position. Write findings to memory/research-X.md"
})
// 3. Watson works independently:
// - Searches web
// - Analyzes data
// - Updates memory file
// - Reports back when done
// 4. Main agent retrieves results
const results = Read("agents/watson/memory/research-X.md")
// 5. Share with user
"Research complete! Watson found: [summary]"
Communication Flow
Main Agent (You) β Specialized Agents:
User Request
β
Main Agent (Claire)
β
sessions_send("watson", "Research X")
β
Watson Agent
β
Uses web_search
Uses web_fetch
Updates memory files
β
Responds to main session
β
Main Agent synthesizes and replies
Discord-Bound Agents:
User posts in #research channel
β
Watson Agent (bound to channel)
β
Sees message directly
Responds in channel
No main agent involvement
Hybrid Approach:
User: "Research X" (main channel)
β
Main Agent delegates to Watson
β
Watson researches and reports back
β
Main Agent: "Done! Watson found..."
β
User: "Show me more details"
β
Main Agent: "@watson post your full findings in #research"
β
Watson posts detailed report in #research channel
Troubleshooting
Agent Creation Issues:
"Agent not appearing in Discord"
openclaw gateway restart"Model errors"
provider/model-nameChannel Management Issues:
"Failed to create channel"
"Category not found"
"Channel already exists"
--id to configure existing channelUse Cases
Advanced: Multi-Agent Coordination
For larger multi-agent systems:
Coordination Patterns:
sessions_sendTask Management:
Documentation:
Best Practices
1. Organize channels in categories - Group related agent channels 2. Use descriptive channel names - Clear purpose from the name 3. Set specific system prompts - Give each channel clear context 4. Document agent responsibilities - Keep SOUL.md updated 5. Set up memory cron jobs - For agents with ongoing work 6. Test agents individually - Before integrating into team 7. Update gateway config safely - Always use config.patch, never manual edits
Requirements
Bot Permissions:
Manage Channels - To create/rename channelsView Channels - To read channel listSend Messages - To post in channelsSystem:
See Also
β‘ When to Use
π‘ Examples
Research agent:
scripts/create-agent.sh \
--name "Watson" \
--id "watson" \
--emoji "π¬" \
--specialty "Deep research and competitive analysis" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/watson" \
--discord-channel "1234567890"
Image generation agent:
scripts/create-agent.sh \
--name "Picasso" \
--id "picasso" \
--emoji "π¨" \
--specialty "Image generation and editing specialist" \
--model "google/gemini-3-flash-preview" \
--workspace "$HOME/agents/picasso" \
--discord-channel "9876543210"
Health tracking agent:
scripts/create-agent.sh \
--name "Nurse Joy" \
--id "nurse-joy" \
--emoji "π" \
--specialty "Health tracking and wellness monitoring" \
--model "anthropic/claude-opus-4-5" \
--workspace "$HOME/agents/nurse-joy" \
--discord-channel "5555555555"
βοΈ Configuration
Discord Category ID
Option 1: Command line
python3 scripts/setup-channel.py \
--name channel-name \
--context "Purpose" \
--category-id "1234567890"
Option 2: Environment variable
export DISCORD_CATEGORY_ID="1234567890"
python3 scripts/setup-channel.py --name channel-name --context "Purpose"
Finding Discord IDs
Enable Developer Mode:
Copy IDs:
π Tips & Best Practices
When to use Discord bindings:
When to use sessions_send:
When to use sessions_spawn:
Example: Research Workflow
// Main agent receives request: "Research competitor X"// 1. Check if Watson is active
const agents = sessions_list({ kinds: ["agent"] })
// 2. Delegate to Watson
sessions_send({
label: "watson",
message: "Research competitor X: products, pricing, market position. Write findings to memory/research-X.md"
})
// 3. Watson works independently:
// - Searches web
// - Analyzes data
// - Updates memory file
// - Reports back when done
// 4. Main agent retrieves results
const results = Read("agents/watson/memory/research-X.md")
// 5. Share with user
"Research complete! Watson found: [summary]"
Communication Flow
Main Agent (You) β Specialized Agents:
User Request
β
Main Agent (Claire)
β
sessions_send("watson", "Research X")
β
Watson Agent
β
Uses web_search
Uses web_fetch
Updates memory files
β
Responds to main session
β
Main Agent synthesizes and replies
Discord-Bound Agents:
User posts in #research channel
β
Watson Agent (bound to channel)
β
Sees message directly
Responds in channel
No main agent involvement
Hybrid Approach:
User: "Research X" (main channel)
β
Main Agent delegates to Watson
β
Watson researches and reports back
β
Main Agent: "Done! Watson found..."
β
User: "Show me more details"
β
Main Agent: "@watson post your full findings in #research"
β
Watson posts detailed report in #research channel