How onkar4160/multi-agent-doc-ppt-chatbot works
This is a multi-agent document and presentation chatbot. Users upload templates and knowledge files, request research or generation in chat, then download, edit, convert, compare, or revert versioned DOCX/PPTX artifacts with citations. The graph highlights that workflow and the key supporting stages: template profiling, web/RAG evidence, structured models, rendering, and persistence. Edges are limited to README statements and the sampled source/index references; some internal routing and storage details were not inspected.
Main entry points: graph.py Supervisor graph · routes_artifacts.py Artifact API · main.py FastAPI app · ingestion.py Knowledge ingestion
Components 30
API and UI
- Streamlit UI
ui/streamlit_app.py - FastAPI app
app/main.py - File and template API
app/api/files.py - Knowledge API
app/api/knowledge.py - Chat and run API
app/api/chat.py - Artifact API
app/api/routes_artifacts.py
Agent workflow
- Supervisor graph
app/agents/graph.py - DOCX analyzer
app/agents/doc_analyzer.py - PPTX analyzer
app/agents/ppt_analyzer.py - Web research
app/agents/web_research.py - Knowledge retrieval
app/agents/rag_agent.py - DOCX generator
app/agents/doc_generator.py - PPTX generator
app/agents/ppt_generator.py - Editor
app/agents/editor.py - Converter
app/agents/converter.py - Validator
app/agents/validator.py
Content services
- Template profile
app/models/template_profile.py - File parsing and OCR
app/services/parsers.py - Knowledge ingestion
app/services/ingestion.py - Embedding service
app/services/embeddings.py - Vector store
app/services/vector_store.py - DOCX renderer
app/services/docx_renderer.py - PPTX renderer
app/services/pptx_renderer.py - Gemini client
app/llm/client.py
Persistence and models
- Artifact versions
app/models/artifact.py - Agent traces
app/models/trace.py - SQL database
app/core/database.py
Other components
- User
- Web search provider
- Pinecone
Connections 41
- User → Streamlit UI: uses
- Streamlit UI → FastAPI app: calls HTTP
- FastAPI app → File and template API: registers routes
app/main.py - FastAPI app → Knowledge API: registers routes
app/main.py - FastAPI app → Chat and run API: registers routes
app/main.py - FastAPI app → Artifact API: registers routes
app/main.py - File and template API → DOCX analyzer: dispatches analysis
app/api/files.py - File and template API → PPTX analyzer: dispatches analysis
app/api/files.py - DOCX analyzer → Template profile: produces profile
- PPTX analyzer → Template profile: produces profile
- Chat and run API → Supervisor graph: starts run
app/api/chat.py - Supervisor graph → DOCX analyzer: routes requests
app/agents/graph.py - Supervisor graph → PPTX analyzer: routes requests
app/agents/graph.py - Supervisor graph → Web research: routes requests
app/agents/graph.py - Supervisor graph → Knowledge retrieval: routes requests
app/agents/graph.py - Supervisor graph → DOCX generator: routes requests
app/agents/graph.py - Supervisor graph → PPTX generator: routes requests
app/agents/graph.py - Supervisor graph → Editor: routes requests
app/agents/graph.py - Supervisor graph → Converter: routes requests
app/agents/graph.py - Supervisor graph → Validator: routes requests
app/agents/graph.py - Web research → Web search provider: searches web
- Knowledge retrieval → Embedding service: embeds query
app/agents/rag_agent.py - Knowledge retrieval → Vector store: queries vectors
app/agents/rag_agent.py - Vector store → Pinecone: uses backend
- Knowledge API → Knowledge ingestion: ingests files
- Knowledge ingestion → File parsing and OCR: parses files
app/services/ingestion.py - Knowledge ingestion → Embedding service: embeds chunks
app/services/ingestion.py - Knowledge ingestion → Vector store: upserts vectors
app/services/ingestion.py - DOCX generator → DOCX renderer: renders model
- PPTX generator → PPTX renderer: renders model
- Editor → DOCX renderer: rerenders edits
app/agents/editor.py - Supervisor graph → Gemini client: uses model client
app/agents/graph.py - Web research → Gemini client: uses model client
app/agents/web_research.py - Artifact API → Artifact versions: stores versions
- Artifact API → Converter: dispatches conversion
app/api/routes_artifacts.py - Artifact API → Editor: dispatches edits
app/api/routes_artifacts.py - Artifact API → DOCX renderer: renders artifacts
app/api/routes_artifacts.py - Artifact API → PPTX renderer: renders artifacts
app/api/routes_artifacts.py - Supervisor graph → Agent traces: records agent trace
app/agents/graph.py - FastAPI app → SQL database: initializes tables
app/main.py - Artifact API → SQL database: reads and writes
app/api/routes_artifacts.py