discord-soul
This skill builds a Discord-based agent by exporting server history, ingesting every message into ./discord.sqlite, generating daily memory files in ./my-agent/memory/, and creating an OpenClaw workspace. It reads a Discord token (~/.config/discord-exporter-token), executes export/processing scripts (./scripts/create_agent.sh), and calls external services using ANTHROPIC_API_KEY, which raises security-relevant concerns.
Discord Soul
Turn your Discord server into a living, breathing agent that embodies your community's identity, memory, and culture.
Built for OpenClaw — the open-source AI agent framework.
What You Get
An agent that:
- Remembers every conversation
- Speaks in your community's voice
- Knows the key figures and inside jokes
- Grows as new messages arrive daily
- Answers questions about community history
Quick Start
# 1. Create agent from your Discord
./scripts/create_agent.sh --name "my-community" --guild YOUR_GUILD_ID
# 2. Add to OpenClaw config and restart
# 3. Set up daily updates (cron)
./scripts/update_agent.sh --agent ./my-agent --db ./discord.sqlite --guild YOUR_GUILD_ID
The Process
- Export — Pull all messages from Discord
- Security — Filter prompt injections (regex + Haiku evaluation)
- Ingest — Convert to rich SQLite (reactions, roles, mentions)
- Generate — Create daily memory files
- Simulate — Process days chronologically to grow the soul
- Birth — Add to OpenClaw with config + binding
- Maintain — Cron job updates memory daily
Prerequisites
- OpenClaw — AI agent framework (GitHub | Docs)
- DiscordChatExporter CLI
- Python 3.10+
- Discord token in
~/.config/discord-exporter-token
Scripts
| Script | Purpose |
|---|---|
create_agent.sh | Full pipeline: Discord → Agent |
ingest_rich.py | JSON → SQLite with reactions/roles |
generate_daily_memory.py | SQLite → daily markdown |
simulate_growth.py | Generate soul emergence prompts |
incremental_export.sh | Fetch new messages only |
update_agent.sh | Daily cron wrapper |
regex-filter.py | Fast injection pattern detection |
evaluate-safety.py | Haiku semantic safety evaluation |
secure-pipeline.sh | Full security pipeline |
Security
⚠️ Discord content may contain prompt injection attacks.
Before ingesting content to your agent:
- Run
regex-filter.py— Fast pattern matching - Run
evaluate-safety.py— Haiku semantic evaluation - Only use messages with
safety_status = 'safe'
See SKILL.md for full security documentation.
Templates
Agent workspace files in templates/:
SOUL.md— Community identityMEMORY.md— Long-term milestonesLEARNINGS.md— Discovered patternsAGENTS.md— Key figuresTOOLS.md— Channels and ritualsHEARTBEAT.md— Maintenance protocol
See SKILL.md for the complete guide.
OpenClaw Integration
This skill is designed to work with OpenClaw, an open-source AI agent framework.
Key features used:
- Agent workspaces — Each Discord community becomes its own agent
- Memory search — Semantic search across daily memory files
- Heartbeats — Periodic maintenance to consolidate learnings
- Bindings — Connect agents to Telegram, Discord, Slack, etc.
Get started with OpenClaw:
- 🌐 Website: openclaw.ai
- 📚 Docs: docs.openclaw.ai
- 💻 GitHub: github.com/openclaw/openclaw
- 💬 Discord: discord.gg/clawd
License
MIT