Skip to content

protoLabsAI/discord-plugin

Repository files navigation

discord-plugin

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.

Install

# from the protoAgent host (CLI or Settings → Plugins → install from URL)
python -m server plugin install https://github.com/protoLabsAI/discord-plugin

Install ≠ enable ≠ trust — it ships disabled. Enable it, then set a bot token:

  1. Enable: plugins: { enabled: [discord] } (or the Settings → Plugins toggle).
  2. 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.

What it contributes

  • 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.
  • RoutePOST /api/config/test-discord (the console's Test button).
  • Toolsdiscord_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.

Develop

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.

Links

protoAgent guides: plugins · communication-plugins · ADRs 0015 / 0058.

About

Discord ingress + outbound tools — a standalone protoAgent plugin (ADR 0058)

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages