Skip to main content
The knowledge command manages document knowledge bases with support for multiple vector stores, retrieval strategies, rerankers, and query modes.

Quick Start

List knowledge example

Commands

Add Documents

Expected Output:

Query Knowledge Base

Expected Output:

Search Knowledge Base

Unlike query, search returns raw ranked results with no LLM answer generation.
See Knowledge CLI for the full flag reference, and Search Results for the SearchResult shape returned when calling Knowledge.search() from Python.

List Documents

Expected Output:

Show Knowledge Base Info

Expected Output:

Clear Knowledge Base

Expected Output:

Show Statistics

Expected Output:

Export Knowledge Base

Expected Output:

Import Knowledge Base

Expected Output:

Help

Expected Output:

Advanced Options Reference

Vector Stores

Retrieval Strategies

Rerankers

Index Types

Query Modes

Supported File Types

Use Cases

Code Understanding

Research Assistant

Using Knowledge with Agents

Once documents are added, agents can automatically query the knowledge base:
Expected Output:

Best Practices

Organize documents by topic in separate directories for better search relevance.
Large documents are automatically chunked. Very large knowledge bases may increase response latency.

Document Quality

Use well-structured documents with clear headings

Regular Updates

Keep knowledge base updated with latest documentation

Specific Queries

Use specific search terms for better results

Organize by Topic

Group related documents together