How vatshal-venkat/aether works
Aether is a clinical and billing data assistant: users ask questions in a web chat, receive streamed progress and an answer, and can inspect SQL, tables, and drug-label sources. The backend’s graph runner is the principal workflow entry point; its domain stages include routing, query planning and execution, retrieval, synthesis, and number verification. Supporting branches cover patient-scoped data access, saved queries, and operational endpoints. Several backend route and graph files were not sampled, so uncertain runtime links are left dashed rather than inferred.
Main entry points: deps.py Runtime dependencies · runner.py Question runner · main.py API application · client.py Model client
Components 25
Web application
- Chat interface
frontend/src/App.tsx - Chat state
frontend/src/hooks/useChat.ts - Backend client
frontend/src/api/client.ts - Answer display
frontend/src/components/answer/AnswerCard.tsx
API service
- API application
backend/app/main.py - Chat endpoints
backend/app/api/chat.py - Patient and schema API
backend/app/api/catalog_routes.py - Operations endpoints
backend/app/api/ops_routes.py
Question workflow
- Question runner
backend/app/graph/runner.py - Graph construction
backend/app/graph/build.py - Question stages
backend/app/graph/nodes - Runtime dependencies
backend/app/graph/deps.py - Model client
backend/app/llm/client.py
Data and retrieval
- Database connections
backend/app/db/engines.py - Schema catalog
backend/app/db/catalog.py - Patient access
backend/app/db/patients.py - Drug-label retrieval
backend/app/rag/store.py - Conversation memory
backend/app/memory/store.py - Saved SQL queries
backend/app/memory/saved_queries.py
Safety and operations
- Query and answer safeguards
backend/app/safety - Audit and service controls
backend/app/ops/__init__.py - Model usage ledger
backend/app/llm/usage.py
Other components
- Clinician or patient
- Clinical and billing databases
- LLM provider
Connections 27
- Clinician or patient → Chat interface: asks question
frontend/src/App.tsx - Chat interface → Chat state: uses chat state
frontend/src/App.tsx - Chat state → Backend client: streams request
frontend/src/hooks/useChat.ts - Backend client → Chat endpoints: posts chat
- Chat endpoints → Question runner: runs question
- Question runner → Graph construction: builds graph
backend/app/graph/runner.py - Question runner → Runtime dependencies: uses dependencies
backend/app/graph/runner.py - Graph construction → Question stages: dispatches stages
- Runtime dependencies → Database connections: provides engines
backend/app/graph/deps.py - Runtime dependencies → Schema catalog: provides catalog
backend/app/graph/deps.py - Runtime dependencies → Drug-label retrieval: provides retrieval
backend/app/graph/deps.py - Runtime dependencies → Conversation memory: provides memory
backend/app/graph/deps.py - Runtime dependencies → Saved SQL queries: provides query store
backend/app/graph/deps.py - Runtime dependencies → Model client: provides model
backend/app/graph/deps.py - Database connections → Clinical and billing databases: connects
backend/app/db/engines.py - Model client → LLM provider: invokes
- Patient and schema API → Patient access: lists patients
backend/app/api/catalog_routes.py - Patient and schema API → Schema catalog: reads schema
backend/app/api/catalog_routes.py - API application → Chat endpoints: registers routes
backend/app/main.py - API application → Patient and schema API: registers routes
backend/app/main.py - API application → Operations endpoints: registers routes
backend/app/main.py - Operations endpoints → Audit and service controls: serves operations
backend/app/api/ops_routes.py - Question runner → Saved SQL queries: saves query
backend/app/graph/runner.py - Question runner → Query and answer safeguards: applies safeguards
- Question runner → Answer display: returns answer data
backend/app/graph/runner.py - Answer display → Clinician or patient: shows answer
frontend/src/components/answer/AnswerCard.tsx - Model client → Model usage ledger: records usage
backend/app/llm/client.py