平台机器人

让 AxonCog 接入各种平台,成为你的智能助手

支持的平台

DC
Discord
游戏社区首选
TG
Telegram
隐私安全
SL
Slack
企业协作
WX
微信
中国用户
DD
钉钉
企业办公
FS
飞书
字节跳动
QQ
QQ
即时通讯
WB
Web
网页界面
API
API
自定义接入

配置示例

Discord Bot

channels/discord.yaml
platform: discord
enabled: true

bot:
  token: "YOUR_DISCORD_BOT_TOKEN"
  application_id: "YOUR_APPLICATION_ID"
  guild_id: "YOUR_SERVER_ID"

permissions:
  - send_messages
  - read_messages
  - use_slash_commands

features:
  slash_commands: true
  context_menu: true
  buttons: true
  modals: true

agents:
  default: "main-assistant"
  channels:
    "123456789": "dev-helper"  # 特定频道使用特定 Agent

Telegram Bot

channels/telegram.yaml
platform: telegram
enabled: true

bot:
  token: "YOUR_TELEGRAM_BOT_TOKEN"

features:
  inline_queries: true
  callback_queries: true
  web_app: true

webhook:
  enabled: true
  url: "https://your-domain.com/api/webhook/telegram"

agents:
  default: "main-assistant"
  groups:
    "-100123456789": "group-helper"  # 群组特定 Agent

微信公众号/企业微信

channels/wechat.yaml
platform: wechat
enabled: true

type: official_account  # 或 enterprise

official_account:
  app_id: "YOUR_APP_ID"
  app_secret: "YOUR_APP_SECRET"
  token: "YOUR_TOKEN"
  encoding_aes_key: "YOUR_AES_KEY"

enterprise:
  corp_id: "YOUR_CORP_ID"
  agent_id: "YOUR_AGENT_ID"
  secret: "YOUR_SECRET"

features:
  text_messages: true
  image_messages: true
  menu: true

消息处理流程

1

消息接收

平台 Webhook 或长连接接收用户消息

2

身份识别

识别用户身份,加载用户画像和偏好

3

上下文加载

加载会话历史和相关上下文

4

Agent 处理

Agent 结合世界模型处理消息

5

响应生成

生成回复,适配平台格式

6

消息发送

发送响应到对应平台

命令系统

支持在聊天中使用斜杠命令来快速执行操作。

/help显示帮助信息
/reset重置会话
/model切换模型
/agent切换 Agent
/status查看系统状态
/history查看历史记录

API 示例

获取频道列表GET
GET /api/channels/list

Response:
{
  "channels": [
    {
      "id": "channel-001",
      "platform": "discord",
      "name": "Dev Helper",
      "status": "online",
      "guild": "My Server",
      "agents": ["dev-assistant"],
      "messages_today": 234,
      "active_users": 12
    }
  ]
}

多租户支持

每个平台频道可以绑定不同的 Agent,实现场景化的智能服务。

开发频道

使用 dev-assistant,具备代码分析能力

客服频道

使用 support-agent,具备工单系统知识

社区频道

使用 community-bot,专注互动娱乐