How manjot-hub/healthcare works
This is a local-first Practo clinic-support agent: users ask policy questions or provide an appointment ID and receive grounded policy answers or appointment status and escalation details. The request path applies a token budget and input guardrails, resolves session context, then caches a CrewAI draft and reviews it before returning a structured response. Policy retrieval, appointment lookup, generated appointment data, observability, and end-to-end evaluation are distinct product capabilities. Some API wiring and evaluation internals were not excerpted; those links rely on README documentation or are omitted where evidence is insufficient.
Main entry points: orchestrator.py Turn orchestrator · app.py FastAPI endpoints · crew.py Crew agents · tools.py Agent tools
Components 17
Request interface
- FastAPI endpoints
app.py
Answer runtime
- Turn orchestrator
orchestrator.py - Crew agents
crew.py - Offline LLM
mock_llm.py - Answer review
review.py - Response schemas
schemas.py
Knowledge and records
- Policy retrieval
rag_core.py - Clinic policy documents
kb - Agent tools
tools.py - Appointment dataset
dataset.py
Safety and governance
- Input and grounding checks
guardrails.py - Budget and response cache
governance.py - Session memory
memory.py - Runtime configuration
settings.py
Operations
- Request telemetry
obs.py - End-to-end evaluation
evaluate.py
Other components
- User
Connections 17
- User → FastAPI endpoints: submits request
README.md - FastAPI endpoints → Turn orchestrator: handles turns
README.md - FastAPI endpoints → Request telemetry: logs requests
README.md - Turn orchestrator → Budget and response cache: checks budget and cache
orchestrator.py - Turn orchestrator → Input and grounding checks: checks input
orchestrator.py - Turn orchestrator → Session memory: resolves and saves context
orchestrator.py - Turn orchestrator → Crew agents: requests draft
orchestrator.py - Turn orchestrator → Answer review: reviews draft
orchestrator.py - Turn orchestrator → Response schemas: returns structured response
orchestrator.py - Crew agents → Agent tools: builds agent tools
crew.py - Crew agents → Offline LLM: uses offline model
README.md - Agent tools → Policy retrieval: retrieves policy
tools.py - Agent tools → Appointment dataset: looks up appointments
tools.py - Policy retrieval → Clinic policy documents: loads policy documents
rag_core.py - End-to-end evaluation → Turn orchestrator: evaluates responses
README.md - Runtime configuration → Policy retrieval: configures retrieval
settings.py - Runtime configuration → Turn orchestrator: sets runtime limits
settings.py