-
Notifications
You must be signed in to change notification settings - Fork 52
Using discrawl as memory augmentation for AI agents #15
Description
Cool project — wanted to share a use case you might not have expected.
I'm running 3 AI agents on a Discord server using OpenClaw. Each agent has its own bot account and channel. When conversations get long, the agents compress their context and lose older details. I set up discrawl to archive everything into SQLite so they can search past conversations and recover lost context.
Setup:
- Each bot syncs its own channel using a separate
config.tomlwith its account name (the main bot runstailfor live updates, the others sync on a daily cron) - All agents share a search wrapper script that queries the same SQLite DB
- Agents can search across ALL channels — including each other's — without needing Discord permissions to view those channels
What's useful:
- After context compression, an agent can search "what did we decide about X?" and pull up the actual conversation
- Agents can cross-reference what other agents discussed without any cross-talk risk
- FTS5 search is fast and the results are immediately useful
Testing:
doctorpasses clean on all 3 bot tokens- Full sync archived 2,648 messages across 4 channels (samantha: 1,448, school: 980, research: 148, notifications: 72)
- FTS5 search returns results from all channels correctly
tailLaunchAgent stays connected via Gateway, picks up new messages in real-time- Multi-bot sync using per-account temp configs works — each bot syncs its own channel
- Tested both agents searching their own channel history and each other's — all returned expected results
- DB is 10MB for ~2,600 messages
One thing I ran into: My OpenClaw config has multiple bot accounts (samantha, atlas, finch, default). When I ran discrawl init --from-openclaw, it pulled the config fine and discovered my guild, but it set account = 'default' in config.toml. My default account doesn't have a token — only the named accounts do. So sync and tail failed silently until I manually edited config.toml to account = 'samantha'.
To get all channels archived, I had to create temp copies of config.toml with each bot's account name and run sync --channels <id> separately, since each bot can only read its own channel's message history. An --account flag on init (or multi-account support in sync) would make this a lot smoother for setups with multiple bots on the same server.
Thanks for building this — it's been a great addition to my setup.