How luizcurti/crewai-local-docs-rag works
Local Docs RAG answers questions about JavaScript, Node.js, and Python APIs from indexed official documentation. The principal workflow runs from a user question through the Streamlit UI and answer cache into a CrewAI flow: understand or translate the question, search function records and examples, assemble context, then write and display an answer. A separate ingestion workflow parses documentation into records and stores them in a local vector database. Some flow steps and ingestion behavior are documented in the README but their full implementations were not sampled.
Main entry points: flow.py Answer entry · store.py Vector store · ingest.py Ingestion coordinator · app.py Streamlit UI
Components 21
Question interface
- Streamlit UI
app.py
Answer workflow
- Answer entry
flow.py - Answer cache
answer_cache.py - Question translation
flow.py - Question analysis
query.py - Function and example search
flow.py - Context assembly
flow.py - Answer generation
flow.py - Language registry
languages.py
Documentation indexing
- Entry and example records
entries.py - Ingestion coordinator
ingest.py - MDN parser
sources/mdn.py - Node.js parser
sources/node.py - Python parser
sources/python.py
Local runtime
- Vector store
store.py - Local Ollama
- ChromaDB
- Shared settings
config.py - Service checks
preflight.py
Other components
- Questioner
- Official docs
Connections 32
- Questioner → Streamlit UI: asks
README.md - Streamlit UI → Answer entry: calls
app.py - Answer entry → Answer cache: checks and stores
flow.py - Answer entry → Question translation: translates if needed
README.md - Answer entry → Question analysis: analyzes question
README.md - Answer entry → Function and example search: searches records
README.md - Answer entry → Context assembly: assembles context
README.md - Answer entry → Answer generation: writes answer
README.md - Function and example search → Vector store: queries
flow.py - Function and example search → Local Ollama: embeds query
- Context assembly → Vector store: loads examples
store.py - Answer generation → Local Ollama: generates with
README.md - Streamlit UI → Service checks: checks readiness
app.py - Answer entry → Service checks: checks services
flow.py - Question analysis → Language registry: uses language definitions
query.py - Streamlit UI → Language registry: displays language labels
app.py - Ingestion coordinator → MDN parser: loads source
ingest.py - Ingestion coordinator → Node.js parser: loads source
ingest.py - Ingestion coordinator → Python parser: loads source
ingest.py - MDN parser → Official docs: parses documentation
sources/mdn.py - Node.js parser → Official docs: parses documentation
sources/node.py - Python parser → Official docs: parses documentation
sources/python.py - MDN parser → Entry and example records: produces entries
sources/mdn.py - Node.js parser → Entry and example records: produces entries
sources/node.py - Python parser → Entry and example records: produces entries
sources/python.py - Ingestion coordinator → Entry and example records: serializes records
ingest.py - Ingestion coordinator → Vector store: writes index
ingest.py - Vector store → ChromaDB: persists vectors
README.md - Service checks → Vector store: checks index
preflight.py - Vector store → Shared settings: reads configuration
store.py - Answer cache → Shared settings: reads configuration
answer_cache.py - Service checks → Shared settings: reads model settings
preflight.py