annaanna
Channels

QQ Bot

anna includes a QQ bot that connects via WebSocket (persistent connection, no public URL required).

Setup

  1. Register a QQ Bot at QQ Bot Platform and get your AppID and AppSecret
  2. Run anna --open to launch the admin panel
  3. In the admin panel: add an AI provider, then configure the QQ channel with your AppID and AppSecret
  4. Start the daemon:
anna

All channel configuration (credentials, group mode, allowed IDs, etc.) is managed through the admin panel. Environment variables are limited to provider API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY) and ANNA_HOME.

Multi-User Support

Each QQ user is automatically resolved from their platform identity. Sessions are scoped per user per agent. No manual user setup is required. The QQ channel currently uses the default agent (the /agent command is not yet available for QQ).

Streaming Responses

The bot uses QQ's native Stream API for progressive response delivery. As the LLM generates tokens, updates are sent in real time without editing previous messages.

Tool Indicators

During tool execution, the stream shows status with emoji indicators:

ToolEmoji
bashlightning
readbook
writepencil
editwrench
searchmagnifying glass

Group Support

QQ group messages are received as @mention events (GROUP_AT_MESSAGE_CREATE). Set the group mode in the admin panel:

  • mention -- respond to @mentions (default)
  • always -- same as mention for QQ (AT events are always mentions)
  • disabled -- ignore group messages entirely

Access Control

Restrict which QQ users can interact with the bot by adding allowed OpenIDs in the admin panel. Leave empty to allow all users. Use the /whoami command to get your OpenID.

Image Support

Users can send images to the bot for analysis. The bot downloads image attachments, encodes them, and passes them to the AI model as multimodal content alongside any caption text.

Commands

Send these commands as text messages to the bot:

CommandDescription
/start or /helpWelcome and help
/newStart a fresh session
/compactCompress conversation history
/abortCancel the in-progress response
/modelList available models
/model <number>Switch to model by number
/model <query>Filter models by name
/whoamiShow your user ID for config

Configuration Reference

All settings below are managed through the admin panel (anna --open).

FieldDescriptionDefault
app_idQQ Bot AppID(required)
app_secretQQ Bot AppSecret(required)
group_modeGroup behavior: mention, always, disabledmention
allowed_idsUser OpenIDs allowed (empty = all)[]

On this page