Skip to main content
Control how agents retrieve and inject knowledge through the knowledge parameter — one surface for sources, chunking, reranking, and retrieval policy.
The user asks a question; the agent retrieves relevant chunks from configured knowledge sources before answering.

Quick Start

1

Simple Usage

2

With Configuration


How It Works

The user asks a question; the agent embeds the query, retrieves the top-k chunks, then generates an answer with citations.

Configuration Options


Agent Methods

agent.start() / agent.chat()

Conversation with automatic retrieval when auto_retrieve=True:

agent.query()

Structured answer with citations:

agent.retrieve()

Retrieval only — no LLM generation:

Multi-Agent Shared Knowledge


Best Practices

Use retrieval_threshold=0.3 or higher when low-scoring chunks pollute answers.
For large bases, set retrieval_k=20 with rerank=True — cast a wide net, then keep the best chunks.
Arithmetic, greetings, and meta questions do not need retrieval — pass skip_retrieval=True.
Create one Knowledge instance and pass it as sources to multiple agents to avoid re-indexing.

Retrieval Strategies

Auto-select strategy by corpus size

CLI Retrieval

Run retrieval from the command line