AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(platform): add Bots settings page with per-platform link management (#13222)
## Why Users had no way to see which chat-bot platforms they'd connected AutoGPT to, what their DM link looked like, or which servers their bots were linked to. The existing `/settings/integrations` covers third-party API integrations (Gmail, GitHub, etc.) but doesn't surface chat-bot connections, which behave differently — they're per-deployment, can be unlinked, and have an "add bot to server" entry point. ## What A new **Bots** tab under Settings that dynamically lists every bot platform enabled on this deployment (Discord today, more later as their adapters land). For each platform: an "Add bot to X" button, a DM tile showing your linked DM channel, and a list of linked servers each with its own Unlink action. ## How - `GET /api/platform-linking/platforms` returns one `BotPlatformInfo` per enabled platform + caller's DM/server links. Platforms whose adapter isn't configured are omitted, so future platforms stay hidden until they're wired up. - A small `registry.py` is the source of truth for which platforms exist. Adding a new platform = adding one `PlatformMeta` row. - Discord invite URL is built from a new `AUTOPILOT_BOT_DISCORD_CLIENT_ID` secret + a hardcoded sensible permissions default (`377957124928`) that can be overridden via `AUTOPILOT_BOT_DISCORD_PERMISSIONS`. - Frontend: standard `src/app/(platform)/settings/bots/` layout (page + hooks + sub-components, render functions under 50 lines). Orval generates the React Query hook. - The server list distinguishes "server name unknown" (bot can't see the server) with an amber indicator + tooltip, rather than rendering a raw ID as if it were the name. Relies on the bot's name-refresh events from the stacked PR underneath. > ⚠️ **Stacked on #13221** (the bot-side name-refresh path). Merge that first or servers the bot can see will appear as IDs until the bot reconnects. ## Test plan - [x] Backend: `poetry run pytest backend/api/features/platform_linking/ backend/platform_linking/ backend/copilot/bot/` — 217 pass - [x] Frontend: `pnpm exec vitest run src/app/\(platform\)/settings/bots` — 8 pass - [x] Frontend: `pnpm format && pnpm exec next lint && pnpm exec prettier --check src/app/api/openapi.json` - [x] Manual: visited `/settings/bots`, confirmed Add bot button, DM tile, server list with both happy-path and "Bot not in server" indicator <img width="1142" height="556" alt="image" src="https://github.com/user-attachments/assets/e30c5045-c7e2-45cd-b470-90458eb46344" /> <img width="377" height="104" alt="image" src="https://github.com/user-attachments/assets/fdb8ba1e-c21e-48b7-86f1-8c951361c3a1" />
B
Bently committed
aea4d5abd1ebda678f53851b819671ba562e5a6e
Parent: 7e2154c
Committed by GitHub <noreply@github.com>
on 5/27/2026, 4:39:52 PM