RAG Module
The rag module indexes sources into knowledge bases and retrieves
for agents. This page matches internal/modules/rag in the Go
daemon. Older docs that listed fourteen agent tools (including
multi_query, sql_query, ingest_database, clear_cache,
list_models) were wrong for this build.
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.
There is no separate vector tool module in digitornd.
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, not cron_native) |
default_knowledge_base | Default KB name |
max_knowledge_bases / max_documents | Caps |
Source entries can carry their own triggers (type, every,
cron). Exact field validation lives in the module and its tests;
do not invent agent tools for Text2SQL or multi-query if they are
not in the RegisterTool list above.
Example
tools:
modules:
rag:
config:
embedding_model: minilm-l12
default_knowledge_base: docs
auto_index:
on_start: true
schedule: "" # optional cron for indexer; not cron_native
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)