Deploy Cassandra for Discord
Organizational-memory AI agent for a single Discord server.
cassandra
Just deployed
/app/data
Deploy and Host Cassandra for Discord on Railway
Cassandra for Discord is a quiet organizational-memory agent for a single Discord server. It reads the channels you permit, stores them in SQLite, extracts durable memories such as decisions, risks, predictions, and commitments, and answers mentions with citations. Most of the time, it says nothing.
https://github.com/steel-experiments/cassandra-discord
About Hosting Cassandra for Discord
Hosting Cassandra means running one always-on service with one persistent volume. The volume stores the SQLite database at /app/data, so data survives redeploys.
You bring your own Discord application with the Message Content Intent enabled, along with your own model-provider API key. The default model is OpenAI gpt-5.6-terra.
You choose which channels Cassandra may read using two environment-variable lists. Cassandra starts in observe mode: it ingests messages and answers mentions, but never posts on its own.
A $2/day spend control is enabled by default. Health is exposed at /readyz, and a 45-second drain period allows for graceful shutdown during redeploys.
Common Use Cases
- Answer “What did we decide about X?” months later, with links to the messages containing the decision.
- Catch up after time away with a bounded, cited summary of a channel or the entire server.
- Maintain shared memory of risks, commitments, and open questions for a small team without requiring anyone to write documentation.
- Respect sensitive channels: restricted content never appears in answers outside its permitted scope.
Dependencies for Cassandra for Discord Hosting
- A Discord application you own, including a bot token, Application ID, and the Message Content Intent enabled.
- One Discord server where you can manage roles and channels.
- A model-provider API key. OpenAI is the default; Anthropic and Google are also supported.
- The server ID, the channel or category IDs to allow, and an admin role ID.
- No database service or additional infrastructure is required; the template creates the persistent volume for you.
Implementation Details
The service runs a digest-pinned release image, ghcr.io/steel-experiments/cassandra-discord, rather than a floating tag, so upgrades are deliberate.
Set the following required variables during installation:
DISCORD_TOKENDISCORD_APPLICATION_IDDISCORD_GUILD_IDOPENAI_API_KEYCASSANDRA_ADMIN_ROLE_IDSORG_VISIBLE_CHANNEL_IDSFULL_HISTORY
Set FULL_HISTORY=true to import all reachable history for the selected channels. Set it to false to begin with new messages only.
Leave empty lists unset; Railway rejects empty values.
Migrations run at startup and are forward-only, so never run two different versions against the same volume.
Why Deploy Cassandra for Discord on Railway?
Railway provides a single platform for deploying and hosting your infrastructure stack. It handles much of the underlying configuration while still allowing you to scale services vertically or horizontally as needed.
By deploying Cassandra for Discord on Railway, you can run the agent alongside the rest of your application infrastructure with minimal operational overhead. Railway can host servers, databases, AI agents, and other supporting services in one place.
Template Content
ORG_NAME
Organization name used in answers and reports. Default: Your Company.
FULL_HISTORY
true imports all reachable history for the selected channels on first start. false starts from new messages. There is no default.
ORG_TIMEZONE
IANA time zone for day boundaries, for example UTC or Europe/Berlin. Default: UTC.
DISCORD_TOKEN
Bot token from the Discord Developer Portal, Bot page. Secret: reset it there if it leaks.
OPENAI_API_KEY
OpenAI API key. For Anthropic or Google instead, set LLM_PROVIDER and use that provider's key.
DISCORD_GUILD_ID
Your server ID. Turn on Developer Mode in Discord, right-click the server name, Copy Server ID.
LLM_DAILY_BUDGET_USD
Daily model-spend admission control in USD. Default 2. Use unlimited to remove the cap. Not a provider billing limit.
CHANNEL_POLICY_SOURCE
basic builds the channel policy from the two ID lists. file uses a mounted policy file instead. Default: basic.
DISCORD_APPLICATION_ID
Application ID from the Developer Portal, General Information page.
RESTRICTED_CHANNEL_IDS
Comma-separated channel or category IDs whose content stays inside that channel. Leave unset if empty.
ORG_VISIBLE_CHANNEL_IDS
Comma-separated channel or category IDs Cassandra may read as org-visible. Right-click a channel, Copy Channel ID.
CASSANDRA_ADMIN_ROLE_IDS
Comma-separated Discord role IDs that may run /cassandra admin commands.
