First time here? Complete the Setup guide first to install GAIA and its dependencies.
Prefer a desktop app? See GAIA Chat Desktop for the privacy-first GUI with drag-and-drop document Q&A.
Looking for the API? See the Agent SDK Reference for classes, methods, and code examples.
Quick Start
1
Install dependencies
Activate your virtual environment and install GAIA with RAG support:
2
Create a simple chat
simple_chat.py
3
Use the full SDK
full_chat.py
CLI Usage
Interactive Mode
Start a conversational chat session:Session Commands
Session Commands
/resume [id]- Resume a previous conversation (or list sessions if no id)/save- Save current conversation/sessions- List all saved sessions/reset- Clear conversation and start fresh/helpor/?- Show help message/quit- Exit the chat session
/quit and /reset save the current session first. If saving fails, the
conversation stays open and unchanged so you can fix the storage problem and
retry /save, then /quit or /reset. To exit without saving, press Ctrl-C;
unsaved changes will be lost. Document indexing and queries also warn if a new
document attachment could not be saved to the session, even though the document
is available in the current conversation.
Single Query Mode
Document Q&A (RAG)
RAG (Retrieval-Augmented Generation) enables chatting with documents — including PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), EPUB e-books (.epub), and images (.png, .jpg, .webp, …) — using semantic search and context retrieval.
CLI with RAG
- Single Document
- Multiple Documents
- One-shot Query
- Watch Folder
- Voice Mode
Document Indexing Requirements: Text in images and scans is read by a Vision Language Model (VLM): a tested vision model that is already loaded, then your default chat model when it can read images, which Or download it in the Lemonade Model Manager (
Gemma-4-E4B-it-GGUF and Qwen3.6-35B-A3B-GGUF both can, and otherwise Gemma-4-E4B-it-GGUF. While chat runs on the NPU, images are not read at all: the NPU model doesn’t read them, and GAIA says so instead of loading a second model. gaia init already downloads these, unless you set a default_model that can’t read images: then gaia init skips Gemma, so download it yourself:http://localhost:13305).- Image files (
.png,.jpg,.jpeg,.webp,.bmp,.gif,.tif,.tiff) are indexed only through the VLM. Without it, indexing the image fails and says how to get the VLM. Index images one at a time: folder indexing skips them. - PDF and PPTX files still index without the VLM, but only their text layer. Text inside their images is not indexed.
- Images on PDF pages that already hold plenty of text are not read. Scans and pages short of text are, which is where nearly all the text in images was found. Set
use_vlm=Falseto skip images altogether.
Interactive RAG Commands
When usinggaia chat with documents (via --index flag or /index command), additional commands become available:
Session Management
Session Management
Sessions preserve both your conversation history and indexed documents:
/resume [id]- Resume session with conversation and documents restored/save- Save session including indexed documents/sessions- List all saved sessions/reset- Clear conversation and start a new session (indexed documents are preserved)
Document Management
Document Management
/index <path>- Index a document or directory (enables RAG if needed)/watch <dir>- Watch directory for changes and auto-index new files/list- List all currently indexed documents/status- Show RAG system status (indexed files, chunks, memory usage)
Debug & Observability
Debug & Observability
/chunks <file>- View indexed chunks for a specific file/chunk <id>- View specific chunk by ID/test <query>- Test query retrieval with relevance scores/dump <file|#>- Export document and chunks to markdown/clear-cache- Clear RAG cache and force re-indexing/search-debug- Enable detailed search debugging output
RAG Debug Mode
Enable debug mode to see detailed retrieval information:Debug Information Includes
Debug Information Includes
- Search keys generated by the LLM
- Chunks found for each search
- Relevance scores
- Deduplication statistics
- Score distributions
Chunking Strategies
Structural Chunking
Default - Fast processing
LLM-Based Semantic
More accurate context
Troubleshooting
Missing Dependencies
Missing Dependencies
PDF Issues
PDF Issues
- Ensure PDF has extractable text (not scanned images)
- Check the PDF does not need a password to open — remove it with
qpdf --decrypt --password=YOUR_PASSWORD in.pdf out.pdf(PDFs with only permission restrictions index fine) - Verify file is not corrupted
Performance Tuning
Performance Tuning
Dynamic Tool Loading
Off by default. This is the first stage of a phased rollout
(Dynamic Tool Loader plan); enable it explicitly to try it.
gaia agent and on a ChatAgent using the full
(default) or doc prompt profile; the chat and file profiles ignore it.
gaia eval agent scores the flagship, so an eval run measures the flagship’s
loader. The old --agent-type doc id now resolves to the flagship as well, so it
no longer selects the doc profile.
Turn it on with the config field, an environment variable, or the Agent UI
Settings → Dynamic Tools (Beta) toggle. The env var wins over both — when it
is set, the UI toggle reflects the effective value and disables itself — which is
handy for the eval harness:
gaia eval agent drives
the agent through the Agent UI backend, so for an eval run the override goes on
the backend, started first, not on the eval command. Setting it in front of
gaia eval agent changes nothing, and with no backend running the eval stops at
pre-flight with Agent UI not reachable at http://localhost:4200. See the eval
guide’s Prerequisites for the rest of the setup.
Next Steps
GAIA Chat Desktop
Privacy-first desktop app with drag-and-drop document Q&A
Agent SDK Reference
Classes, methods, and code examples
Voice Interaction
Add speech recognition and text-to-speech
CLI Reference
Explore all command-line options
Agent UI SDK Reference
Python backend API for the desktop chat application
API Server
Integrate via OpenAI-compatible API