Skip to content

docs: add qq-ai-bot integration guide#20

Open
happysnaker wants to merge 3 commits into
LLOneBot:mainfrom
happysnaker:add-qq-ai-bot-guide
Open

docs: add qq-ai-bot integration guide#20
happysnaker wants to merge 3 commits into
LLOneBot:mainfrom
happysnaker:add-qq-ai-bot-guide

Conversation

@happysnaker

@happysnaker happysnaker commented Jul 2, 2026

Copy link
Copy Markdown

Summary

  • add a qq-ai-bot guide under the framework integration docs
  • add a card entry on the framework selection page
  • explain how to connect LLOneBot OneBot11 WS with the qq-ai-bot ACP-based scaffold

Why

qq-ai-bot is a relevant self-hosted QQ bot workflow for the LLOneBot ecosystem: it is not another low-level SDK, but a deployment-oriented TypeScript bot scaffold that separates transport, session orchestration, progress reporting, and ACP agent integration.

由 Sourcery 提供的摘要

将 qq-ai-bot 记录为新的框架集成选项,并指导用户通过 OneBot11 WebSocket 和基于 ACP 的 agents 将其连接到 LLOneBot。

文档:

  • 在框架选择页面中添加 qq-ai-bot,并提供一个带有说明性文字的卡片,链接到其安装/配置指南。
  • 引入新的 qq-ai-bot 集成指南,涵盖前置条件、qq-ai-bot 和 LLOneBot 的配置、agent 冒烟测试以及健康检查。
Original summary in English

Summary by Sourcery

Document qq-ai-bot as a new framework integration option and guide users through connecting it to LLOneBot via OneBot11 WebSocket and ACP-based agents.

Documentation:

  • Add qq-ai-bot to the framework selection page with a descriptive card linking to its setup guide.
  • Introduce a new qq-ai-bot integration guide covering prerequisites, configuration of qq-ai-bot and LLOneBot, agent smoke tests, and health checks.

@sourcery-ai

sourcery-ai Bot commented Jul 2, 2026

Copy link
Copy Markdown

审阅者指南

为将 qq-ai-bot 集成到 LLOneBot 添加了文档,包括新的框架卡片,以及配置 OneBot11 WS 和 ACP agent 集成的分步指南。

文件级更改

Change Details Files
在安装/框架选择页面中将 qq-ai-bot 添加为可选择的框架。
  • 在框架选择文档页面中,在现有框架选项旁新增一个 qq-ai-bot 卡片条目,并链接到新的指南。
content/docs/install_framework.mdx
引入新的 qq-ai-bot 集成指南,详细说明如何将 LLOneBot(OneBot11 WS)与 qq-ai-bot 和基于 ACP 的 agent 脚手架连接起来。
  • 创建新的 install_qq_ai_bot.mdx 页面,包含 frontmatter、import,以及对 qq-ai-bot 及其架构重点的简介。
  • 记录先决条件,例如 Node.js、Git,以及启用 ACP 的本地 agent。
  • 提供克隆、安装和配置 qq-ai-bot 的分步说明,包括复制 env 和 config 模板。
  • 解释 qq-ai-bot 的环境变量配置,重点说明 OneBot11 的 forward WS 模式以及 ACP agent 命令设置,并包含关于连接方向的信息提示。
  • 记录在 LLOneBot 中所需的 OneBot11 forward WebSocket 配置,包括 JSON5 示例,以及如何通过 LLBot Desktop/WebUI 进行配置的说明。
  • 添加对 agent 和 qq-ai-bot 进行冒烟测试(smoke:agent、smoke:traecli、dev)的步骤,并验证基础 bot 交互、status/prompt/reset 命令以及进度消息。
  • 描述健康检查端点,并链接到 qq-ai-bot 仓库、项目页面和架构文档,同时提供将 qq-ai-bot 作为自托管 bot 基础设施使用的指导。
content/docs/install_qq_ai_bot.mdx

