// Knowledgebase

RAG over operator-curated documents.

The knowledgebase is a curated, local RAG corpus separate from session memory. Operators register documents with pasclaw kb add, and the agent gets two read-only tools — kb_search and kb_get — that auto-register once at least one source exists.

FTS5 BM25Hybrid + vectorIn-place indexingNative PDF ingest
01

Curated, not crawled

pasclaw kb add ~/docs/ registers documents in place into workspace/kb.db. They are never copied. The schema supports markdown, plain text, HTML, and common source-code formats.

02

Hybrid retrieval

FTS5 BM25 ranking is the default. When the local embedding runtime is provisioned with pasclaw memory provision (sqlite-vec + ONNX Runtime + MiniLM), kb_search auto-upgrades to hybrid keyword + vector with Reciprocal Rank Fusion.

03

Explicit refresh

Unlike memory_search, the KB does not re-index on every query. pasclaw kb sync is the explicit refresh, keeping kb_search fast on large corpora.

04

Native PDF text

Pure-Pascal PDF ingest parses text via FlateDecode + /ToUnicode lookup, so pasclaw kb add file.pdf works without Poppler or pdftotext. Scanned PDFs still need external OCR.

From the documentation

Technical details

Implementation notes drawn from the PasClaw repository documentation.

Two read-only tools

kb_search and kb_get auto-register once at least one source is added. Indexing happens in workspace/kb.db; documents stay in place.

  • FTS5 BM25 default, hybrid + vector once memory provision is run.
  • pasclaw kb sync is the explicit refresh — searches stay fast on large corpora.
  • Supports markdown, text, HTML, common source code, and native PDF text.

Common questions

Frequently asked questions

Keep exploring

See how the rest of PasClaw fits together.

Workspace.zip