Run your protoAgent as a Discord bot — inbound DMs + channel @-mentions, with
outbound discord_send / discord_read / discord_react tools. A standalone
protoAgent plugin (ADR 0015/0016 ·
0018/0019), extracted from core per ADR 0058 so it installs at runtime and
isn't bundled with the host.
Talks to Discord's REST + Gateway v10 directly over httpx + websockets
(both core host deps) — no discord.py.
# from the protoAgent host (CLI or Settings → Plugins → install from URL)
python -m server plugin install https://github.com/protoLabsAI/discord-pluginInstall ≠ enable ≠ trust — it ships disabled. Enable it, then set a bot token:
- Enable:
plugins: { enabled: [discord] }(or the Settings → Plugins toggle). - Configure: System → Settings → Discord → paste a bot token (Developer
Portal → your app → Bot → Reset Token), optionally restrict
admin_ids, and hit Test connection. Saving reconnects the gateway live.
The bot token is stored in secrets.yaml (never tracked YAML). DISCORD_BOT_TOKEN
/ DISCORD_ADMIN_IDS remain env fallbacks for Docker/headless deploys.
- Surface — the inbound gateway (DMs + @-mentions): burst debounce, per-conversation continuity, slow-response reactions (👀→✅), auto-threading, admin allowlist, long-window context, and return-address delivery.
- Route —
POST /api/config/test-discord(the console's Test button). - Tools —
discord_send/discord_read/discord_react, registered only when a token is set.
Config/secrets/Settings come from protoagent.plugin.yaml (ADR 0019). Behavior is
identical to the former first-party plugins/discord.
Host-free — the suite runs with no protoAgent host (the graph.* / infra.*
imports the gateway uses are lazy):
python3.12 -m venv .venv && . .venv/bin/activate
pip install -r requirements-dev.txt
pytest -q
ruff check .At runtime the host provides langchain-core, fastapi, httpx, websockets,
and the graph.* / infra.* packages — the plugin declares no runtime pip deps.
protoAgent guides: plugins · communication-plugins · ADRs 0015 / 0058.