Skip to content

Drive the agent from Discord

Discord lets you talk to the agent on your computer from any Discord client. It is the same agent, model and data folder you use on the desktop. The bot answers only the Discord accounts you list as owners.

You can DM the bot, or @mention it in a server channel. Every DM, channel and thread is its own conversation.

What you need

  • A Discord account and a server where you can add a bot.
  • Atomic Agent with a working model. See How models work.
  • The desktop app (Settings › Connections › Discord) or the terminal UI (/integrations) for the setup. Both write to the same data folder, so a bot set up in one also works from the other.

Step 1: create the bot

  1. Open the Discord Developer Portal, click New Application and give it a name.
  2. In the left menu, open Bot and click Reset Token. Copy the token. The client secret and the public key on the same portal are not the token.
  3. Leave all three Privileged Gateway Intents off. The bot does not need them.
  4. In the left menu, open OAuth2 › URL Generator and tick the bot scope.
  5. Below it, tick Send Messages, Read Message History and View Channels.
  6. Open the generated URL, pick your server and authorize. You can only DM a bot you share a server with.

Step 2: find your user ID

The owner list uses Discord user IDs, not names.

  1. In Discord, open Settings › Advanced and turn on Developer Mode.
  2. Right-click your name and choose Copy User ID. It is 15 to 25 digits.

Repeat for every person who should be able to drive the agent.

Step 3: connect it

  1. Open Settings › Connections › Discord and press Paste a bot token. Paste the token and press Save.
  2. Under Who the bot answers, paste a user ID and press Add. Repeat for each owner. Remove next to an ID takes it off the list (click twice to confirm).
  3. Check that Answer in Discord is on. Adding the first owner while a token is saved turns it on for you.
  4. Press Restart agent. The agent reads the token and the owner list when it starts, and the app stays open. The status chip changes to Connected.

Change token and Remove token are on the same screen. Every change on this screen needs a restart to apply.

There is no pairing code for Discord. The owner list is the allowlist.

Step 4: chat from Discord

DM the bot, or @mention it in a channel it can see. In a server channel the bot acts only on messages that mention it. It ignores messages from other bots.

When the agent wants to do something that needs your yes, the request arrives with buttons:

  • Approve runs this one action.
  • Deny refuses it.
  • A third button, such as Always allow "git status" in this project, appears when the action can be saved as a rule.

Only an owner’s click counts. Anyone else in the server who clicks is ignored. What asks and what does not is set by your approval level. See Approvals.

Commands in Discord

Type these as a message to the bot (in a server channel, mention it first):

CommandWhat it does
/helpShow the commands.
/statusThis channel’s session id.
/sessionsEvery channel this bot has a session for.
/switch <session-id>Point this channel at an existing Discord session.
/newStart a fresh session for this channel. The current one is archived.
/modelShow the provider and model in use.
/model <provider> [model-id]Switch the provider, and optionally the model.
/cancelStop this channel’s running turn.

Each DM, channel and thread has its own session, separate from your chats in the app. Ask about project A in #a and project B in #b, and the two never mix. /switch only takes sessions that started in Discord, and one session can be open in only one channel at a time.

Files

Attach files to a DM, or to a message that mentions the bot, up to 50 MB each. They are saved to inbox/discord/ in the data folder and handed to the agent with your message.

The agent can send files back. Discord’s upload limit depends on the server (10 MB without boosts, up to 100 MB at the highest boost level). If a file is too big, the bot says so in the channel.

Set it up by hand

  1. Put the token in .env in the data folder (by default ~/.atomic-agent/.env), never in config.json:

    Terminal window
    DISCORD_BOT_TOKEN=your-bot-token
  2. Turn the channel on and list the owners in config.json. IDs are strings, in quotes:

    {
    "discord": {
    "enabled": true,
    "ownerUserIds": ["123456789012345678"]
    }
    }
  3. Restart the agent so it reads the new token.

More than one bot

The TUI’s Swarm tab (/swarm) lists every Telegram and Discord bot this agent runs and lets you add more, each with its own token, owner and role. See TUI panels.

Privacy and safety

  • Owners only. Messages and button clicks from accounts not on the list are dropped. With an empty list, the bot answers no one.
  • No privileged intents. The bot gets the full text only of DMs and of messages that mention it.
  • The token stays on your computer, in .env, readable only by your user account.
  • Messages travel through Discord. Your requests and the replies pass through Discord’s servers. With a cloud model, prompts also go to that provider. See What stays on your machine.

Checked on 18 Nov 2026 against Atomic Agent v0.8.0 and Desktop v0.0.9.

Get updates by email

One email when a new version comes out.