DHTI CLI
npm install dhti-cli







> đ Dhanvantari rose out of the water with his four hands, holding a pot full of elixirs.
Imagine you need to instantly determine whether a patient qualifies for a clinical trial. Your GenAI app pulls in the trialâs eligibility criteria, matches it against the patientâs EHR data, taps a vector store for RAG, relies on a selfâhosted LLM to keep everything private, and uses smart tools to fetch and analyze clinical details. The final output appears right inside the EHRâclean, clear, and clinicianâfriendly. đĽ And thatâs just one example of the countless realâworld workflows DHTI makes possible.
#### How? (Technical):
Generative AI features are built as LangServe Apps (elixirs). All backend data exchange is done through the FHIR API (a base class provides all these features) and displayed using CDS-Hooks. dhti-cli simplifies this process by providing a CLI that includes managing a Docker Compose with all additional components, such as Ollama for local LLM hosting. LLM and hyperparameters are injected at runtime and can be easily swapped. In essence, dhti decouples GenAI modules from the rest of the system.
đ You can test the elixir using a real EMR system, OpenMRS, that communicates with the elixir using CDS-Hooks or use any other CDS-Hooks compatible EMR system. You can also use the CDS-Hooks sandbox for testing without an EMR.
đ Checkout Vidhi Recipes for chatbot, RAG, imaging (DICOM) and MCPX for dockerized calculators
#### How (nonâtechnical / clinical)
DHTI includes readyâtoâuse skills that can prompt agentic platforms (e.g., AntiGravity, VSCode, or Claude) to generate the GenAI backends and UI components (elixirs and conches) you need. Test these components with synthetic data in OpenMRS or the CDSâHooks sandbox, then hand them off to production teams. Because DHTI follows open standards, that handoff (the âvalley of deathâ) becomes smoother and more predictable. Try the prompts in your preferred agentic platform after cloning this repo.
- Requirements: Node.js and Docker. Optionally install Python to develop or rapidly prototype elixirs.
- The sample elixir will use Google, OpenAI, or OpenRouter models if API keys are set in your environment; otherwise it falls back to a mock LLM. You can also use Ollama for local model hosting. See setup instructions.
Quick start (try the demo script):
``bash`
git clone https://github.com/dermatologist/dhti.git
cd dhti
./demo.sh # Linux / macOS (Windows: use WSL)
Basic demo workflow:
`bash`
npx dhti-cli help # list commands
npx dhti-cli compose add -m langserve # add LangServe to ~/dhti/docker-compose.yml
npx dhti-cli compose read # view generated compose
npx dhti-cli elixir install -g https://github.com/dermatologist/dhti-elixir.git -n dhti-elixir-schat -s packages/simple_chat
npx dhti-cli docker -n yourdockerhandle/genai-test:1.0 -t elixir
npx dhti-cli docker -u # start services from compose
Notes:
- Install from a local directory using -l.npx dhti-cli docker -d
- Stop and remove containers with .
âď¸ Decide where to test the new elixir: OpenMRS a full EHR system, or CDS-Hooks sandbox for a lightweight testing without an EHR.
đĽ Test elixir in a CDS-Hooks sandbox.
* npx dhti-cli elixir start -n dhti-elixir-schat and navigate to the Application URL displayed in the console (scroll up to see this). Not the base URL listed at the bottom.
* Uses hapi.fhir.org for data.
* In the Rx View tab, type in the contentString textbox and wait for the elixir to respond (Submits automatically in 5 seconds).

* We recommend using the order-select hook, utilizing the contentString from the FHIR CommunicationRequest within the cds-hook context for user inputs but you can use patient-view if no user input is needed.
đĽ Test elixir in OpenMRS.
* npx dhti-cli conch install -g dermatologist/openmrs-esm-dhti -s packages/esm-chatbot-agent -n esm-chatbot-agent to install a sample chatbot conch from github.-l
- (Optional) Alternatively, use to install from a local directory.
* npx dhti-cli conch start -n esm-chatbot-agent -s packages/esm-chatbot-agent to start the conch with OpenMRS.
* Go to http://localhost:8080/openmrs/spa/home
* Login with the following credentials:
- Username: admin
- Password: Admin123
You will see the new patient context aware chatbot in the patient summary page. This is just an example. You can build your own! Check the implementation in the elixir repo and conch repo.

* npx dhti-cli docker -d to stop and delete all the docker containers.
* npx dhti-cli docker bootstrap -f bootstrap.py will create and sync bootstrap.py where you can configure default model and hyperparameters for LangServe. Run this command after changing bootstrap.py to apply the changes.
| Why | How |
| --- | --- |
| I am a clinician! I have no idea how to build GenAI apps. | ⨠DHTI comes with batteries (skills) included! Use your preferred agentic platform (e.g., AntiGravity, VSCode with Copilot in agent mode, Claude, Cursor and many other) to generate elixirs and conches from problem-oriented prompts (most of these platforms have a free tier). Test them using synthetic data in OpenMRS or the CDS-Hooks sandbox, then hand them off to production teams. |
| I know LangChain, but I donât know how to build a chain/agent based on data in our EHR. | These sample elixirs adopt FHIR and cds-hooks as standards for data retrieval and display. The base class provides reusable artifacts |
| I need a simple platform for experimenting. | This repository provides everything to start experimenting fast. The command-line tools help to virtualize and orchestrate your experiments using Docker|
| I am a UI designer. I want to design helpful UI for real users. | See these sample conches. It shows how to build interface components (conches) for OpenMRS an open-source EMR used by many. Read more about OpenMRS UI |
| We use another EMR | Your EMR may support CDS-Hook for displaying components. In that case, you can use cds-hooks-sandbox for testing |
| We don't use an EMR. We use a web based health information system for ------ population with no FHIR support. | You can still use DHTI as a GenAI experimentation platform. ⨠We have a browser extension that can read any web page! |
| Our IT team is often unable to take my experiments to production. | Use DHTI, follow the recommended patterns, and you will make their lives easier.|
flag.
* Local directory installation: Install elixirs and conches from local directories using the -l flag.
* Monorepo support: Install elixirs and conches from subdirectories in GitHub repositories with the -s flag.
* Dependency Injection: Dependency injection for models and hyperparameters for configuring elixirs.
* Generate synthetic data: DHTI supports generating synthetic data for testing, using synthea.
* CQL support: CQL for clinical decision support.
* FHIR: Data exchange with FHIR schema.
* MCP: Built in MCP server for pluggable tools.
* EMR: Built in EMR, OpenMRS, for patient records.
* Vector store: Redis for vector store.
* Monitoring: LangFuse for monitoring.
* Graph utilities: Neo4j for graph utilities.
* LLM: Ollama for self-hosting LLM models.⨠Advanced Features
* start-dhti skill: New AI agent skill that orchestrates complete DHTI application development - from generating elixirs and conches to starting a fully functional DHTI server.
* MCPX integration: DHTI now includes an MCP integrator that allows other MCP servers to be "installed" and exposed seamlessly to DHTI through the MCPX gateway.
* DOCKTOR module: A new module, DOCKTOR, supports traditional machineâlearning models packaged as Docker containers. These can be used as MCP tools to deploy inference pipelines as agentâinvokable tools (in beta).
* MCP aware agent: dhti-elixir-template used in the examples now includes an MCP aware agent that can autodiscover and invoke tools from the MCPX gateway. Install it using npx dhti-cli elixir install -g https://github.com/dermatologist/dhti-elixir-template.git -n dhti-elixir-template -b feature/agent2.
* Medplum integration: Medplum is now supported as an alternative FHIR server. Read more here. This allows you to add FHIR subscriptions for real-time updates and much more.
* Synthea integration: You can now generate synthetic FHIR data using Synthea. Read more here.
* MIMIC support: You can now load MIMIC Demo data using DHTI in one command.
đ§ For Gen AI Developers
Developers can build elixirs and conches for DHTI. See CONTRIBUTING.md for details. User contributed elixir and conch repositories provide examples and templates for development.
đ§ For Gen AI Researchers
DHTI provides a platform to deploy AI models and Gen AI applications in the context of an electronic health record.
DHTI serves as a platform for testing models, prompts, chains, and agents in healthcare applications. Because the stack uses the :fire: FHIR data model, it is easy to load synthetic data. We encourage models built for this platform to be openâsourced on HuggingFace using the
dhti-` prefix.DHTI includes skills that generate GenAI components from problemâoriented prompts.
* Bell Eapen (UIS) | Contact | 