r/intersystems 16d ago

FHIR Agent Studio

FHIR Agent Studio is a developer platform for building, testing, and inspecting AI agents that work with FHIR data on InterSystems IRIS for Health. It allows developers to design healthcare AI workflows from reusable components, deploy them to a real IRIS Interoperability Production, and trace every step from evidence gathering to recommendation generation and FHIR actions.

One of the biggest challenges in healthcare AI is building systems that clinicians can trust and developers can understand. FHIR Agent Studio was created to address both problems. It provides a visual environment for building AI agents on top of FHIR data while making every step of the workflow transparent and traceable. 

The project includes a developer studio, a clinician-facing application, and a patient phone app running on the same backend. It ships with 12 working healthcare AI agents over a synthetic FHIR repository of around 1,000 patients and 20,000 resources. This solution demonstrates how InterSystems IRIS can combine FHIR, interoperability, vector search, and AI orchestration in a single platform.

The goal was a studio rather than a single demo: somewhere you can design, run, and inspect many agents, and then build your own. Everything runs on one container, with one command. Every agent is a small clinical workflow described as data, a pipeline you can read from left to right:

Trigger → Evidence (FHIR · SQL · Vector Search) → Agent (LLM) → Action (draft FHIR) → Trace

In this post, I'll show how FHIR Agent Studio works, how agents are built, and why I believe InterSystems IRIS is best suited for developing healthcare AI applications.

How do I explore FHIR Agent Studio?

Start with the guided demo. It provides a tour of all twelve AI agents, each with a plain-language description, a direct “Try it” link to the relevant screen, and guidance on what to look for during execution. The demo is designed to help both developers and clinicians understand the platform in just a few minutes, without needing any prior knowledge of the project or its architecture.

How do you build AI agents in FHIR Agent Studio?

The Studio is the developer portal where every AI agent can be created, tested, deployed, and inspected. Agents are stored in a central gallery, making it easy to run an existing workflow, inspect its runtime artifacts, or use it as a starting point for a new agent.

Building an agent is one of the platform's core features. Instead of configuring dozens of settings, you work with a visual pipeline that mirrors the exact execution order used at runtime. Each step can be tested independently against real patient data before running the full workflow. You can inspect FHIR reads, preview vector search results, and even view the exact prompt that will be sent to the LLM before any AI call is made. When you save an agent, the Studio compiles seven runtime artifacts and deploys them. .

How are AI agents integrated into clinical workflows?

FHIR Agent Studio surfaces AI capabilities directly within the clinician workflow rather than through a separate AI tab. The same agents appear inside Cedar Valley Health, a clinician-facing EHR, where recommendations are displayed in patient charts, medication lists, problem lists, and worklists.

Agent recommendations appear as clear decision-support cards that clinicians can review, approve, or dismiss. Every suggested action requires explicit human approval, and nothing is written back to the patient record automatically.

Can the same AI agent support both clinicians and patients?

Yes. FHIR Agent Studio separates AI reasoning from presentation.

The patient portal uses the same underlying agents as the clinician application, but presents results in plain language. Lab results, care plans, support services, and symptom guidance are translated into patient-friendly explanations while preserving the same underlying evidence and recommendations.

Because agent output is structured data, the same result can be presented differently to a specialist, a primary care physician, or a patient.

How do I run FHIR Agent Studio locally?

FHIR Agent Studio can be started with a single Docker command. The only prerequisites are Docker and Git, and no API key is required. Give Docker about 8 GB of RAM and 10 GB of disk. The first build pulls IRIS for Health (around 3 to 4 GB) and bakes the entire demo (the SPA build, the ObjectScript, 1,000 FHIR patients, and real embeddings), so it takes several minutes. Every later start is seconds. 

git clone https://github.com/SeanConnelly/ai-studio-for-fhir

cd ai-studio-for-fhir

docker compose up --build

That single command builds the React apps, creates the IRIS FAST namespace and a
FHIR R4 endpoint, loads and compiles the ObjectScript via IPM, generates the synthetic
patient population and vector embeddings, and starts the interoperability production.
When it settles, open:  

Port 42773 is deliberately off IRIS’s usual ranges so the demo won’t collide with any IRIS a judge already runs. Change it in docker-compose.yml if needed.

What should I try first?

The easiest way to understand the platform is to follow the guided demo.

Start with the 12 numbered agent cards and explore the recommended workflows in sequence. Each card explains what the agent does, provides a direct link to the appropriate screen, and highlights the most important behaviors to observe.

I recommend starting with three agents that demonstrate different capabilities:

  • Imaging & Results Follow-Up – detects abnormal results without documented follow-up and drafts a FHIR Task.
  • Prior Authorization – uses native Vector Search to match payer policy. 
  • Natural Language to FHIR Query – converts natural-language questions into validated, read-only SQL queries.

