How renuraman93/healthcare-agentic-ai works
This repository implements an educational healthcare chatbot with document-grounded answers, clinical extraction, summarization, and general health responses. Users interact through a Streamlit frontend and FastAPI API; document uploads are indexed, and chat requests are handled by a routed LangGraph workflow whose agents use LLM and retrieval capabilities. The graph preserves the documented workflow branches and ingestion stages. Some runtime wiring is dynamic or lies in unsampled excerpts, so those relationships are omitted or marked unverified rather than asserted.
Main entry points: workflow.py Healthcare workflow · main.py FastAPI application · document_service.py Document ingestion service · llm_factory.py LLM provider factory
Components 27
User interface
- Streamlit UI
frontend/streamlit_app.py - API client
frontend/api_client.py
API and orchestration
- FastAPI application
app/main.py - Chat API
app/api/chat.py - Document API
app/api/documents.py - Health API
app/api/health.py - Healthcare workflow
app/graph/workflow.py - Conversation memory
app/graph/memory.py - Workflow state and results
app/models/schemas.py
Healthcare agents
- Route supervisor
app/agents/supervisor_agent.py - Document search agent
app/agents/document_agent.py - Document reasoning agent
app/agents/reasoning_agent.py - Clinical extraction agent
app/agents/clinical_agent.py - Summarization agent
app/agents/summarization_agent.py - General answer agent
app/agents/general_agent.py - Response composer
app/agents/response_agent.py
Document retrieval
- Document ingestion service
app/services/document_service.py - Document loaders
app/rag/loaders.py - Text cleaning
app/rag/cleaning.py - Text chunking
app/rag/chunking.py - Semantic retriever
app/rag/retriever.py - Chroma vector store
app/rag/vector_store.py
Model providers
- Gemini embeddings
app/rag/embeddings.py - LLM provider factory
app/llm/llm_factory.py - Gemini language model
app/llm/gemini_llm.py
Other components
- Chat user
- Google Gemini API
Connections 33
- Chat user → Streamlit UI: asks questions
- Streamlit UI → API client: uses
frontend/streamlit_app.py - API client → FastAPI application: sends requests
- FastAPI application → Chat API: routes requests
app/main.py - FastAPI application → Document API: routes requests
app/main.py - FastAPI application → Health API: routes requests
app/main.py - FastAPI application → Healthcare workflow: initializes
app/main.py - FastAPI application → Document ingestion service: initializes
app/main.py - Chat API → Healthcare workflow: invokes
- Document API → Document ingestion service: delegates
app/api/documents.py - Healthcare workflow → Conversation memory: reads and updates
app/graph/workflow.py - Healthcare workflow → Route supervisor: routes through
app/graph/workflow.py - Healthcare workflow → Document search agent: searches with
app/graph/workflow.py - Healthcare workflow → Document reasoning agent: delegates reasoning
app/graph/workflow.py - Healthcare workflow → Clinical extraction agent: delegates extraction
app/graph/workflow.py - Healthcare workflow → Summarization agent: delegates summary
app/graph/workflow.py - Healthcare workflow → General answer agent: delegates answers
app/graph/workflow.py - Healthcare workflow → Response composer: composes result
app/graph/workflow.py - Document search agent → Semantic retriever: retrieves context
app/agents/document_agent.py - Document ingestion service → Document loaders: loads documents
app/services/document_service.py - Document ingestion service → Text cleaning: cleans text
app/services/document_service.py - Document ingestion service → Text chunking: chunks text
app/services/document_service.py - Document ingestion service → Chroma vector store: stores chunks
app/services/document_service.py - Semantic retriever → Gemini embeddings: embeds query
app/rag/retriever.py - Semantic retriever → Chroma vector store: queries
app/rag/retriever.py - Chroma vector store → Gemini embeddings: embeds chunks
app/rag/vector_store.py - Gemini embeddings → Google Gemini API: requests embeddings
app/rag/embeddings.py - Clinical extraction agent → LLM provider factory: gets provider
app/agents/clinical_agent.py - Document reasoning agent → LLM provider factory: gets provider
app/agents/reasoning_agent.py - General answer agent → LLM provider factory: gets provider
app/agents/general_agent.py - Summarization agent → LLM provider factory: gets provider
app/agents/summarization_agent.py - LLM provider factory → Gemini language model: creates provider
app/llm/llm_factory.py - Gemini language model → Google Gemini API: generates text