Skip to main content

Knowledge Base for OpenClaw

Configure the knowledge base plugin for OpenClaw Agents to enable RAG-based question answering.

Effect Comparison

The following example demonstrates the difference between the default Agent and the Agent with the knowledge base plugin enabled.

Default Agent (No Knowledge Base)

User: What is the Alibaba Cloud Bailian phone X1? Agent: I'm not aware of a specific "Alibaba Cloud Bailian phone X1". Please provide more details.

Agent with Knowledge Base Plugin

User: What is the Alibaba Cloud Bailian phone X1? Agent: Based on the retrieved knowledge base content, the Alibaba Cloud Bailian phone X1 is a flagship smartphone featuring...

Installation

Configure the knowledge base plugin in your OpenClaw Agent settings. The plugin uses the knowledge base retrieval API to search for relevant content and inject it into the Agent's context.

Configuration

ParameterTypeDefaultDescription
apiKey (required)string-Starts with sk-
workspaceIdstring-The business space ID
indexId (required)string-The knowledge base ID to search
topKnumber5The number of chunks returned per search
enableRewritebooleanfalseEnable query rewriting for better retrieval