How pokurilahari/multi-agent-ai-document-system works
This repository combines a Streamlit document-query application with a FastAPI foundation. The principal workflow is document extraction and chunking, vector indexing, query-time retrieval, intent routing, and an agent-produced response. The README also describes planned ingestion formats and RAG capabilities; these are distinguished from the currently implemented backend foundation. Relationships are based on sampled code, SOURCE INDEX references, or README statements; unsampled implementation details are not inferred.
Main entry points: orchestrator.py Intent orchestrator · __init__.py LLM agent base · app.py Query dashboard · main.py FastAPI endpoints
Components 20
User experience
- Query dashboard
app.py - Backend dashboard
frontend/app.py
Document retrieval
- Document chunking
pipeline/chunker.py - Vector store
pipeline/embedder.py
Agent reasoning
- Intent orchestrator
agents/orchestrator.py - Document reader
agents/reader.py - Summariser
agents/summariser.py - Analyser
agents/analyser.py - Question answering
agents/qa_agent.py - Document writer
agents/writer.py - Crew execution
agents/crew_builder.py - LLM agent base
agents/__init__.py
API services
- FastAPI endpoints
backend/app/main.py - API settings
backend/app/config.py
State and observability
- SQLite metadata
backend/app/database.py - Timing and logs
backend/app/utils/logger.py - Session memory
memory/store.py
Other components
- User
- Ollama model service
- SQLite
Connections 25
- User → Query dashboard: submits query
README.md - Query dashboard → Document chunking: chunks documents
app.py - Document chunking → Vector store: provides chunks
- Query dashboard → Vector store: indexes and searches
app.py - Query dashboard → Intent orchestrator: routes query
app.py - Intent orchestrator → Vector store: searches chunks
agents/orchestrator.py - Intent orchestrator → Document reader: routes READ
agents/orchestrator.py - Intent orchestrator → Summariser: routes summary
agents/orchestrator.py - Intent orchestrator → Analyser: routes analysis
agents/orchestrator.py - Intent orchestrator → Question answering: routes questions
agents/orchestrator.py - Intent orchestrator → Document writer: routes writing
agents/orchestrator.py - Intent orchestrator → Crew execution: builds crew
agents/orchestrator.py - Document reader → LLM agent base: inherits from
agents/reader.py - Summariser → LLM agent base: inherits from
agents/summariser.py - Analyser → LLM agent base: inherits from
agents/analyser.py - Question answering → LLM agent base: inherits from
agents/qa_agent.py - Document writer → LLM agent base: inherits from
agents/writer.py - LLM agent base → Ollama model service: invokes model
agents/__init__.py - Intent orchestrator → Ollama model service: classifies intent
agents/orchestrator.py - User → Backend dashboard: uses dashboard
README.md - Backend dashboard → FastAPI endpoints: calls API
README.md - FastAPI endpoints → API settings: loads settings
backend/app/main.py - FastAPI endpoints → SQLite metadata: initializes tables
backend/app/main.py - FastAPI endpoints → Timing and logs: records metrics
backend/app/main.py - SQLite metadata → SQLite: persists records
backend/app/database.py