Connectors
Discord Connector
Ingest Discord channel messages into CortexDB.
Tails Discord channel messages and writes them to CortexDB as conversation experiences.
Two ways to run this connector
Self-hosted — pip install 'cortexdb-connectors[discord]' then cortexdb-sync sync discord.
Managed — CortexDB runs the connector as a worker. See the Connectors overview.
1. Prepare credentials
Discord Developer Portal → New Application → Bot → copy the bot token. Enable the Message Content Intent, and invite the bot to your server with Read Messages / View Channels + Read Message History permissions.
What gets written
Each message becomes a POST /v1/experience on the resolved scope (default
org:<org>/source:discord/guild:{guild}/channel:{channel}), author resolved to a username, body as
content.
Corrected fields
- The
idempotency_keyisdiscord:<message_id>(not adc:<guild>:<channel>:<message_id>composite). - Thread replies attach a
thread=…label, notcontext.preceded_by.
Run it yourself
pip install 'cortexdb-connectors[discord]'
pip install cortexdb-cli && cortexdb init
export DISCORD_BOT_TOKEN=... # required
cortexdb-sync --api-url http://localhost:3141 sync discord
cortexdb-sync --api-url http://localhost:3141 watch discord --interval 60