提示和命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 回复 Sourcery 的某条审阅评论,请求其从该评论创建 issue。你也可以直接回复该评论 @sourcery-ai issue 来从中创建一个 issue。
  • 生成 pull request 标题: 在 pull request 标题中的任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 以(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文中的任意位置写上 @sourcery-ai summary,即可在你想要的位置生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 以(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可随时(重新)生成审阅者指南。
  • 一次性解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可标记解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会很有用。
  • 清除所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss,即可清除所有现有的 Sourcery 审阅。特别适合在你想从头开始新的审阅时使用——别忘了再评论 @sourcery-ai review 以触发新的审阅!

自定义你的体验

访问你的 dashboard 来:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、移除或编辑自定义审阅指令。
  • 调整其他审阅设置。

获取帮助

Original review guide in English

Reviewer's Guide

Adds documentation for integrating qq-ai-bot with LLOneBot, including a new framework card and a step-by-step guide to configure OneBot11 WS and ACP agent integration.

File-Level Changes

Change Details Files
Add qq-ai-bot as a selectable framework in the installation/framework selection page.
  • Insert a new qq-ai-bot Card entry alongside existing framework options on the framework selection docs page, linking to the new guide.
content/docs/install_framework.mdx
Introduce a new qq-ai-bot integration guide detailing how to connect LLOneBot (OneBot11 WS) with qq-ai-bot and an ACP-based agent scaffold.
  • Create a new install_qq_ai_bot.mdx page with frontmatter, imports, and introductory description of qq-ai-bot and its architecture focus.
  • Document prerequisites such as Node.js, Git, and an ACP-enabled local agent.
  • Provide step-by-step instructions to clone, install, and configure qq-ai-bot, including copying env and config templates.
  • Explain environment variable configuration for qq-ai-bot, focusing on forward WS mode for OneBot11 and ACP agent command settings, with an informational callout about connection direction.
  • Document the required OneBot11 forward WebSocket configuration in LLOneBot, including JSON5 example and note on configuring via LLBot Desktop/WebUI.
  • Add steps to smoke-test the agent and qq-ai-bot (smoke:agent, smoke:traecli, dev) and to verify basic bot interactions, status/prompt/reset commands, and progress messages.
  • Describe health-check endpoints and link to qq-ai-bot repository, project page, and architecture documentation, with guidance on using qq-ai-bot as self-hosted bot infrastructure.
content/docs/install_qq_ai_bot.mdx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨,我发现了 1 个问题,并留下了一些整体反馈:

  • .env 片段中,建议明确说明 ONEBOT_ACCESS_TOKEN 必须与 LLOneBot 的 OneBot11 WS 配置里的 token 值保持一致,以避免常见的连接/认证错误。
  • 建议为 ACP_AGENT_COMMAND/ACP_AGENT_ARGS_JSON 添加一个简短的具体示例(例如一个典型的 traecli 或其他 agent 命令),这样用户在接自己的 agent 时会有一个更清晰的起点。
给 AI Agents 的提示词
Please address the comments from this code review:

## Overall Comments
- In the `.env` snippet, it might help to explicitly call out that `ONEBOT_ACCESS_TOKEN` must match the `token` value in the LLOneBot OneBot11 WS config to avoid common connection/auth errors.
- Consider adding a short concrete example for `ACP_AGENT_COMMAND`/`ACP_AGENT_ARGS_JSON` (e.g., a typical `traecli` or other agent command) so users have a clearer starting point for wiring their own agent.

## Individual Comments

### Comment 1
<location path="content/docs/install_qq_ai_bot.mdx" line_range="43-52" />
<code_context>
+
+ONEBOT_MODE=forward
+ONEBOT_FORWARD_WS_URL=ws://127.0.0.1:3001
+ONEBOT_ACCESS_TOKEN=change-me
+ONEBOT_ALLOW_GROUP=true
+ONEBOT_REQUIRE_MENTION_IN_GROUP=true
+ONEBOT_ALLOW_PRIVATE=true
+ONEBOT_GROUP_CONFIG_FILE=./examples/group-rules.local.json
+ONEBOT_PROGRESS_MODE=message
+
+ACP_AGENT_COMMAND=your-acp-agent-command
+ACP_AGENT_ARGS_JSON=[]
+ACP_AGENT_WORKDIR=/path/to/your/workdir
+ACP_REUSE_SESSION=true
+ACP_VERBOSE_MODE=verbose
+```
+
+<Callout type="info">
+这里使用 **正向 WS**,因为 LLOneBot 会作为 OneBot11 服务端,`qq-ai-bot` 作为客户端去连接它。
+</Callout>
+</Step>
+
+<Step>
+### 配置 LLOneBot
+
+在 LLOneBot 中启用 OneBot11,添加 **正向 WS** 配置:
+
+```json5
+{
+  "type": "ws",
+  "enable": true,
+  "host": "127.0.0.1",
+  "port": 3001,
+  "token": "change-me",
+  "messageFormat": "array",
+  "reportSelfMessage": false
</code_context>
<issue_to_address>
**suggestion (bug_risk):** 明确说明 OneBot 访问令牌必须在 qq-ai-bot 和 LLOneBot 之间保持一致

这里 `.env``ONEBOT_ACCESS_TOKEN` 和 LLOneBot 配置中的 `token` 都用了 `change-me` 作为占位符,建议在其中一处明确标注“需与 LLOneBot OneBot11 配置中的 token 完全一致”,避免用户以为只是示例字符串,实际使用时填成不一致导致连接失败。
</issue_to_address>

Sourcery 对开源项目是免费的——如果你觉得这些评审有帮助,欢迎分享 ✨
请帮我变得更有用!欢迎在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English

Hey - I've found 1 issue, and left some high level feedback:

  • In the .env snippet, it might help to explicitly call out that ONEBOT_ACCESS_TOKEN must match the token value in the LLOneBot OneBot11 WS config to avoid common connection/auth errors.
  • Consider adding a short concrete example for ACP_AGENT_COMMAND/ACP_AGENT_ARGS_JSON (e.g., a typical traecli or other agent command) so users have a clearer starting point for wiring their own agent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `.env` snippet, it might help to explicitly call out that `ONEBOT_ACCESS_TOKEN` must match the `token` value in the LLOneBot OneBot11 WS config to avoid common connection/auth errors.
- Consider adding a short concrete example for `ACP_AGENT_COMMAND`/`ACP_AGENT_ARGS_JSON` (e.g., a typical `traecli` or other agent command) so users have a clearer starting point for wiring their own agent.

## Individual Comments

### Comment 1
<location path="content/docs/install_qq_ai_bot.mdx" line_range="43-52" />
<code_context>
+
+ONEBOT_MODE=forward
+ONEBOT_FORWARD_WS_URL=ws://127.0.0.1:3001
+ONEBOT_ACCESS_TOKEN=change-me
+ONEBOT_ALLOW_GROUP=true
+ONEBOT_REQUIRE_MENTION_IN_GROUP=true
+ONEBOT_ALLOW_PRIVATE=true
+ONEBOT_GROUP_CONFIG_FILE=./examples/group-rules.local.json
+ONEBOT_PROGRESS_MODE=message
+
+ACP_AGENT_COMMAND=your-acp-agent-command
+ACP_AGENT_ARGS_JSON=[]
+ACP_AGENT_WORKDIR=/path/to/your/workdir
+ACP_REUSE_SESSION=true
+ACP_VERBOSE_MODE=verbose
+```
+
+<Callout type="info">
+这里使用 **正向 WS**,因为 LLOneBot 会作为 OneBot11 服务端,`qq-ai-bot` 作为客户端去连接它。
+</Callout>
+</Step>
+
+<Step>
+### 配置 LLOneBot
+
+在 LLOneBot 中启用 OneBot11,添加 **正向 WS** 配置:
+
+```json5
+{
+  "type": "ws",
+  "enable": true,
+  "host": "127.0.0.1",
+  "port": 3001,
+  "token": "change-me",
+  "messageFormat": "array",
+  "reportSelfMessage": false
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Explicitly call out that the OneBot access token must match between qq-ai-bot and LLOneBot

这里 `.env``ONEBOT_ACCESS_TOKEN` 和 LLOneBot 配置中的 `token` 都用了 `change-me` 作为占位符,建议在其中一处明确标注“需与 LLOneBot OneBot11 配置中的 token 完全一致”,避免用户以为只是示例字符串,实际使用时填成不一致导致连接失败。
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread content/docs/install_qq_ai_bot.mdx Outdated
@happysnaker

Copy link
Copy Markdown
Author

已按反馈补充:

  1. 明确说明 ONEBOT_ACCESS_TOKEN 必须与 LLOneBot OneBot11 配置里的 token 保持一致
  2. ACP_AGENT_COMMAND / ACP_AGENT_ARGS_JSON 换成了一个可直接参考的 traecli 示例,并补充说明自定义 ACP agent 只需替换为自己的启动命令

更新已推到当前分支。

@happysnaker

Copy link
Copy Markdown
Author

补了一个更容易踩坑的说明:当前这条 LLOneBot → qq-ai-bot 的 forward WS 示例里,ONEBOT_FORWARD_WS_URL 用的是 ws://127.0.0.1:3001 根路径,而不是照抄 qq-ai-bot 默认示例中的 /onebot/v11/ws。这样能更明确地区分“通用默认示例”和“LLOneBot 这条具体接法”的差异,减少用户直接复制后卡在 URL/path 上。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant