Discord
Discord connects over the Gateway WebSocket.
Setting it up
-
Create an application and a bot in the Discord developer portal.
-
Enable the Message Content intent under the Bot tab.
-
Invite the bot to your server with permission to read and send messages.
-
Store the token and add the connection:
Terminal window printf '%s' 'MTIz...' | nouride secret set discord-main --value-stdin[gateways.discord.main]enabled = truetoken = "discord-main"agent = "nouva" -
Restart the daemon.
Which channels an agent answers in
Set on the agent, not on the connection — because a connection is an identity and a binding is a scope, and one agent may answer on several connections:
[channels]"discord:main" = ["guild:123456:channel:789012"]Empty or absent means the agent answers when addressed by name — or always, if the connection names
it as its owner with agent = "...".
The cache settings, and why they default to zero
[gateways.discord.main.cache]messages = 0 # per channelusers = 0 # globalmembers = 0 # per guilddiscord.js ships these unbounded — bar 200 messages per channel — with a sweeper that only sweeps threads. With one bot per agent that is one set of caches per connection: measured on a live box, six of them grew the daemon from 76 MB to 97 MB over twenty minutes.
Nothing in the adapter reads them. The message author and the member arrive on the gateway payload, and fetching a message is a REST call either way — so the cost bought nothing.
Raise one only if something starts needing it. Channels and guilds are always cached and are not configurable: those are bounded by how many places the bot was added to, rather than by traffic.
Several Discord bots in one channel
This is the arrangement the multi-agent design is for, and it is where the interesting behaviour lives — Discord fans every channel message out to every bot in the channel, so six bots means six copies of one message.
The short version: in a channel with more than one of your bots, a message has to be addressed, and a tag naming somebody else resolves to nobody rather than falling through.
Two practical consequences:
A bot can only speak where it was invited. Each agent answers through its own connection, and
nothing in config says which channels a bot is in. A log line reading an agent's own connection could not deliver here means: invite that bot to the channel.
A tag before a slash command is stripped. Discord sends <@self> /approve, and both the command
parser and the queue’s urgency check only recognise text that starts with / — so a tagged command
was neither a command nor urgent, and queued behind the very turn waiting to be approved. The adapter
removes leading tags of itself.
Mentions
The engine never formats a mention itself — the syntax belongs to the platform. Each agent is handed
the exact token to type for every other agent, taken from that agent’s own connection, which on
Discord is <@id>.
A bot’s Discord application name is not its agent’s id. @Nero | Infra Agent is what the portal
says; nero is the agent. Both resolve.