Skip to main content

Overview

This page provides practical examples for common KnowledgeBase patterns. For a step-by-step first setup, see the Getting Started guide.

Multiple Documents

Process multiple documents and query across all of them:

Directory Processing

Process all supported files in a directory:

Custom Loaders and Splitters

Use specific loaders and splitters for precise control over document processing:

Indexed Processing (Per-Source Loaders)

Use different loaders and splitters for different sources by matching them by index:
When using multiple loaders/splitters, the count must match the number of file sources. String content sources don’t need loaders.

Multiple Knowledge Bases

Query multiple knowledge bases in a single task using name and description so the agent can distinguish them:

Async Usage

Use async/await for better performance in async applications:

Streaming Response

Stream the agent’s response for real-time output:

Async Streaming

SuperMemory (Zero-Config RAG)

SuperMemory handles embeddings internally — no embedding provider needed: