RAG Module
The rag module indexes sources into knowledge bases and retrieves
for agents.
On the hosted platform, give an agent a knowledge base from the Knowledge
manager in Studio (upload files or add a website, attach it to the agent) — the
agent then searches it with the built-in knowledge.search tool, no YAML and no
vector store to run. This page is the self-hosted rag module, for when you
run your own daemon and vector backend.
Authoritative tool table: reference/modules/rag.
Agent tools (11)
create_knowledge_base, delete_knowledge_base,
list_knowledge_bases, knowledge_base_stats, index_stats,
ingest, ingest_file, ingest_directory, query, reindex,
migrate_embeddings.
Zero-config
tools:
modules:
rag: {}
Configuration (high level)
Config is bound from YAML under tools.modules.rag (and related
module config). Important groups from Config in Go:
| Area | Notes |
|---|---|
embedding_model | String shortcut or {id, dimensions, pooling} |
backend | Vector store settings (Qdrant / pgvector / Elasticsearch appear in code) |
pipeline / chunking / citations / cache / acl | Retrieval and safety knobs |
sources | File, DB, web, kafka-style source entries for the indexer |
auto_index | on_start, schedule (cron string for indexer triggers) |
default_knowledge_base | Default KB name |
max_knowledge_bases / max_documents | Caps |
Source entries can carry their own triggers (type, every,
cron).
Example
tools:
modules:
rag:
config:
embedding_model: minilm-l12
default_knowledge_base: docs
auto_index:
on_start: true
schedule: "" # optional cron for the indexer
sources:
- name: handbook
type: file
path: "{{workdir}}/docs"
extensions: [.md, .txt]
recursive: true
capabilities:
grant:
- module: rag
Related
- rag module reference
- Built-in tools
- scheduler for session wake-ups (unrelated to RAG auto_index)