How aweys4/quivr works
Quivr Core is a Python library for building a file-backed generative-AI “second brain.” Its principal workflow is: a caller creates a Brain from files, the Brain stores and processes them into knowledge chunks, then accepts questions and returns RAG answers. The repository also supports configurable LLMs, alternate RAG workflows, custom parsers, tools, and Megaparse integration. The graph follows documented workflow and visible/source-index relationships; some implementation details are unsampled, so uncertain links are omitted.
Main entry points: brain.py Brain API · quivr_rag_langgraph.py Workflow RAG · quivr_rag.py RAG pipeline · llm_endpoint.py LLM endpoint
Components 25
Brain lifecycle
- Brain API
core/quivr_core/brain/brain.py - Brain defaults
core/quivr_core/brain/brain_defaults.py - Brain info
core/quivr_core/brain/info.py - Brain serialization
core/quivr_core/brain/serialization.py
Knowledge ingestion
- Storage interface
core/quivr_core/storage/storage_base.py - Local storage
core/quivr_core/storage/local_storage.py - File model
core/quivr_core/files/file.py - Parser registry
core/quivr_core/processor/registry.py - Processor base
core/quivr_core/processor/processor_base.py - File processors
core/quivr_core/processor/implementations - Chunking config
core/quivr_core/processor/splitter.py
RAG and chat
- RAG configuration
core/quivr_core/rag/entities/config.py - RAG pipeline
core/quivr_core/rag/quivr_rag.py - Workflow RAG
core/quivr_core/rag/quivr_rag_langgraph.py - Prompt templates
core/quivr_core/rag/prompts.py - Chat history
core/quivr_core/rag/entities/chat.py - RAG response models
core/quivr_core/rag/entities/models.py
Models and tools
- LLM endpoint
core/quivr_core/llm/llm_endpoint.py - Tool factory
core/quivr_core/llm_tools/llm_tools.py - Web search tools
core/quivr_core/llm_tools/web_search_tools.py - Other tools
core/quivr_core/llm_tools/other_tools.py
Other components
- Library caller
- LLM provider
- Megaparse
- Vector store
Connections 31
- Library caller → Brain API: creates Brain
README.md - Brain API → Local storage: uploads files
core/quivr_core/brain/brain.py - Brain API → File model: loads files
core/quivr_core/brain/brain.py - Brain API → Parser registry: selects parser
core/quivr_core/brain/brain.py - Parser registry → File processors: resolves parser
core/quivr_core/processor/registry.py - File processors → Processor base: implements
core/quivr_core/processor/implementations/default.py - Processor base → Chunking config: uses chunk config
core/quivr_core/processor/implementations/default.py - Brain API → RAG pipeline: asks questions
README.md - Brain API → Workflow RAG: supports workflow RAG
core/quivr_core/brain/brain.py - Brain API → Brain defaults: uses defaults
core/quivr_core/brain/brain.py - Brain API → Brain serialization: serializes brain
core/quivr_core/brain/brain.py - Brain API → Brain info: reports info
core/quivr_core/brain/brain.py - Local storage → Storage interface: implements
core/quivr_core/storage/local_storage.py - Local storage → File model: stores files
core/quivr_core/storage/local_storage.py - RAG pipeline → RAG configuration: uses configuration
core/quivr_core/rag/quivr_rag.py - Workflow RAG → RAG configuration: uses configuration
core/quivr_core/rag/quivr_rag_langgraph.py - RAG pipeline → Prompt templates: uses prompts
core/quivr_core/rag/quivr_rag.py - Workflow RAG → Prompt templates: uses prompts
core/quivr_core/rag/quivr_rag_langgraph.py - RAG pipeline → Chat history: uses chat history
core/quivr_core/rag/quivr_rag.py - Workflow RAG → Chat history: uses chat history
core/quivr_core/rag/quivr_rag_langgraph.py - RAG pipeline → RAG response models: returns response models
core/quivr_core/rag/quivr_rag.py - Workflow RAG → RAG response models: returns response models
core/quivr_core/rag/quivr_rag_langgraph.py - RAG configuration → Tool factory: configures tools
core/quivr_core/rag/entities/config.py - Tool factory → Web search tools: creates search tools
core/quivr_core/llm_tools/llm_tools.py - Tool factory → Other tools: creates tools
core/quivr_core/llm_tools/llm_tools.py - Brain API → LLM endpoint: configures LLM
core/quivr_core/brain/brain.py - RAG pipeline → LLM endpoint: uses LLM
core/quivr_core/rag/quivr_rag.py - Workflow RAG → LLM endpoint: uses LLM
core/quivr_core/rag/quivr_rag_langgraph.py - LLM endpoint → LLM provider: calls model provider
- Workflow RAG → Vector store: retrieves knowledge
- File processors → Megaparse: optional parsing
README.md