Skip to main content

RAG Quickstart

Get up and running with RAG in just a few steps.

Installation

For full RAG support with vector stores:
The simplest way to use RAG is through the Agent’s knowledge parameter:

Method 2: Explicit RAG Pipeline

For more control, use the RAG class directly:

Method 3: CLI

Index and query from the command line:
Check the exit code — rag index now exits 1 if any source stored zero chunks, so a broken embedding backend or an empty glob no longer looks like a successful import. See Knowledge Indexing Errors for the SDK-side failure modes.

Streaming Responses

For real-time output:

Configuration Options

Multi-Agent Shared Knowledge

Multiple agents can share the same knowledge base:

Next Steps