agent-discord-rs-0.2.3 is not a library.
Agent Discord (Rust)
A high-performance Discord bot daemon in Rust that bridges multiple coding-agent backends with a unified channel workflow.
Core Features
- Multi-backend routing: Pi (RPC), OpenCode, Kilo, and Copilot.
- Per-channel config: backend, mention-only mode, and assistant display name via
/config. - File upload pipeline: attachments are staged locally, passed to backends with native/fallback handling, and auto-cleaned by TTL.
- Real-time streaming UI: thinking/tool status + incremental response rendering.
- Session lifecycle control: model switching, thinking level, compact/clear/abort.
- i18n: Traditional Chinese (
zh-TW) and English (en).
Slash Commands
/config: Configure non-sensitive per-channel settings (backend, mention_only, assistant name)./agent: Switch backend for current channel./model: Switch model for current channel./thinking: Set thinking level (if backend supports it)./compact: Compact conversation context./clear: Clear current session state./abort: Abort current generation./skill: Load a skill (backend-dependent)./mention_only: Toggle mention-only mode./language: Switch bot UI language./cron,/cron_list: Manage scheduled prompts.
Requirements
- Rust toolchain: https://www.rust-lang.org/tools/install
- Discord bot token
- At least one backend installed:
- Pi:
npm install -g @mariozechner/pi-coding-agent(https://github.com/mariozechner/pi-coding-agent) - OpenCode:
npm install -g @opencode-ai/cli - Kilo:
npm install -g @kilocode/cli - Copilot CLI (ACP):
npm install -g @github/copilot(or your distro package)
- Pi:
Discord Setup
Gateway Intents
Enable these in Discord Developer Portal -> Bot:
- Required:
MESSAGE CONTENT INTENT
- Recommended:
SERVER MEMBERS INTENT
- Optional:
PRESENCE INTENT
OAuth2 Scopes
botapplications.commands
Bot Permissions (recommended baseline)
Grant at least:
View ChannelsSend MessagesSend Messages in ThreadsEmbed LinksAttach FilesRead Message HistoryUse Application Commands
Optional but useful for broader server setups:
Manage MessagesAdd ReactionsUse External Emojis
Install
From crates.io:
Or build from source:
First Run
- Start once to generate config/data files:
- Edit config at:
~/.agent-discord-rs/config.toml
Set at minimum:
discord_token- optional
assistant_name
- Authorize channel/user:
- Mention the bot in target channel.
- Run returned auth command:
- If using Copilot backend, login once with the same Linux account as the bot service:
Run
# foreground
# systemd user service
License
MIT. See LICENSE.