How tanish123-art/pharma-ai works
PharmaAI is a pharmaceutical research platform: users authenticate, submit research questions, and receive document-grounded answers or synthesized multi-agent findings and reports. Its documented RAG-first workflow searches uploaded material before broader research; the repository index also supports the backend orchestration and session-storage links shown here. Major advertised capabilities such as live progress and downloadable reports are included, but their precise runtime wiring is not established by the excerpts, so those links are documented at the product level. Several agent implementations were not excerpted; their orchestration links rely on the source index and README.
Main entry points: orchestrator.py Workflow Orchestrator · main.py FastAPI Entry · App.tsx App Shell · Dashboard.tsx Dashboard
Components 30
Research UI
- App Shell
Frontend/src/App.tsx - Dashboard
Frontend/src/components/Dashboard.tsx - Research Interface
Frontend/src/components/ResearchInterface.tsx - Agent Outputs
Frontend/src/components/AgentOutputs.tsx - Report UI
Frontend/src/components/ReportGenerator.tsx
Access & Sessions
- Auth Context
Frontend/src/contexts/AuthContext.tsx - Sign-in UI
Frontend/src/components/Auth.tsx - API Client
Frontend/src/lib/api.ts - Auth API
Backend/auth/router.py - User Service
Backend/auth/user_service.py - MongoDB
Backend/auth/database.py
Document Knowledge
- Document API
Backend/agents/documents_router.py - Embedding Handler
Backend/agents/local_embedding_handler.py - Pinecone
Research Orchestration
- FastAPI Entry
Backend/main.py - Research API
Backend/agents/router.py - Chat API
Backend/agents/chat_router.py - Workflow Orchestrator
Backend/agents/orchestrator.py - Master Agent
Backend/agents/master_agent.py - Clinical Agent
Backend/agents/clinical_agent.py - IQVIA Agent
Backend/agents/iqvia_agent.py - EXIM Agent
Backend/agents/exim_agent.py - Patent Agent
Backend/agents/patent_agent.py - Web Agent
Backend/agents/web_agent.py - LLM Handler
Backend/agents/local_llm_handler.py
Research Outputs
- Session Service
Backend/agents/research_service.py - Report Agent
Backend/agents/report_agent.py - Reports API
Backend/agents/reports_router.py - Research History
Frontend/src/components/ResearchHistory.tsx
Other components
- Researcher
Connections 35
- Researcher → App Shell: uses
- App Shell → Auth Context: provides auth
Frontend/src/App.tsx - App Shell → Dashboard: shows
Frontend/src/App.tsx - Dashboard → Research Interface: renders
Frontend/src/components/Dashboard.tsx - Research Interface → API Client: requests
Frontend/src/components/ResearchInterface.tsx - Research Interface → Agent Outputs: renders
Frontend/src/components/ResearchInterface.tsx - Researcher → Sign-in UI: signs in
- Sign-in UI → Auth Context: updates
Frontend/src/components/Auth.tsx - Auth Context → API Client: checks identity
Frontend/src/contexts/AuthContext.tsx - API Client → FastAPI Entry: calls REST
- FastAPI Entry → Auth API: registers
Backend/main.py - Auth API → User Service: authenticates
Backend/auth/router.py - User Service → MongoDB: reads/writes users
Backend/auth/user_service.py - FastAPI Entry → Research API: registers
Backend/main.py - FastAPI Entry → Chat API: registers
Backend/main.py - Chat API → Workflow Orchestrator: delegates research
Backend/agents/orchestrator.py - Research API → Workflow Orchestrator: starts workflow
Backend/agents/router.py - Workflow Orchestrator → Master Agent: coordinates
Backend/agents/orchestrator.py - Workflow Orchestrator → Clinical Agent: dispatches
Backend/agents/orchestrator.py - Workflow Orchestrator → IQVIA Agent: dispatches
Backend/agents/orchestrator.py - Workflow Orchestrator → EXIM Agent: dispatches
Backend/agents/orchestrator.py - Workflow Orchestrator → Patent Agent: dispatches
Backend/agents/orchestrator.py - Workflow Orchestrator → Web Agent: dispatches
Backend/agents/orchestrator.py - Workflow Orchestrator → Report Agent: requests report
Backend/agents/orchestrator.py - Researcher → Document API: uploads documents
- Document API → Embedding Handler: creates embeddings
Backend/agents/documents_router.py - Embedding Handler → Pinecone: indexes/searches
- Chat API → Embedding Handler: searches documents
Backend/agents/chat_router.py - Workflow Orchestrator → LLM Handler: uses language model
- Workflow Orchestrator → Session Service: updates sessions
Backend/agents/orchestrator.py - Session Service → MongoDB: stores sessions
Backend/agents/research_service.py - FastAPI Entry → Reports API: registers
Backend/main.py - Report Agent → Reports API: makes reports available
- Dashboard → Research History: shows history
- Report Agent → Report UI: provides reports