Skip to main content

Channels and Voice

Anda can stay in the terminal, or it can join team channels. Channels bring context back into the same runtime and memory system.

Supported Channels

  • Telegram
  • WeChat
  • Discord
  • Lark / Feishu

Channel configuration lives under channels in ~/.anda/config.yaml.

Multiple Users

One daemon can serve multiple trusted users through the same Anda agent. Create a user key, then set a channel entry's user to that id. If user is omitted, the channel uses the local owner from ~/.anda/keys/user.key.

anda user create alice
anda user list

The command writes the new public key under top-level users and saves the matching private key under ~/.anda/keys/users/:

users:
- id: alice
pubkey: "ALICE_ED25519_PUBLIC_KEY"
- id: ops
pubkey: "OPS_ED25519_PUBLIC_KEY"

Telegram Example

channels:
telegram:
- id: personal
user: alice
bot_token: "YOUR_TELEGRAM_BOT_TOKEN"
username: "YOUR_TELEGRAM_BOT_USERNAME"
allowed_users:
- "*"
mention_only: false

WeChat Example

channels:
wechat:
- id: personal
user: alice
# Leave empty to run anda channel init wechat, scan the QR code, and get a token.
bot_token: ""
username: anda-wechat
allowed_users:
- "*"

Discord Example

Discord uses a bot token and a Gateway connection. Create and install the bot before editing config.yaml:

  1. Open the Discord Developer Portal, then create or open your app.
  2. On the app's Bot page, copy or reset the bot token. Also enable Message Content Intent under Privileged Gateway Intents so Anda can read normal message text.
  3. On the Installation page, make Guild Install include the bot scope. Without the bot scope, the app can appear under your Discord Apps but not as a server bot member.
  4. Grant the bot at least View Channels, Send Messages, and Read Message History. Add Attach Files if Anda should send files, and add Add Reactions when ack_reactions: true.
  5. Install the app to your server. The bot should appear in the server member list after a server install.
channels:
discord:
- id: server
user: ops
bot_token: "YOUR_DISCORD_BOT_TOKEN"
username: anda-discord
# Optional. Restrict this entry to one Discord server.
guild_id: "YOUR_DISCORD_GUILD_ID"
allowed_users:
- "YOUR_DISCORD_USER_ID"
mention_only: true
ack_reactions: true

Only bot_token is required by config validation. For a usable and safer setup, set allowed_users to Discord user IDs; an empty allowed_users list with allow_external_users: false ignores non-allowlisted senders. Use allow_external_users: true only when untrusted external users should be able to talk to Anda as $external_user.

After saving the config:

anda channel list
anda restart

In a server channel, mention the bot:

@anda-discord summarize this thread

In a DM with the bot, send a normal message without mentioning it. If the bot is not visible, check that Guild Install includes the bot scope and that the daemon is running.

Lark / Feishu Example

channels:
lark:
- id: work
user: ops
app_id: "cli_xxx"
app_secret: "YOUR_APP_SECRET"
platform: feishu
receive_mode: websocket
mention_only: true

Channel Safety Checks

  • allowed_users decides who can trigger Anda; use "*" only when open access is acceptable.
  • user decides which trusted Anda caller owns conversations, resources, and memory for this channel entry.
  • Telegram and Discord usually require bot_token.
  • WeChat can use a saved token, or QR login when bot_token is empty.
  • Lark / Feishu needs app_id and app_secret; Feishu endpoints use platform: feishu.
  • Channel routes are persisted so later replies can return to the original thread, room, or contact.

Voice Input and Playback

Voice input requires transcription.enabled: true. Start a voice session with:

anda voice --record-secs 8

If you also want Anda to play the answer, configure tts.enabled: true. For microphone input and text output only:

anda voice --record-secs 8 --no-playback

Audio attachments can enter context after transcription is enabled, so voice messages in channels can become part of the same memory thread.