arizuko

arizukoproducts › Discord team agent — setup

Discord team agent — setup

Deploy one agent into a Discord guild: arizuko instance, Discord bot, OAuth-linked identities, web workspace access.

prerequisites

1. seed the instance

arizuko create acme
cd /srv/data/arizuko_acme
$EDITOR .env

No discord-team product template ships yet, so the main group comes up with the generic persona. The closest starting point is ant/examples/slack-team/ — copy its PERSONA.md and CLAUDE.md into groups/main/ and edit out the Slack-specific lines (the sidebar pane, the channel wording), or write your own.

2. fill in .env

The Discord-team setup needs at least these keys set:

# Identity + secrets
ASSISTANT_NAME=acme              # agent display name
AUTH_SECRET=…                    # JWT signer; arizuko create pre-generates it
WEB_HOST=acme.example.com        # public hostname for proxyd / OAuth callbacks

# Discord adapter
DISCORD_BOT_TOKEN=...            # from the Discord Developer Portal

# OAuth providers for linked identities (any subset)
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
DISCORD_CLIENT_ID=...
DISCORD_CLIENT_SECRET=...

arizuko create already generated AUTH_SECRET and SECRETS_KEY — leave those alone. See reference / env for the complete list.

3. create the Discord bot

In discord.com/developers/applications:

4. run the instance

arizuko run acme

This generates a Docker Compose file and runs it. For long-running production, install a systemd unit; see getting started for the template.

5. verify

6. recommended routing default

For a guild bot, the usual shape is "answer every DM, stay quiet in channels unless @-mentioned." Discord JIDs are discord:<guild_id>/<channel_id> for guild channels and discord:dm/<channel_id> for DMs:

seq  match                                target
-2   chat_jid=discord:dm/*                main
-1   chat_jid=discord:*/* verb=mention    main
0    chat_jid=discord:*/*                 main#observe

Channel chatter still lands in main under #observe so the agent has context on the next mention, but no turn fires until someone calls on it. arizuko group add on a guild-channel JID writes this mention + observe pair for you (see step 10); the rows above are the guild-wide equivalent, added with arizuko route acme add <match> <target> --seq N.

7. enable member features

Plain channel use needs no sign-in. For the full member experience (personal cloud, web chat, cross-platform identity), members sign in at https://<WEB_HOST>/auth/login.

8. configure use cases

support agent

For a support/analysis channel, populate the facts/ directory with your knowledge base:

# Copy documentation into facts/
cp -r /path/to/docs/*.md /srv/data/arizuko_acme/groups/main/facts/

# Or edit the CLAUDE.md to point to external sources
$EDITOR /srv/data/arizuko_acme/groups/main/CLAUDE.md

Add to the channel's CLAUDE.md:

## Support behavior

When answering questions:
1. Search facts/ first with /recall-memories
2. Cite the source file and line number
3. If the answer isn't in facts/, say "I don't have that in my knowledge base"
4. Never guess or make up information
5. Offer to escalate to a human when stuck

trading/market analysis agent

For a collaborative research channel, configure the agent to track observations and produce synthesis:

## Research behavior

When members share URLs:
1. Fetch and summarize the content
2. Log key points to the research diary with timestamp
3. Note which member shared it

When members share observations:
1. Acknowledge and log to diary
2. Cross-reference with recent entries
3. Offer to compile synthesis when patterns emerge

On request for synthesis:
1. Review diary entries for the requested period
2. Group by topic/ticker
3. Note patterns and contradictions
4. Cite sources for each point

9. tune per channel

Each Discord channel maps to an arizuko group folder. To customise voice, allowed tools, or skills for one channel, edit its ~/CLAUDE.md via WebDAV at https://<WEB_HOST>/dav/<channel>/CLAUDE.md or directly on disk.

Channel-scoped secrets. Tool API keys an agent needs in one channel but not another go in the secrets table — set with arizuko secret <instance> set <folder> KEY --value V.

10. adding more channels

Map a new channel to a folder (guild ID, then channel ID):

arizuko group acme add 'discord:123456789/987654321' dev-chat

For guild channels this writes the mention-trigger + observe route pair automatically. For a per-channel persona or skill set, edit ~/CLAUDE.md in the new folder.

common issues

Bot doesn't respond to messages.
Check that "Message Content Intent" is enabled in the Discord Developer Portal. Without it, the bot receives message events but the content is empty.
Bot responds in DMs but not channels.
Check the route table — channels may be set to #observe only. Add a verb=mention route that targets main (not main#observe).
discd shows unhealthy in docker ps.
Token was rotated or the bot was removed from the guild. Copy the new token into DISCORD_BOT_TOKEN and restart: sudo systemctl restart arizuko_acme.
WebDAV mount fails.
The member needs to sign in at /auth/login first. WebDAV requires authentication.

go deeper