mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-28 19:35:27 +08:00
docs: improve guide navigation and add AI-assisted setup prompt (#124)
* docs: route guide readers by human and AI agent needs * docs: preserve guide introduction and add copyable deployment prompt --------- Co-authored-by: dadachann <[email protected]>
This commit is contained in:
+27
-34
@@ -14,42 +14,35 @@ LangBot is an **open-source, production-grade**, LLM-native instant messaging bo
|
||||
- **Workflow integration**: plug your existing Dify / n8n / Coze workflows straight into chat platforms — no need to rewrite business logic.
|
||||
- **Multi-platform reach**: one bot covers every platform, managed centrally from a unified panel.
|
||||
|
||||
## Documentation Structure
|
||||
## Start Here
|
||||
|
||||
The documentation is divided into the following sections:
|
||||
Follow this path to get familiar with LangBot, then explore the guides relevant to your needs.
|
||||
|
||||
- Deployment and Usage (Must Read): Detailed steps for deploying and using LangBot
|
||||
- Plugins: Information related to plugin usage and development
|
||||
- Practice: Many excellent use cases for LangBot
|
||||
- Development: Information related to participating in LangBot development
|
||||
1. **Explore features and platforms**: read the [feature overview](/en/insight/features) and [platform support](/en/insight/platform-features) to see whether LangBot fits your use case.
|
||||
2. **Choose how to deploy**: use [LangBot Cloud](https://space.langbot.app/cloud) without managing your own server, or self-host with [Docker](/en/deploy/langbot/docker) or a [package manager](/en/deploy/langbot/package).
|
||||
3. **Connect bots and models**: see [bot configuration](/en/usage/platforms/readme), [model configuration](/en/usage/models/readme), and [pipelines](/en/usage/pipelines/readme) to learn how messaging platforms connect to AI capabilities.
|
||||
4. **Add more capabilities**: extend your bot with [knowledge bases](/en/usage/knowledge/readme), [plugins](/en/plugin/plugin-intro), [MCP](/en/usage/mcp/readme), and [Skills](/en/usage/skills/readme).
|
||||
5. **Explore examples or contribute**: find ideas in [practical articles](/en/articles/index), or read about [plugin development](/en/plugin/dev/tutor) and [core development setup](/en/develop/dev-config).
|
||||
|
||||
## Quick Start Guide
|
||||
If you run into problems, check [troubleshooting](/en/insight/troubleshooting) or ask the [community](/en/insight/community).
|
||||
|
||||
<Tip>
|
||||
**Don't want to self-host?** Try [LangBot Cloud](https://space.langbot.app/cloud) — get started instantly with zero infrastructure. Just sign up, pay, and go.
|
||||
<Tip title="Let an AI agent help you deploy and use LangBot">
|
||||
Copy the prompt below into your AI assistant. It starts with the official documentation and adapts its help to your environment and goals.
|
||||
|
||||
```text
|
||||
Help me deploy and use LangBot. Read the official documentation first, then propose an approach suited to my environment.
|
||||
|
||||
Start with the English documentation index at https://langbot.app/docs/en/llms.txt and read these key pages:
|
||||
- Features: https://langbot.app/docs/en/insight/features.md
|
||||
- Platform support: https://langbot.app/docs/en/insight/platform-features.md
|
||||
- Bot configuration: https://langbot.app/docs/en/usage/platforms/readme.md
|
||||
- Model configuration: https://langbot.app/docs/en/usage/models/readme.md
|
||||
- Pipelines: https://langbot.app/docs/en/usage/pipelines/readme.md
|
||||
|
||||
First, find out which messaging platform and model I want to use and whether I already have a LangBot instance. If deployment is needed, ask about my operating system, server or local environment, and preference for cloud or self-hosting. Then use the index to read the relevant deployment and platform connection guides. Do not guess commands or configuration fields.
|
||||
|
||||
Help me deploy LangBot and configure the bot connection, model, and pipeline based on the documentation. If you have execution tools, work within the environment I authorize and verify the results; otherwise, give me instructions suited to my setup. Prefer reusing an existing instance. Ask before overwriting configuration, deleting data, or taking paid actions, and do not ask me to paste secrets into chat.
|
||||
|
||||
Finally, help me send a real test message and confirm that the bot replies. Once the basics work, guide me to knowledge bases, plugins, MCP, or Skills as needed. If you cannot read the docs or an operation fails, say so clearly. Do not report unverified steps as completed.
|
||||
```
|
||||
</Tip>
|
||||
|
||||
> Two ways to get started quickly:
|
||||
>
|
||||
> - Use the simplified tutorial from community resources (see left sidebar)
|
||||
> - Read the documentation to deploy it yourself (method described below)
|
||||
|
||||
### 1. Deploy LangBot
|
||||
|
||||
Read the **Deploy LangBot** section on the left and choose a method to deploy LangBot
|
||||
|
||||
After deployment, open `http://127.0.0.1:5300` or `http://your-server-public-ip:5300`
|
||||
|
||||
Complete the initialization by entering an email and password, and make sure to save them
|
||||
|
||||
### 2. Configure Bots
|
||||
|
||||
Check [Configure Bots](/en/usage/platforms/readme) in the left sidebar
|
||||
|
||||
### 3. Configure Models
|
||||
|
||||
Check [Configure Dialogue Models](/en/usage/models/readme) in the left sidebar
|
||||
|
||||
<br />
|
||||
|
||||
After completing the above two steps, you can start using LangBot. If you need to configure more features, you can set them in the [Pipeline](/en/usage/pipelines/readme) section
|
||||
|
||||
+27
-34
@@ -14,42 +14,35 @@ LangBotは、**オープンソースで本番運用に耐える**、LLM ネイ
|
||||
- **ワークフロー統合**:既存の Dify / n8n / Coze ワークフローをそのままチャットプラットフォームに接続。ビジネスロジックの書き直しは不要。
|
||||
- **マルチプラットフォーム到達**:1 つのボットですべてのプラットフォームをカバーし、統一パネルから集中管理。
|
||||
|
||||
## ドキュメント構成
|
||||
## はじめに
|
||||
|
||||
ドキュメントは以下のセクションに分かれています:
|
||||
次の順序で LangBot の全体像をつかみ、必要なガイドへ進んでください。
|
||||
|
||||
- デプロイと使用(必読): LangBotのデプロイと使用に関する詳細な手順
|
||||
- プラグイン: プラグインの使用と開発に関する情報
|
||||
- 実践: LangBotの多くの優れたユースケース
|
||||
- 開発: LangBot開発への参加に関する情報
|
||||
1. **機能と対応プラットフォームを知る**:[機能概要](/ja/insight/features)と[プラットフォーム対応状況](/ja/insight/platform-features)で、用途に合うか確認できます。
|
||||
2. **導入方法を選ぶ**:サーバーを自分で管理しないなら [LangBot Cloud](https://space.langbot.app/cloud)、セルフホストするなら [Docker](/ja/deploy/langbot/docker) または[パッケージマネージャー](/ja/deploy/langbot/package)のガイドへ。
|
||||
3. **ボットとモデルを接続する**:[ボット設定](/ja/usage/platforms/readme)、[モデル設定](/ja/usage/models/readme)、[パイプライン](/ja/usage/pipelines/readme)で、チャットプラットフォームと AI 機能のつなぎ方を確認できます。
|
||||
4. **ボットの機能を拡張する**:[ナレッジベース](/ja/usage/knowledge/readme)、[プラグイン](/ja/plugin/plugin-intro)、[MCP](/ja/usage/mcp/readme)、[スキル](/ja/usage/skills/readme)を活用できます。
|
||||
5. **活用例を探す・開発に参加する**:[活用記事](/ja/articles/index)でアイデアを探すか、[プラグイン開発](/ja/plugin/dev/tutor)と[コア開発環境](/ja/develop/dev-config)をご覧ください。
|
||||
|
||||
## クイックスタートガイド
|
||||
困ったときは[トラブルシューティング](/ja/insight/troubleshooting)を確認するか、[コミュニティ](/ja/insight/community)で相談してください。
|
||||
|
||||
<Tip>
|
||||
**自分でデプロイしたくないですか?** [LangBot Cloud](https://space.langbot.app/cloud) をお試しください — サーバー不要、登録して支払うだけですぐに使えます。
|
||||
<Tip title="AI エージェントに導入・利用を手伝ってもらう">
|
||||
以下のプロンプトを AI アシスタントにコピーしてください。公式ドキュメントを読み、環境と目的に合った方法でサポートします。
|
||||
|
||||
```text
|
||||
LangBot の導入と利用を手伝ってください。まず公式ドキュメントを読み、私の環境に合った方法を提案してください。
|
||||
|
||||
日本語ドキュメント索引 https://langbot.app/docs/ja/llms.txt と、次の主要ページを読んでください。
|
||||
- 機能概要:https://langbot.app/docs/ja/insight/features.md
|
||||
- 対応プラットフォーム:https://langbot.app/docs/ja/insight/platform-features.md
|
||||
- ボット設定:https://langbot.app/docs/ja/usage/platforms/readme.md
|
||||
- モデル設定:https://langbot.app/docs/ja/usage/models/readme.md
|
||||
- パイプライン:https://langbot.app/docs/ja/usage/pipelines/readme.md
|
||||
|
||||
最初に、使いたいチャットプラットフォームとモデル、既存の LangBot 環境の有無を確認してください。導入が必要なら、OS、サーバーまたはローカル環境、クラウドかセルフホストかの希望を確認し、索引から該当する導入・接続ガイドを読んでください。コマンドや設定項目は推測しないでください。
|
||||
|
||||
ドキュメントに基づいて、導入、ボット接続、モデル、パイプラインの設定を支援してください。実行ツールがあれば、私が許可した環境内で実行して結果を検証し、なければ環境に合った操作手順を案内してください。既存の環境があれば優先して利用してください。設定の上書き、データ削除、課金を伴う操作は事前に確認し、チャットにシークレットを貼り付けるよう求めないでください。
|
||||
|
||||
最後に実際のテストメッセージを送り、ボットが返信することを確認するまで手伝ってください。基本機能が動いてから、必要に応じてナレッジベース、プラグイン、MCP、スキルを案内してください。文書を読めない場合や操作が失敗した場合は明示し、未検証の作業を完了したと報告しないでください。
|
||||
```
|
||||
</Tip>
|
||||
|
||||
> すぐに始める2つの方法:
|
||||
>
|
||||
> - コミュニティリソースの簡易チュートリアルを使用する(左サイドバーを参照)
|
||||
> - ドキュメントを読んで自分でデプロイする(以下の方法を参照)
|
||||
|
||||
### 1. LangBotをデプロイする
|
||||
|
||||
左側の**LangBotのデプロイ**セクションを読み、LangBotをデプロイする方法を選択してください
|
||||
|
||||
デプロイ後、`http://127.0.0.1:5300`または`http://your-server-public-ip:5300`を開きます
|
||||
|
||||
メールアドレスとパスワードを入力して初期化を完了し、必ず保存してください
|
||||
|
||||
### 2. ボットを設定する
|
||||
|
||||
左サイドバーの[ボットの設定](/ja/usage/platforms/readme)を確認してください
|
||||
|
||||
### 3. モデルを設定する
|
||||
|
||||
左サイドバーの[対話モデルの設定](/ja/usage/models/readme)を確認してください
|
||||
|
||||
<br />
|
||||
|
||||
上記の2つのステップを完了すると、LangBotの使用を開始できます。さらに多くの機能を設定する必要がある場合は、[Pipeline](/ja/usage/pipelines/readme)セクションで設定できます
|
||||
|
||||
@@ -202,3 +202,35 @@ test("localized config examples use locale-appropriate YAML comments", async ()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
test("guide preserves the introduction and adds ordered navigation plus a copyable AI prompt", async () => {
|
||||
const sections = {
|
||||
zh: ["能用它做什么", "从这里开始", "让 AI Agent 帮你部署和使用"],
|
||||
en: ["What You Can Build", "Start Here", "Let an AI agent help you deploy and use LangBot"],
|
||||
ja: ["何ができるか", "はじめに", "AI エージェントに導入・利用を手伝ってもらう"],
|
||||
};
|
||||
for (const [locale, [useCases, start, title]] of Object.entries(sections)) {
|
||||
const guide = await readFile(new URL(`${locale}/insight/guide.mdx`, repoRoot), "utf8");
|
||||
const overview = guide.indexOf(`## ${useCases}`);
|
||||
const navigation = guide.indexOf(`## ${start}`);
|
||||
const assistant = guide.indexOf(`<Tip title="${title}">`);
|
||||
assert.ok(overview > 0 && navigation > overview && assistant > navigation);
|
||||
assert.ok(guide.includes("/images/zh/insight/dashboard-overview.png"));
|
||||
assert.match(guide.slice(navigation, assistant), /^1\. /m);
|
||||
assert.match(guide.slice(navigation, assistant), /^5\. /m);
|
||||
assert.doesNotMatch(guide, /^### \d+\.|127\.0\.0\.1:5300|<Steps>/m);
|
||||
const prompt = guide.slice(assistant).match(/```text\n([\s\S]*?)\n```/);
|
||||
assert.ok(prompt, `${locale}: missing copyable prompt`);
|
||||
assert.ok(prompt[1].includes(`https://langbot.app/docs/${locale}/llms.txt`));
|
||||
for (const page of ["insight/features", "insight/platform-features", "usage/platforms/readme", "usage/models/readme", "usage/pipelines/readme"]) {
|
||||
assert.ok(prompt[1].includes(`https://langbot.app/docs/${locale}/${page}.md`));
|
||||
await readFile(new URL(`${locale}/${page}.mdx`, repoRoot), "utf8");
|
||||
}
|
||||
for (const [, href] of guide.matchAll(/(?<!!)\]\((\/[^)]+)\)/g)) {
|
||||
if (href.startsWith("/images/")) continue;
|
||||
assert.ok(href.startsWith(`/${locale}/`), `cross-locale guide link: ${href}`);
|
||||
await readFile(new URL(`${href.slice(1)}.mdx`, repoRoot), "utf8");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+27
-34
@@ -14,46 +14,39 @@ LangBot 是一个**开源、生产级**的大语言模型(LLM)原生即时
|
||||
- **工作流接入**:把已有的 Dify / n8n / Coze 工作流直接接到聊天平台,无需重写业务逻辑。
|
||||
- **多平台触达**:一个机器人,覆盖所有平台,通过统一面板集中管理。
|
||||
|
||||
## 文档结构
|
||||
## 从这里开始
|
||||
|
||||
文档分为以下几个部分:
|
||||
按下面的顺序了解 LangBot,再根据需要深入对应文档。
|
||||
|
||||
- 部署和使用(必读):部署和使用 LangBot 的详细步骤
|
||||
- 插件:插件使用和开发相关信息
|
||||
- 实践:许多不错的 LangBot 使用案例
|
||||
- 开发:参与 LangBot 开发的相关信息
|
||||
1. **了解功能与平台**:阅读[功能概览](/zh/insight/features)与[平台支持](/zh/insight/platform-features),确认 LangBot 是否适合你的场景。
|
||||
2. **选择部署方式**:使用 [LangBot Cloud](https://space.langbot.app/cloud) 免去自建服务,或通过 [Docker](/zh/deploy/langbot/docker)、[包管理器](/zh/deploy/langbot/package)自行部署。
|
||||
3. **连接机器人与模型**:查看[配置机器人](/zh/usage/platforms/readme)、[配置对话模型](/zh/usage/models/readme)和[流水线](/zh/usage/pipelines/readme),了解如何把聊天平台与 AI 能力连接起来。
|
||||
4. **丰富机器人的能力**:通过[知识库](/zh/usage/knowledge/readme)、[插件](/zh/plugin/plugin-intro)、[MCP](/zh/usage/mcp/readme)与[技能](/zh/usage/skills/readme)扩展机器人。
|
||||
5. **参考实践或参与开发**:从[实践文章](/zh/articles/index)寻找思路,或阅读[插件开发](/zh/plugin/dev/tutor)与[核心开发环境](/zh/develop/dev-config)。
|
||||
|
||||
## 快速开始指南
|
||||
遇到问题时,可以查阅[故障排除](/zh/insight/troubleshooting),或到[社区](/zh/insight/community)交流。
|
||||
|
||||
<Tip>
|
||||
**不想自己部署?** 试试 [LangBot Cloud](https://space.langbot.app/cloud) — 无需服务器,注册付费即可立即开始使用。
|
||||
<Tip title="让 AI Agent 帮你部署和使用">
|
||||
将下面的提示词复制给你的 AI 助手。它会从官方文档开始,结合你的环境与目标协助操作。
|
||||
|
||||
```text
|
||||
请帮助我部署和使用 LangBot,先阅读官方文档,再根据我的环境制定方案。
|
||||
|
||||
先读取中文文档索引 https://langbot.app/docs/zh/llms.txt ,并阅读以下关键文档:
|
||||
- 功能概览:https://langbot.app/docs/zh/insight/features.md
|
||||
- 平台支持:https://langbot.app/docs/zh/insight/platform-features.md
|
||||
- 机器人配置:https://langbot.app/docs/zh/usage/platforms/readme.md
|
||||
- 模型配置:https://langbot.app/docs/zh/usage/models/readme.md
|
||||
- 流水线:https://langbot.app/docs/zh/usage/pipelines/readme.md
|
||||
|
||||
先了解我想接入的聊天平台、使用的模型,以及是否已有 LangBot 实例。若需要部署,确认我的系统、服务器或本机环境,以及偏好云服务还是自部署;再从索引中读取对应的部署文档和平台接入文档,不要猜测命令或配置项。
|
||||
|
||||
根据文档帮助我完成部署、机器人连接、模型与流水线配置。若你有执行工具,在我授权的环境内执行并验证;否则给我适合当前环境的操作指导。已有实例请优先复用,涉及覆盖配置、删除数据或付费操作时先征求确认,不要让我在聊天中粘贴密钥。
|
||||
|
||||
最后帮助我发送一条真实测试消息,确认机器人能够回复。基础功能跑通后,再按需要引导我使用知识库、插件、MCP 或技能。文档无法读取或操作失败时请明确说明,不要把未验证的步骤说成已经完成。
|
||||
```
|
||||
</Tip>
|
||||
|
||||
> 两种方式快速开始:
|
||||
>
|
||||
> - 使用社区资源的简化版教程(见左侧)
|
||||
> - 阅读文档自行部署(下述为快速开始的方法)
|
||||
|
||||
### 1. 部署 LangBot
|
||||
|
||||
阅读左侧 **部署 LangBot** 部分,选择部署 LangBot 的方式
|
||||
|
||||
部署完成后,打开`http://127.0.0.1:5300`或者`http://服务器公网IP:5300`
|
||||
|
||||
进行初始化,填入邮箱和密码并记录保存下来
|
||||
|
||||
### 2. 配置机器人
|
||||
|
||||
查看左侧的[配置机器人](/zh/usage/platforms/readme)
|
||||
|
||||
### 3. 配置模型
|
||||
|
||||
查看左侧[配置对话模型](/zh/usage/models/readme)
|
||||
|
||||
<br />
|
||||
|
||||
完成以上两步后即可使用,如果需要更多功能的配置,可在[流水线](/zh/usage/pipelines/readme)中设置
|
||||
|
||||
<Info>
|
||||
这是 LangBot 4.0 的文档,3.0 文档请[访问](https://v3.langbot.app/docs)。
|
||||
</Info>
|
||||
|
||||
Reference in New Issue
Block a user