openemr-agent
Healthcare AI agent sidecar for OpenEMR -- clinical decision support with drug interaction checking, patient data retrieval, and safety verification.
Features
- 8 clinical tools: patient lookup, medications, allergies, problems, vitals, appointments, drug interaction checking (NLM RxNorm), allergy-drug cross-check
- 3 verification checks: interaction severity flagging, allergy conflict detection, prescriptive language guard
- LangGraph state machine: 5-node agent with conditional tool routing
- Built-in observability: request/LLM/tool latency tracking, token usage, error categorization, eval regression detection
- FastAPI server:
/chat,/metrics,/health,/feedbackendpoints - OAuth2 integration: SMART on FHIR scopes for secure OpenEMR API access
Quick Start
pip install openemr-agent
Create a .env file:
XAI_API_KEY=your-xai-key
OPENEMR_BASE_URL=http://localhost:8300
OPENEMR_CLIENT_ID=your-oauth-client-id
OPENEMR_CLIENT_SECRET=your-oauth-client-secret
LANGCHAIN_API_KEY=your-langsmith-key # optional
Run the agent:
uvicorn app.main:app --host 0.0.0.0 --port 8080
Architecture
See docs/architecture.md for the full architecture document including the agent state machine, verification strategy, and observability setup.
Cost
See docs/cost-analysis.md for production cost projections. TL;DR: ~$0.002 per clinical query using Grok 3 Mini Fast.
License
GNU General Public License v3 -- same as OpenEMR.
Metadata
Release files for openemr-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openemr_agent-0.1.0.tar.gz | 7.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openemr_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 MB
Release files / openemr_agent-0.1.0.tar.gz
| Download URL | openemr_agent-0.1.0.tar.gz |
|---|---|
| Size | 7.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2109b60c38ecbfd6a0391e071cfca949d21244db7d1714d28f7c92c6db6d2f28
|
|
BLAKE2b-256 checksum How to use checksums |
ccbf10729b6810be0f135c2b9a9e5ea020d0ab296774200a61e66b905cb6b6ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / openemr_agent-0.1.0-py3-none-any.whl
| Download URL | openemr_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5956c84fec35cd42d199a39cc47a956c5a6af967d1d342a97a3b48f1da3b3ce4
|
|
BLAKE2b-256 checksum How to use checksums |
e4c59836c06426dbccd93fd23569a1833392ff8ead10e058e6b17901dceb4e0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|