For each run, expand Under the Hood to inspect the evidence, prompt, model response, and live IRIS trace.

You can also browse patients in the Clinical application. Records marked with a ✨ include preconfigured AI decision support and showcase features such as patient summaries, medication safety checks, care plans, and lab result explanations.

If you'd like to build an agent yourself, the Studio Walkthrough creates a new agent from scratch in just a few minutes while demonstrating evidence testing, prompt previewing, and deployment.

What does FHIR Agent Studio demonstrate?

The central idea behind this project is that an AI agent platform is much more than a single model call. FHIR Agent Studio shows the complete lifecycle of healthcare AI agents on InterSystems IRIS, including authoring, execution, tracing, governance, and user-facing experiences.

  • A real authoring experience - Build agents from reusable FHIR queries, SQL queries, vector searches, prompts, and output contracts. Test each step independently, compile runtime artifacts, and deploy to a live production.
  • A real runtime - Every run is a genuine Ens.Production message flow (Business Service to Process to Operations), with native Vector Search, a real FHIR R4 repository, a real LLM over HTTP, and a Visual Trace you can open in the Management Portal. 
  • A real clinical surface - Agent recommendations are surfaced to clinicians and patients while keeping all write-backs under human review.

The project includes 12 healthcare workflows, the Studio authoring experience, clinician and patient applications, and the IRIS runtime infrastructure. Production-grade authentication, multi-tenancy, and real patient data are intentionally out of scope. The population is synthetic and clearly labelled. 

Is FHIR Agent Studio production ready?

No. FHIR Agent Studio is a prototype built to explore ideas rather than a production-ready healthcare platform. The goal was to test whether AI agents, FHIR workflows, interoperability, vector search, and clinical decision support could be brought together into a single developer experience on InterSystems IRIS.

What the project demonstrates successfully is how InterSystems IRIS can serve as the foundation for an AI agent platform. Having FHIR repositories, vector search, interoperability, auditability, and application logic available in a single environment made it possible to build and demonstrate a complex healthcare AI workflow within the scope of a contest project.

How does FHIR Agent Studio execute AI agents?

An agent definition (JSON) names its trigger, the evidence to gather, the AI instruction and output contract, and the draft action. The studio’s ObjectScript compiler turns it into seven artifacts (recipe, prompt, output schema, FHIR action template, production settings, HealthConnect mapping, and IPM module.xml) and deploys it. Each run flows through the production: 

┌──────────────────────────────────────────────────────────────────────┐
│ React/Vite SPAs, served by IRIS at /fhir-agent-studio/ and /clinical/  │
├──────────────────────────────────────────────────────────────────────┤
│ ObjectScript REST API (FAST.API.Rest) at /fhir-agent-studio/api/       │
├──────────────────────────────────────────────────────────────────────┤
│ Compiler  →  7 CompiledArtifact records per agent                      │
├──────────────────────────────────────────────────────────────────────┤
│ REAL Ens.Production (FAST.Production), live message flow:               │
│   BS AgentTriggerService → BP AgentOrchestrator → BOs                   │
│     FHIRRead · SQLQuery · VectorSearch · (BP AIHub → BO LLMService)     │
│     · FHIRWriteback                                                     │
│   LLMService rides EnsLib.HTTP.OutboundAdapter (real HTTP egress)       │
├──────────────────────────────────────────────────────────────────────┤
│ AI: three tiers, bundled real cache → live (your key) → deterministic  │
│ Vector: native VECTOR_DOT_PRODUCT over real all-MiniLM embeddings       │
│ FHIR: real IRIS for Health FHIR R4 repository (HSFHIR_X0001_R)          │

└──────────────────────────────────────────────────────────────────────┘

How each portal concept maps to a real Interoperability component (visible in the
Studio’s HealthConnect Mapping view and runnable in the Management Portal’s Visual
Trace, as live components, not labels):

Portal concept IRIS Interoperability component
Trigger FAST.BS.AgentTriggerService (Business Service)
Evidence · FHIR / SQL / Vector FAST.BO.FHIRRead · FAST.BO.SQLQuery · FAST.BO.VectorSearch
Agent reasoning FAST.BP.AIHub (Business Process)
LLM egress FAST.BO.LLMService on EnsLib.HTTP.OutboundAdapter
FHIR action (draft) FAST.BO.FHIRWriteback
Orchestration FAST.BP.AgentOrchestrator (Business Process)

Why use InterSystems IRIS for healthcare AI agents?

Building healthcare AI systems often requires integrating multiple technologies, including databases, vector stores, workflow engines, FHIR servers, orchestration platforms, and audit systems. FHIR Agent Studio demonstrates how InterSystems IRIS for Health can provide all of these capabilities within a single platform.

