How abhishsing/practo-support-agent works
Practo is an offline clinic-support application for policy questions and appointment-status queries. Requests enter through HTTP or WebSocket endpoints, pass privacy, injection, budget, and caching controls, then use a sequential agent crew to retrieve policy evidence and/or look up appointment records; grounded drafts may receive a separate review before schema-validated responses are returned. The repository also supports policy-document ingestion and indexing. Relationships reflect the excerpts and README; unsampled implementation details are represented only where documented.
Main entry points: crew.py Sequential agent crew · main.py HTTP and chat API · index.py Policy indexer · logging_utils.py Masked event logging
Components 18
Request handling
- HTTP and chat API
api/main.py - Masked event logging
api/logging_utils.py
Support workflow
- Sequential agent crew
agents/crew.py - Offline language model
llm/mock_llm.py - Response schema
agents/schemas.py
Policy knowledge
- Policy lookup tool
agents/tools.py - Similarity retrieval
rag/retrieve.py - Clinic policy documents
kb - Chunk strategies
rag/chunking.py - Policy indexer
rag/index.py - Chroma collections
rag/index.py
Appointment data
- Appointment lookup
agents/tools.py - Appointment records
dataset.py
Governance and review
- Request guardrails
agents/guardrails.py - Query budget
governance/policy.py - Generation cache
governance/cache.py - Draft review
review/autogen_review.py
Other components
- Clinic user
Connections 21
- Clinic user → HTTP and chat API: submits query
README.md - HTTP and chat API → Sequential agent crew: runs query
api/main.py - HTTP and chat API → Masked event logging: logs request
api/main.py - HTTP and chat API → Query budget: maps budget errors
api/main.py - HTTP and chat API → Clinic policy documents: appends documents
api/main.py - HTTP and chat API → Policy indexer: indexes additions
api/main.py - Masked event logging → Request guardrails: masks phones
api/logging_utils.py - Sequential agent crew → Request guardrails: checks requests
agents/crew.py - Sequential agent crew → Query budget: checks budget
README.md - Sequential agent crew → Generation cache: caches generation
agents/crew.py - Sequential agent crew → Offline language model: uses model
agents/crew.py - Sequential agent crew → Policy lookup tool: dispatches lookup
README.md - Sequential agent crew → Appointment lookup: dispatches lookup
README.md - Sequential agent crew → Draft review: reviews grounded drafts
agents/crew.py - Sequential agent crew → Response schema: validates response
agents/crew.py - Policy lookup tool → Similarity retrieval: retrieves evidence
agents/tools.py - Similarity retrieval → Chroma collections: queries collection
rag/retrieve.py - Policy indexer → Clinic policy documents: loads documents
rag/index.py - Policy indexer → Chunk strategies: creates chunks
rag/index.py - Policy indexer → Chroma collections: upserts embeddings
rag/index.py - Appointment lookup → Appointment records: looks up records
agents/tools.py