How vikramthakare/agentic_ai works
This educational prototype streams simulated patient vitals through a dashboard and FastAPI into a per-patient LangGraph workflow. Persistent threshold breaches lead to category-filtered protocol retrieval, OpenRouter-generated recommendations, and a clinician pause; decisions resume the graph and write an audit entry. The README documents patient CRUD and review actions. Edges reflect the API and graph source excerpts, plus documented browser/API interactions; unsampled subsystems and undocumented data wiring are omitted.
Main entry points: workflow.py StateGraph routing · server.py REST API · indexer.py Protocol indexer · app.js Dashboard and charts
Components 19
Dashboard
- Dashboard and charts
frontend/app.js
API and monitoring
- REST API
api/server.py - Synthetic vitals stream
generate_synthetic_data.py - Patient records
patients.csv
Clinical workflow
- StateGraph routing
graph/workflow.py - Patient state schema
state/schema.py - Buffer readings
graph/nodes.py - Load patient context
graph/nodes.py - Detect persistent trends
graph/nodes.py - Retrieve alert evidence
graph/nodes.py - Generate recommendation
graph/nodes.py - Clinician review pause
graph/nodes.py - Audit log entry
graph/nodes.py
Protocol evidence
- Category-filtered search
rag/retriever.py - Chroma vector store
rag/vector_store.py - Clinical protocols
data/protocols - Protocol indexer
rag/indexer.py
Other components
- Clinician
- OpenRouter LLM
Connections 19
- Clinician → Dashboard and charts: reviews and decides
README.md - Dashboard and charts → REST API: requests and streams
frontend/app.js - REST API → Synthetic vitals stream: serves generated stream
- REST API → Patient records: reads and updates
api/server.py - REST API → StateGraph routing: invokes and resumes
api/server.py - StateGraph routing → Buffer readings: routes to
graph/workflow.py - StateGraph routing → Load patient context: routes to
graph/workflow.py - StateGraph routing → Detect persistent trends: routes to
graph/workflow.py - StateGraph routing → Retrieve alert evidence: routes on alert
graph/workflow.py - StateGraph routing → Generate recommendation: routes to
graph/workflow.py - StateGraph routing → Clinician review pause: routes to
graph/workflow.py - StateGraph routing → Audit log entry: routes to
graph/workflow.py - StateGraph routing → Patient state schema: uses state
graph/workflow.py - Load patient context → Patient records: reads context
graph/nodes.py - Retrieve alert evidence → Category-filtered search: requests protocol evidence
graph/nodes.py - Category-filtered search → Chroma vector store: searches category
rag/retriever.py - Protocol indexer → Clinical protocols: reads and chunks
rag/indexer.py - Protocol indexer → Chroma vector store: adds chunks
rag/indexer.py - Generate recommendation → OpenRouter LLM: requests reasoning
graph/nodes.py