DEV Community

Daniel Samer
Daniel Samer

Posted on • Originally published at clawhosters.com

OpenClaw RAG Knowledge Base: Turn Your AI Agent Into a Document Search Engine

Most AI agents are smart but uninformed. They know the internet. They don't know your company's return policy, your internal API docs, or what your team decided in last Tuesday's meeting.

OpenClaw ships with a built-in knowledge skill that fixes this. Feed it files, and it answers questions by pulling relevant chunks and citing where it found them.

How It Works

Drop documents into a knowledge/ folder in your workspace. Supported formats: .md, .txt, .pdf, .csv, .json. The agent indexes them locally. No external vector database. No embeddings API key to configure.

Then ask questions:

You: What's the SLA for critical bugs?
Agent: Per your support-tiers.md (lines 45-52), critical bugs have a 4-hour response SLA on the Enterprise plan and 24-hour resolution target.

The citeSources: true flag makes the agent reference exact file and location. For internal knowledge bases, citations are what make people trust the output.

What to Feed It

Good candidates: product docs, API references, FAQ lists, meeting notes with decisions, Obsidian/Notion exports, HR policies, pricing sheets.

Bad candidates: raw chat logs, uncleaned video transcripts, massive database dumps.

Practical tip: break large documents into topic-focused files. 40 Markdown files beat one 200-page PDF every time.

Config

{
  "skills": {
    "knowledge": {
      "enabled": true,
      "workspacePath": "./knowledge",
      "chunkSize": 512,
      "chunkOverlap": 64,
      "citeSources": true
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Full tutorial with examples

If you want this running in 2 minutes without managing infrastructure, ClawHosters handles the indexing, backups, and updates automatically.

Top comments (0)