この記事の日本語版はまだ公開されていないため、英語版を掲載しています。

The Problem with the Old Approach
Before v4.9.0, LangBot’s knowledge base was split into two separate systems:- Built-in Knowledge Base: Used Chroma as the vector database, with embedding models managed by LangBot directly. Document parsing, chunking, and indexing were all hardcoded.
- External Knowledge Base: Bridged services like Dify, RAGFlow, and FastGPT through the
KnowledgeRetrieverplugin component — retrieval only, no document ingestion.
- Poor extensibility: Want a different vector database? A custom chunking strategy? Sorry, that’s hardcoded.
- High maintenance cost: Every RAG improvement required changes to LangBot’s core code and a new release.
- Fragmented UX: Two completely different knowledge base management flows meant a steep learning curve.
What Changed
1. Unified Knowledge Base Model
Theinternal / external distinction is gone. All knowledge bases are managed through a single interface, differentiated only by their rag_engine_plugin_id. One list, one creation flow — just pick your engine.
2. KnowledgeEngine Component
This is the headline addition.KnowledgeEngine replaces the old KnowledgeRetriever and takes ownership of the full knowledge base lifecycle:
- Document Ingestion: The complete pipeline from file parsing to vector indexing
- Knowledge Retrieval: Returning relevant chunks at query time
- Document Deletion: Cleaning up documents and their associated vector data
- Lifecycle Hooks: Callbacks when knowledge bases are created or deleted

3. Parser Component
Document parsing has been extracted into its own plugin component type. A Parser converts binary files (PDF, Word, Markdown, etc.) into structured text, which is then handed to the RAG engine for chunking and indexing. The data flow:
DOC_PARSING capability, it can handle parsing internally and skip the external Parser.
4. Host RAG API
LangBot’s core no longer executes RAG operations directly, but it still provides essential infrastructure throughRAGRuntimeService, accessible to plugins via RPC:
- Embedding invocation:
invoke_embedding()— plugins don’t need to manage model connections - Vector database operations:
vector_upsert()/vector_search()/vector_delete() - File access:
get_knowledge_file_stream()— read raw files from storage
5. KnowledgeRetriever Deprecated
The oldKnowledgeRetriever component has been removed. If you had external knowledge base plugins, they’ll need to migrate to KnowledgeEngine. The good news: the new API is cleaner and migration is straightforward.
Building a RAG Engine Plugin
Scaffold the Component

Define Configuration Schemas
The YAML manifest defines two configuration schemas:creation_schema: Parameters filled when creating a knowledge base (e.g., chunk size, embedding model)retrieval_schema: Parameters adjustable at retrieval time (e.g., score threshold, top-K)
Declare Capabilities
Implement Core Methods
The three essential methods: Document Ingestion:Bridging External Services
If your goal is to bridge Dify, RAGFlow, FastGPT, or other external services rather than building a custom RAG pipeline, the implementation is even simpler — don’t declareDOC_INGESTION capability and only implement retrieve:
Building a Parser Plugin
Parser development is even more concise:parse method:
Upgrade Notes
- Knowledge bases created in previous versions are automatically migrated. After updating, visit the Knowledge Base page to verify.
- The
KnowledgeRetrievercomponent is deprecated. Existing plugins need to migrate toKnowledgeEngine. - Browse the Plugin Marketplace for available RAG engine plugins.
The Bigger Picture
v4.9.0’s knowledge base refactoring is the latest step in LangBot’s plugin-first evolution. From event handlers and tools in v4.0, to knowledge retrievers, to now full RAG engines and parsers — LangBot’s core capabilities are progressively moving from “built-in” to “pluggable.” The endgame: LangBot’s core provides pipeline orchestration and infrastructure; all business capabilities are plugin-driven. Custom chunking strategy? Write a KnowledgeEngine plugin. PDF parsing? Write a Parser plugin. Bridge your company’s internal knowledge service? Also a plugin. Knowledge, without borders.Links:
