From e173af90946aaacf426520a3c2f76a213c8edba6 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Sun, 7 Jun 2026 09:02:14 -0400 Subject: [PATCH] docs(develop): list all six plugin component types (add KnowledgeEngine/Parser/Page) --- en/develop/agent-context.mdx | 5 ++++- ja/develop/agent-context.mdx | 5 ++++- zh/develop/agent-context.mdx | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/en/develop/agent-context.mdx b/en/develop/agent-context.mdx index afd908ab7..3798ae419 100644 --- a/en/develop/agent-context.mdx +++ b/en/develop/agent-context.mdx @@ -62,11 +62,14 @@ The core backend package `src/langbot/pkg/` is split into loosely-coupled submod | `skill` / `rag` / `vector` | Skill, retrieval-augmented generation, and vector-store capabilities. | | `persistence` | ORM entity definitions and Alembic migrations; a single set of scripts works on both SQLite and PostgreSQL. | -On the plugin side (defined in `langbot-plugin-sdk`), components are organized around a single `BasePlugin`: +On the plugin side (defined in `langbot-plugin-sdk`, generated by `lbp comp`), components are organized around a single `BasePlugin`. Six component types are currently supported: - **Command**: user-triggered actions (e.g. `!weather tokyo`). - **Tool**: functions the LLM calls during Agent execution (e.g. fetch weather, query a database). - **EventListener**: handlers for events in the message pipeline (e.g. auto-reply, content filtering). +- **KnowledgeEngine**: a custom knowledge-base retrieval/integration implementation used by RAG. +- **Parser**: custom parsing of messages/content. +- **Page**: a custom web page provided by the plugin, embeddable in the LangBot admin panel. Each plugin runs in its own process, with its lifecycle managed by the plugin runtime (discover → install deps → load → initialize → register components → ready → terminate). diff --git a/ja/develop/agent-context.mdx b/ja/develop/agent-context.mdx index 9ff3c911c..ccc780e53 100644 --- a/ja/develop/agent-context.mdx +++ b/ja/develop/agent-context.mdx @@ -62,11 +62,14 @@ LangBot/ | `skill` / `rag` / `vector` | スキル、検索拡張生成、ベクトルストアの機能。 | | `persistence` | ORM エンティティ定義と Alembic マイグレーション。単一のスクリプトセットで SQLite と PostgreSQL の両方に対応。 | -プラグイン側のコンポーネント(`langbot-plugin-sdk` で定義)は 1 つの `BasePlugin` を中心に構成されます: +プラグイン側のコンポーネント(`langbot-plugin-sdk` で定義、`lbp comp` で生成)は 1 つの `BasePlugin` を中心に構成されます。現在 6 種類のコンポーネントに対応しています: - **Command**:ユーザーが能動的に起動するコマンド(例:`!weather tokyo`)。 - **Tool**:LLM が Agent 実行中に呼び出す関数(例:天気取得、データベース照会)。 - **EventListener**:メッセージパイプライン中のイベントを監視するハンドラ(例:自動返信、コンテンツフィルタ)。 +- **KnowledgeEngine**:RAG が利用する、カスタムナレッジベースの検索/接続実装。 +- **Parser**:メッセージ/コンテンツのカスタム解析処理。 +- **Page**:プラグインが提供するカスタム Web ページ。LangBot 管理パネルに組み込めます。 各プラグインは独立したプロセスで実行され、プラグインランタイムがライフサイクルを統一管理します(発見 → 依存インストール → ロード → 初期化 → コンポーネント登録 → 準備完了 → 終了)。 diff --git a/zh/develop/agent-context.mdx b/zh/develop/agent-context.mdx index e8f5ba31f..51d7af422 100644 --- a/zh/develop/agent-context.mdx +++ b/zh/develop/agent-context.mdx @@ -62,11 +62,14 @@ LangBot 后端的核心包 `src/langbot/pkg/` 按职责拆分为若干子模块 | `skill` / `rag` / `vector` | 技能、检索增强生成与向量存储能力。 | | `persistence` | ORM 实体定义与 Alembic 数据库迁移,单套脚本同时兼容 SQLite 与 PostgreSQL。 | -插件侧的组件(在 `langbot-plugin-sdk` 中定义)则围绕一个 `BasePlugin` 组织: +插件侧的组件(在 `langbot-plugin-sdk` 中定义,由 `lbp comp` 生成)则围绕一个 `BasePlugin` 组织,目前支持六种组件类型: - **Command(命令)**:用户主动触发的指令(如 `!weather tokyo`)。 - **Tool(工具)**:供 LLM 在 Agent 执行过程中调用的函数(如查天气、查数据库)。 - **EventListener(事件监听器)**:监听消息流水线中的事件(如自动回复、内容过滤)。 +- **KnowledgeEngine(知识引擎)**:自定义知识库的检索/接入实现,供 RAG 使用。 +- **Parser(解析器)**:自定义消息/内容的解析处理。 +- **Page(页面)**:插件提供的自定义 Web 页面,可嵌入 LangBot 管理面板。 每个插件运行在独立进程中,由插件运行时统一管理生命周期(发现 → 安装依赖 → 加载 → 初始化 → 注册组件 → 就绪 → 终止)。