name: knowledge-base

description: Save, index, and query URLs/documents with semantic search. Source-backed answers from your research library.


Knowledge Base

Build a searchable knowledge repository from URLs, documents, and notes.

When to Use ✅

When NOT to Use ❌

Architecture


URL/Document → Summarize → Chunk → Embed → Vector Store
                                              ↓
                              Query → Semantic Search → Source-backed Answer

Storage

Uses OpenClaw's built-in memory system:

Commands

Add to Knowledge Base


# Add a URL
./skills/knowledge-base/scripts/kb-add.sh "https://example.com/article"

# Add with tags
./skills/knowledge-base/scripts/kb-add.sh "https://example.com" --tags "ai,agents,research"

# Add a local file
./skills/knowledge-base/scripts/kb-add.sh "/path/to/document.pdf"

Search Knowledge Base


# Semantic search
./skills/knowledge-base/scripts/kb-search.sh "AI agent architectures"

# Search with tag filter
./skills/knowledge-base/scripts/kb-search.sh "agent patterns" --tag "ai"

# List recent additions
./skills/knowledge-base/scripts/kb-list.sh --recent 10

Using via OpenClaw Memory

The knowledge base integrates with OpenClaw's memory system:


# Search via openclaw
openclaw memory search "query here"

# Add to memory index
# Just save files to the workspace and they're auto-indexed

Integration

Auto-Save from Messages

When URLs are shared in Telegram/Discord with "save this" or "kb add":

1. Fetch and summarize the URL

2. Extract key metadata

3. Add to knowledge base with source attribution

Query with Sources

When asked about a topic:

1. Search knowledge base semantically

2. Return relevant chunks with source citations

3. Format: `[Source: URL, added DATE]`

File Structure


knowledge-base/
├── SKILL.md
├── scripts/
│   ├── kb-add.sh      # Add URL/file to KB
│   ├── kb-search.sh   # Semantic search
│   └── kb-list.sh     # List/browse entries
└── references/
    └── kb-config.json # Settings

Limitations