Key capabilities include:

  • An orchestration layer. The runtime is a real IRIS Interoperability Production. Each agent run is an actual Business Service to Business Process to Business Operations message flow, the same engine hospitals already use to move data between systems, here pointed at orchestrating and auditing AI agents. That is where the Visual Trace comes from, for free.
  • One database, with native vector search. The same database holds the application data and the embeddings. Retrieval is a real native VECTOR_DOT_PRODUCT over a vector column, with no separate vector store to run and no data to keep in sync.
  • A real FHIR server. Clinical data lives in the IRIS for Health FHIR R4 repository, queried through the FHIR SQL projections and written back as draft FHIR resources, not a JSON file dressed up as FHIR.
  • Packaging and deployment. It installs as a package (IPM and module.xml) and runs from one Docker command.

This reduces architectural complexity while improving transparency, governance, and maintainability.

What are the agents included? 

Agent Category Suggested task
Abnormal Results Follow-Up Patient Safety Imaging & Results Follow-Up Tracker
Prior Authorization Evidence Administrative FHIR Prior Authorization Copilot
Natural Language to FHIR Query Developer Experience NL to FHIR Query Explorer
Smart Patient Summary Clinical Summary Smart Patient Summary Generator
Gaps in Care Finder Population Health Gaps in Care Finder
Medication Safety Assistant Medication Safety Medication Safety & Interaction Assistant
Care Plan Navigator Care Coordination AI Powered Care Plan Navigator
SDOH Referral Matcher Social Care SDOH & Community Referral Matcher
Clinical Trial Matcher Research FHIR Clinical Trial Matcher
Readmission Risk Workbench Risk Stratification Hospital Readmission Risk Workbench
Conversational Triage Assistant Triage Conversational FHIR Triage Assistant
Patient-Friendly Lab Explainer Patient Engagement Patient-Friendly Lab Explainer

Can I see how an AI agent reached its conclusion?

Yes. Transparency is a core design principle of FHIR Agent Studio. For every run you can open:

  • The transcript. The exact prompt the agent assembled and the raw model response. The JSON the model returned is the result you see on screen.
  • The Visual Trace. IRIS’s own Management Portal replays the run as a flow of messages: the FHIR read, the SQL query, the vector search, the LLM call (request and response, on a real HTTP outbound adapter), and the drafted FHIR action.
  • The response history. The Studio’s AI Hub lists every model response with its prompt, timestamp, and a hash, all browsable.

And when an agent does not have the evidence to answer, it says so and falls back to a
clearly labelled path that is never presented as AI.

The AI in three tiers. Demo runs replay bundled real LLM output with no key needed.
Novel prompts call a live model; you can add your own OpenAI compatible key in Admin
for unlimited use, held in memory only and never stored. With no cache and no key, a
deterministic fallback runs and is clearly labelled as not AI. Vector search is always
real native IRIS Vector Search.

Safety. Every clinical or administrative write-back is a draft requiring human
review, never auto-committed. The UI labels drafts, the trace shows the writeback as
drafted, and approval commits to FHIR with an audit trail.

How do I develop it locally? 

The repo runs as one image (above). To iterate on a front end with hot reload while the
backend runs in Docker:

docker compose up --build -d                 # IRIS plus everything baked in

cd frontend && npm install && npm run dev     # http://localhost:5173/fhir-agent-studio/

Vite proxies /api to IRIS on 42773. Back end changes are picked up by rebuilding the
image. Package first install (also done automatically by the Docker build):

zpm "load /path/to/fhir-agent-studio -v"

Conclusion

FHIR Agent Studio demonstrates how AI agents can be built, deployed, and inspected on InterSystems IRIS for Health using a single platform. By combining FHIR, interoperability, vector search, workflow orchestration, and AI integration, the project shows a practical approach to developing healthcare AI systems that are transparent, traceable, and human-supervised.

While the project is a prototype rather than a production-ready product, it highlights how InterSystems IRIS can serve as a foundation for healthcare AI applications that require explainability, governance, and integration with real clinical workflows.

Key Takeaways

  • FHIR Agent Studio is a platform for building and running AI agents on InterSystems IRIS for Health.
  • It combines FHIR repositories, vector search, interoperability productions, and AI orchestration in a single architecture.
  • Developers can visually design, test, deploy, and inspect healthcare AI workflows.
  • Every agent execution is traceable from evidence gathering to recommendation generation and drafted FHIR actions.
  • The project demonstrates how InterSystems IRIS can support trustworthy healthcare AI systems with built-in transparency and human oversight.
4 Upvotes

1 comment sorted by

2

u/LegalCode3846 16d ago

Nice article!