Skip to main content
Complete, runnable examples for building RAG systems with Agentium. Covers knowledge bases, vector stores, embeddings, hybrid search, and full agent-powered retrieval pipelines.

1. Basic KnowledgeBase

Create a knowledge base, add documents, and query by semantic similarity.

2. Knowledge as Tool

Turn a KnowledgeBase into a tool the agent calls automatically during runs.

Custom result formatting


3. OpenAI Embeddings

Use OpenAI’s embedding models to convert text into vectors.

Higher accuracy model


4. Google Embeddings

Use Google’s embedding models as an alternative to OpenAI.

Using Google embeddings with a knowledge base


5. In-Memory Vector Store

Quickstart with in-memory vectors. No external dependencies — data is lost on restart.

6. PgVector Store

PostgreSQL-backed vector store using the pgvector extension. Persists across restarts.

7. MongoDB Vector Store

MongoDB Atlas-backed vector store. Requires an Atlas Search index for production.

8. Qdrant Vector Store

Qdrant cloud or self-hosted vector database. Ideal for dedicated vector search workloads.

Combine vector (semantic) and BM25 (keyword) search with Reciprocal Rank Fusion for the best retrieval accuracy.

Hybrid search with an agent

Tuning for technical docs


10. PageIndex Toolkit

Reasoning-based document retrieval without vectors. Best for complex, structured documents like financial reports and legal filings.

11. RAG Agent

A full agent with a knowledge base for answering questions grounded in your documents.

12. Multi-Source RAG

An agent with multiple knowledge bases, each specialized for different document types.

13. Document Ingestion Pipeline

A workflow to ingest documents from multiple sources, chunk them, and embed into a vector store.

Using the ingested KB with an agent