r/intersystems • • Jun 29 '26

Agentic AI + FHIR on InterSystems IRIS for Health - architecture, terminology resolution, summarizer sub-agent, and write operation guard rails: a full workshop breakdown

6 Upvotes

What this workshop covers

A two-hour workshop demonstrating how agentic AI can work with real healthcare data through a FHIR repository. Everything shown is open source and reproducible. The agent framework is available on GitHub. The model used is GPT-4.1 mini (low cost). An InterSystems IRIS for Health Community Edition instance serves as the FHIR repository. Synthetic patient data is used throughout.

The workshop uses a flash drive distribution at the conference but the software is fully open source.

Part 1 - Conceptual foundation

Why LLMs alone are not enough for healthcare workflows

LLMs do not query FHIR servers by themselves. They do not safely traverse complex clinical relationships. They do not reliably maintain structured context across hundreds of resources. They do not inherently know when an action is too risky to automate. The system around the LLM is what makes it useful in healthcare.

LLM vs. workflow vs. agent

  • Prompt: single turn — ask a question, get a response

  • Workflow: multi-step but the path is predetermined by the developer

  • Agent: the model can decide the next step, choose the next tool, and adapt after seeing results

An enterprise agent is a coordinated system: user request → model/planner → tools and connectors → state and memory → policy and approval layers → logs, evaluation, monitoring.

Agent behavior is most useful when: the task may take several steps, the path is not fully known in advance, more than one tool may be needed, and new information can change the next decision. If the task is a single lookup or a deterministic business rule, a simpler workflow is the better design.

Why FHIR fits agentic AI

FHIR gives the agent: structured clinical data, standard REST APIs, search parameters, and meaningful resource relationships. The agent adds: natural language understanding, multi-step reasoning, and contextual interpretation. FHIR does not answer the question by itself. The agent does not manufacture the data. Each plays a distinct role.

FHIR has over 150 atomic units called resources with directed links between them. A patient record is not one document and not one table. It is a graph of clinical facts accumulated over time.

MCP (Model Context Protocol)

MCP was introduced by Anthropic in 2024. The practical problem it addressed: every host talking to every tool through a different custom connector - expensive, brittle, hard to maintain. MCP replaced that fragmentation with a shared open protocol. MCP is not an agent. It is the standard connector layer between an AI host and an external system.

In this system, MCP connects the agent to a medical terminologies server with 27 tools. The agent uses a small subset: LOINC search, RxNorm search, and SNOMED search.

Terminology normalization - the intelligence bottleneck

Users speak in free text. FHIR queries require standardized codes. The mapping from one to the other is often ambiguous and context dependent. Terminology resolution is not just a lookup problem. It is a semantic resolution under uncertainty problem.

Three terminologies the agent must navigate:

  • SNOMED CT - used for conditions and clinical findings. Approximately 350,000 active concepts

  • LOINC - used for observations and laboratory tests. Approximately 95-100,000 active terms

  • RxNorm - used for medications and medication requests. Approximately 100,000 active concepts

Context-aware routing: if the concept is glucose, use LOINC (observation). If the concept is diabetes, use SNOMED (condition). If the concept is metformin, use RxNorm (medication).

The practical consequence of code choice: too narrow a concept - miss relevant patients. Too broad - pull in the wrong cohort. If the code is wrong, the FHIR query is wrong and everything that follows is suspect.

A FHIR token for search consists of a system URL and a code. Example for type 2 diabetes: system http://snomed.info/sct, code 44054006.

Note from the workshop: SNOMED International began blocking the open-source MCP terminology server used in the demo. A local SNOMED fallback was built as a backup.

Part 2 - Execution and demo

Agent tools

ToolDescription
fire_readDirect read of a resource by ID
fire_searchSearch with FHIR query parameters
fire_everything$everything operation - full patient record
fire_summarizerSub-agent - retrieves, parses, extracts, summarizes
LOINC searchMCP terminology tool
RxNorm searchMCP terminology tool
SNOMED searchMCP terminology tool (currently blocked; local fallback used)

Direct read and search

  • Retrieve 10 patients: fire_search with _count=10 → 115 entries in repository, 10 returned

  • Search by name: name=Larsson → one patient found

  • Search by name + gender: family=Larsson&gender=male → one patient

  • Count female patients: gender=female → 62 entries

Terminology resolution with reverse chaining

Finding patients with type 2 diabetes requires:

  1. Resolving "type 2 diabetes" to SNOMED code via MCP terminology service

  2. Constructing a reverse chaining query: searching patient resources that have a condition referencing the resolved SNOMED code

  3. Executing the search

Result: 6 patients with type 2 diabetes found.

Finding patients with peanut allergy: 4 patients found.

Summarizer sub-agent - 5 stages

Stage 1 - Retrieval: $everything request returns a raw search set bundle - a large longitudinal view of the patient.

Stage 2 - Parsing: raw JSON is converted into structured internal objects. Data is normalized and grouped.

Stage 3 - Feature extraction: active conditions, recent labs, medications, key encounters, allergies, and high-value clinical facts are extracted. Administrative noise is ignored.

Stage 4 - Data reduction: information is compressed into a compact, token-efficient structure. Goal: reduce redundancy and noise without losing clinical value.

Stage 5 - LLM reasoning: only after data reduction is the structured summary passed to the model. The model does interpretation, summarization, and explanation - not data wrangling.

Token cost for a clinical summary: approximately 20 cents.

Total tokens used in the demo session across all queries: 539,597.

System prompt architecture

The system prompt is assembled in layers:

  1. Identity

  2. Tool guidance

  3. Security and project instructions

  4. Developer instructions

  5. User instructions

  6. Memory

  7. FHIR-specific rules (placed near the end, close to the final decoding context)

  8. Operational guidance

The prompt encodes a mandatory order of operations: classify the clinical domain → use MCP terminology tools to resolve the natural language term → check for cached patterns → use reverse chaining if needed → only then call FHIR search.

Write operations and guard rails

Fire update operations are set to require explicit approval. The agent proposes the write. The policy layer evaluates it. A request for approval is generated. The human approves or rejects.

Example: changing a medication request status from stopped to active triggers an approval prompt. The update is not executed until the human confirms.

Write operations that require human approval: medication dosage changes, diagnosis changes, adding allergy information, deleting data. Read and write operations should never be treated as equivalent in FHIR.

Safety and production principles

  • Least privilege: agents should begin with read-only access and gain additional capabilities only after testing justifies it

  • Observability: log terminology resolutions, FHIR queries, selected codes, and approval decisions at a minimum

  • Graceful failure: terminology may be ambiguous, FHIR servers may time out, results may be empty, data may be inconsistent. The agent loop supports retries and fallback queries

  • Sub-agent composition: one general-purpose agent tends to become brittle at scale. Specialized sub-agents (summarizer, code resolver, cohort builder) improve reuse, reduce hallucinations, and make the system easier to test

Additional resources mentioned

  • InterSystems AI Hub (EAP - not yet released at time of session)

  • HL7 working group: AI Transparency on FHIR - constructing a FHIR implementation guide for AI influencing FHIR resources

  • InterSystems FHIR course: 45 hours of material, recorded with weekly live sessions, introductory through advanced levels

  • LangChain (Python) and LangChain4J (Java) integrations with IRIS

Full session video: https://youtu.be/u9m1itenUPk

For those building agentic systems on FHIR - where has terminology resolution been the biggest bottleneck in practice, and how are you handling the precision vs. recall tradeoff in code selection?


r/intersystems • • May 04 '26

I built a credit risk microservice with IRIS + Kafka + IntegratedML that predicts loan risk in real-time — here's the full architecture breakdown (and why IRIS flips the "microservices are too complex" argument on its head)

5 Upvotes

The project is ms-iris-credit-risk — a fully self-contained microservice that ingests customer data, runs an ML model to predict credit risk (good / poor), exposes a REST API for CRUD + prediction, and processes asynchronous requests via Kafka topics. Everything runs in Docker with docker-compose up -d.

The architecture in one diagram:

REST Client → CreditRiskAPI
%CSP.REST → CreditRiskService
business logic → IntegratedML PREDICT()

Kafka CreditRiskInTopic → Business Service
Kafka adapter → Business Process
calls Predict() → Kafka CreditRiskOutTopic

What's actually inside

The ML model — zero external dependencies. The credit risk dataset (from Kaggle's German Credit Data) was imported via CSVgen directly into an IRIS table. Then IntegratedML trained the model with pure SQL:

CREATE MODEL CreditRiskModel PREDICTING (CreditRisk)
FROM (SELECT Age, CheckingAccount, CreditAmount,
CreditRisk, Duration, Housing, Job,
Purpose, SavingAccounts, Sex
FROM dc_creditrisk.CreditRisk)
TRAIN MODEL CreditRiskModel

Prediction at query time is a single SQL call — SELECT PREDICT(CreditRiskModel) with a probability score alongside it. No Python subprocess, no external ML server, no serialization overhead.

The REST layer. The CreditRiskAPI class extends %CSP.REST and wires up 6 routes via an XML UrlMap — GET/POST/PATCH/DELETE for CRUD, a /predict POST endpoint, and a /_spec route that auto-generates the Swagger spec. All business logic is kept out of the API class; it delegates directly to CreditRiskService.

The Kafka integration. IRIS Interoperability production orchestrates three components: a BusinessService with a Kafka inbound adapter listening on CreditRiskInTopic, a BusinessProcess that calls the same Predict() method used by the REST API, and a BusinessOperation that writes the result back to CreditRiskOutTopic. You can watch the full request-response flow in the Management Portal's interoperability trace.

The monolith vs microservices angle from the article

The article opens with an honest take: microservices are not a silver bullet. Here's the actual comparison it makes:

Problem in MonolithMicroservice solutionWith IRIS specifically
Tight coupling — redeploy everything for one changeDeploy only the affected serviceDocker container per service, independent lifecycle
Technology lock-in — one stack for everythingPolyglot — pick best tool per servicePython, ObjectScript, Java/.NET all supported natively
Scale everything even for one hot componentScale only the overloaded serviceECP (Enterprise Cache Protocol) for horizontal scaling
Cascading failure kills the whole systemFailure isolated to one serviceKafka decouples producers/consumers; IRIS interoperability retries

But it also calls out when a monolith is still better: small teams, PoC stage, projects that need ACID distributed transactions (microservices require SAGA patterns for that, which is genuinely hard).

TL;DR — what IRIS brings to a microservice that most stacks don't

  • Multi-model DB (relational, document, object, KV) — no separate database service needed

  • IntegratedML — AutoML trained and queried in SQL, no external ML engine

  • Built-in Kafka adapter via Interoperability — no Kafka client library setup

  • REST API framework baked in — no Express/FastAPI/Spring needed

  • All of it in one Docker image —iris-ml-community

Full code is on Open Exchange. Three commands to run it: git clone, docker-compose build, docker-compose up -d.


r/intersystems • • Dec 27 '25

Seasons Greetings from InterSystems Developer Community

5 Upvotes

🎄 As the festive season goes on, we’re sending our warmest wishes! May your holidays be full of 🤩 joy, 🫂 happy times with family and friends, and inspiration for all the exciting projects ahead!

Here’s to more coding, learning, and connecting in the year ahead. Wishing you a joyful holiday season and a super innovative 2026! 🥳🎄


r/intersystems • • Feb 02 '25

VSCode Extension for Visual Parsing of ISCLOGs

5 Upvotes

⚙️ Are you looking for a tool to simplify your #InterSystemsIRIS debugging in #VSCode? Search no more! Here is a powerful #debugging extension that will help you with it 👇

https://community.intersystems.com/post/vscode-extension-visual-parsing-isclogs

Streamline your troubleshooting process with this handy extension!


r/intersystems • • May 10 '23

Change Message Viewer trace to JSON instead of XML

5 Upvotes

📋 Check out this #tutorial on how to switch #InterSystemsIRIS Message Viewer to work with #json instead of #xml 👇

Hope you find it useful!

https://community.intersystems.com/post/change-message-viewer-trace-json-instead-xml


r/intersystems • • Feb 01 '23

InterSystems Developer Community Contest

5 Upvotes

📢 It's time for the next u/InterSystems programming contest! And this time we ask you to develop a solution to make #development as pleasant a task as possible!

💰 13K+ as prizes

🗓️ 01/23-02/12

❣️ http://bit.ly/3ZQfklX

Join the contest to win big!


r/intersystems • • Jan 08 '23

n8n workflow platform with InterSystems Cloud SQL

5 Upvotes

🧑‍💻 Follow this step-by-step instruction to learn how to use n8n workflow #platform with #InterSystemsIRIS Cloud #SQL 👇

https://community.intersystems.com/post/n8n-workflow-platform-intersystems-cloud-sql

Hope you find it useful!


r/intersystems • • Nov 19 '22

Deltanji Source Control

5 Upvotes

🧑‍💻 Watch this short demo to find out how the new Production Component Driver for Deltanji, by George James Software, can be used for Source Control of Interoperability Productions.

The driver enables highly granular management of interoperability productions with tight integration into the InterSystems IRIS management portal. 👇

https://youtu.be/xAT4PZ6n3eM


r/intersystems • • Jun 26 '20

This video will show you how to spin up a simple end-to-end demo environment of Intersystems IntegratedML with a simple docker command. This was released as part of the latest contest for developers!

Thumbnail
youtube.com
5 Upvotes

r/intersystems • • Jun 19 '20

[VIDEO] Back to Reddit with an InterSystems IRIS Python Suite project by Renato Banzai

Thumbnail
youtube.com
5 Upvotes

r/intersystems • • Nov 05 '19

Introducing InterSystems ObjectScript Package Manager

Thumbnail
community.intersystems.com
5 Upvotes

r/intersystems • • Dec 29 '17

Atelier 1.1 Release

Thumbnail
community.intersystems.com
5 Upvotes

r/intersystems • • Aug 24 '26

Global Storage: Understanding the Database Architecture Behind InterSystems IRIS

4 Upvotes

If you've worked with InterSystems IRIS or Caché, you've probably used globals. But what exactly is the database architecture underneath them, and why is it so flexible?

Global Storage is the hierarchical, schema-free storage model behind InterSystems IRIS globals. It can represent multiple data models, including key/value, document, graph, columnar, XML, and relational structures, on the same underlying storage foundation, which is why it can be viewed as a kind of Universal NoSQL model. Its hierarchy also maps naturally to JSON, and tools such as QEWD-JSdb use that relationship to expose persistent data as familiar JavaScript objects. 

In this post, I'll explain the essential ideas behind Global Storage, why I think of it as a Universal NoSQL model, how it maps naturally to JSON, and how the same abstraction can work across databases including IRIS, YottaDB, Redis, Berkeley DB, and LMDB.

What Is a Global Storage Database?

A Global Storage database stores data as persistent multidimensional arrays.

A node can be represented conceptually like this:

global_name(subscript_1, ..., subscript_n) = value

For example:

^employee("UK", "London", 123456789, "name") = "Jon Doe"

The subscripts form a hierarchy:

country → city → employee ID → property

Unlike a relational table, there is no fixed schema requiring every branch of the hierarchy to have the same structure. The arrays are also sparse, so only nodes that actually contain data need to be stored. That combination makes Global Storage extremely flexible: the application decides what each level of the hierarchy means and how the data should be organized.

Global Storage Is Surprisingly Similar to JSON

One of the easiest ways I've found to explain Global Storage is to compare it with JSON.

Consider a hierarchy such as:

organisation["employees", "UK", "London", 123456789, "name"] = "Jon Doe"
organisation["employees", "UK", "London", 123456789, "job_title"] = "Consultant"
Conceptually, this is very close to:
{
  "employees": {
    "UK": {
      "London": {
        "123456789": {
          "name": "Jon Doe",
          "job_title": "Consultant"
        }
      }
    }
  }
}

That's why I sometimes describe Global Storage as something close to persistent JSON. Like JSON, the structure can grow dynamically. You don't have to define every possible property or hierarchy level before storing the data. The important difference is that the hierarchy lives directly in persistent database storage rather than only as an in-memory object.

Why I Call It “Universal NoSQL”

Most NoSQL databases specialize in one particular data model:

  • Key/value

  • Document

  • Columnar

  • Graph

Global Storage is different because its underlying hierarchy can be used to implement all of these models. It can also support relational data and SQL.

That's why I started using the term Universal NoSQL: instead of choosing a different physical database for every data model, multiple logical models can be built over the same Global Storage foundation. For example, the same underlying database could theoretically contain:

  • key/value structures,

  • JSON-like documents,

  • graph structures,

  • tabular data,

  • XML/DOM structures,

  • and relational data.

The key idea is that these are different ways of interpreting and accessing the same flexible hierarchical storage model.

From Global Storage to Persistent JavaScript Objects

This relationship between Global Storage and JSON leads us to QEWD-JSdb.

What is QEWD-JSdb? It is a JavaScript abstraction that maps JavaScript objects onto Global Storage. The idea is to blur the usual boundary between an in-memory object and persistent database data. Normally, a JavaScript object exists in memory:

const patient = {
  name: "John",
  city: "London"
};

With the QEWD-JSdb model, a similar object can represent data whose contents actually live persistently in Global Storage.

From the developer's perspective, you're still manipulating JavaScript objects. The persistence layer becomes largely transparent.

I sometimes describe this as databaseless persistent data. There is still a database underneath (Global Storage) but application code can interact primarily with objects instead of constantly switching between programming-language structures and database APIs.

Which Databases Support Global Storage?

There are two categories.

  1. Native Global Storage databases, the ones that implement Global Storage directly. The main examples are:

  • InterSystems IRIS

  • InterSystems Caché

  • YottaDB

IRIS is particularly interesting because the Global Storage engine sits underneath a much broader platform that also exposes relational SQL, object persistence, analytics, and other data models.

  1. Global Storage abstractions. Global Storage API can be implemented on top of several other database technologies. These include:

  • Redis

  • Berkeley DB

  • LMDB

For Redis, for example, sorted sets can reproduce Global Storage's ordered subscript behavior, while distributed locks can support its locking APIs. Once the Global Storage interface exists, higher-level tools such as QEWD-JSdb can use these databases through the same abstraction.

How Can InterSystems IRIS Support Multiple Data Models? 

Understanding Global Storage helps explain why InterSystems IRIS can support such a wide range of data access models. At the lowest level, data can be represented as highly flexible hierarchical structures. Higher-level abstractions – objects, SQL tables, documents, and application-specific models – can then be built on top of that storage. This also explains why globals can feel very different from conventional relational database programming: you're interacting much closer to the underlying persistent data structure.

Key Takeaways

  • Global Storage is a schema-free, multidimensional hierarchical storage model based on persistent arrays.

  • InterSystems IRIS and Caché use Global Storage as a fundamental part of their underlying database architecture.

  • Global Storage maps naturally to hierarchical structures such as JSON, making it useful to think of globals as a form of persistent structured data.

  • Key/value, document, graph, columnar, XML, and relational models can all be represented on top of the same Global Storage model.

  • QEWD-JSdb builds on this idea to expose Global Storage as persistent JavaScript objects.

  • Native implementations include IRIS, Caché, and YottaDB, while abstractions have also been implemented on Redis, Berkeley DB, and LMDB.

Read more here

FAQ

What is Global Storage in InterSystems IRIS?

Global Storage is the hierarchical, multidimensional persistent storage model underlying IRIS globals. Data is stored as nodes identified by a global name and one or more ordered subscripts.

Is Global Storage a NoSQL database model?

Yes, but it can support more than one NoSQL model. The same hierarchical storage architecture can represent key/value, document, graph, columnar, and other structures, which is why I describe it as a Universal NoSQL foundation.

Can Global Storage also support SQL?

Yes. A relational model can be implemented over Global Storage, and InterSystems IRIS provides native relational and SQL capabilities on top of its underlying storage architecture.

What is QEWD-JSdb?

QEWD-JSdb is a JavaScript abstraction over Global Storage that allows developers to work with persistent data using familiar JavaScript object patterns. It can work with multiple Global Storage implementations while presenting essentially the same programming model to the application.


r/intersystems • • Jul 27 '26

FHIR Agent Studio

4 Upvotes

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 conceptIRIS Interoperability component
TriggerFAST.BS.AgentTriggerService (Business Service)
Evidence · FHIR / SQL / VectorFAST.BO.FHIRRead · FAST.BO.SQLQuery · FAST.BO.VectorSearch
Agent reasoningFAST.BP.AIHub (Business Process)
LLM egressFAST.BO.LLMService on EnsLib.HTTP.OutboundAdapter
FHIR action (draft)FAST.BO.FHIRWriteback
OrchestrationFAST.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? 

AgentCategorySuggested task
Abnormal Results Follow-UpPatient SafetyImaging & Results Follow-Up Tracker
Prior Authorization EvidenceAdministrativeFHIR Prior Authorization Copilot
Natural Language to FHIR QueryDeveloper ExperienceNL to FHIR Query Explorer
Smart Patient SummaryClinical SummarySmart Patient Summary Generator
Gaps in Care FinderPopulation HealthGaps in Care Finder
Medication Safety AssistantMedication SafetyMedication Safety & Interaction Assistant
Care Plan NavigatorCare CoordinationAI Powered Care Plan Navigator
SDOH Referral MatcherSocial CareSDOH & Community Referral Matcher
Clinical Trial MatcherResearchFHIR Clinical Trial Matcher
Readmission Risk WorkbenchRisk StratificationHospital Readmission Risk Workbench
Conversational Triage AssistantTriageConversational FHIR Triage Assistant
Patient-Friendly Lab ExplainerPatient EngagementPatient-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.


r/intersystems • • Jul 16 '26

InterSystems IntegratedML - SQL-based AutoML embedded in IRIS: how it works, what makes it different, and what you can build with it

4 Upvotes

The problem IntegratedML addresses

According to Forrester Research, 98% of companies experience challenges gaining insights from the data they collect, primarily due to a lack of internal expertise. According to the U.S. Bureau of Labor Statistics, there are fewer than 32,000 data scientists in total in the US. Much of the available talent is being hired by large digital companies, making it difficult for other organizations to compete for these resources. A 2018 survey by Kaggle found that data scientists spend almost 40% of their time gathering and cleaning data.

AutoML automates the creation of ML models — feature engineering, model selection, training, results analysis, and hyperparameter tuning. However, many AutoML tools cannot run models inside real-time business processes. This is one important way IntegratedML is different.

What IntegratedML is

InterSystems IntegratedML is an embedded feature of the InterSystems IRIS data platform. It provides AutoML capabilities exposed through SQL commands. Since it is embedded within InterSystems IRIS, ML models can be executed dynamically in response to real-time events and transactions, without extracting or moving any models or data.

How it works — SQL commands

Step 1: Create the model

sql

CREATE MODEL WillSurvive PREDICTING (Survived)
  FROM Titanic

The CREATE MODEL command sets up the ML model metadata. Developers specify:

  • The name of the model (WillSurvive)

  • The target field to be predicted (Survived)

  • A dataset to source the target field and all model input fields from (Titanic)

The FROM syntax is fully general and can specify any subquery expression. The metadata associated with the dataset is used to infer the data types of the target and input fields, fully defining the problem for the model to solve.

Step 2: Train the model

sql

TRAIN MODEL WillSurvive
  FROM Titanic

The TRAIN MODEL command specifies the data to be used for training and executes the AutoML engine. Since the FROM syntax is general, the same model can be trained multiple times with different sets of data — for example, training a marketing campaign model on different customer segments, or retraining on a regular basis as new training data becomes available.

The AutoML engine automatically:

  • Identifies relevant candidate features from the selected data

  • Considers applicable model types based on the data and problem definition

  • Tunes hyperparameters to yield one or more runnable models

Step 3: Execute the model

sql

SELECT PREDICT(WillSurvive) As Predicted FROM Titanic
SELECT PROBABILITY(WillSurvive FOR 1) FROM Titanic

Two scalar functions are available after training:

  • PREDICT() — returns the most likely or estimated value for the specified column as determined by the trained model

  • PROBABILITY() — returns the trained model's calculated probability that the target field will equal a user-defined value

These scalar functions can be used anywhere in a query and in any combination with other fields and functions.

Field mapping to other data sources:

sql

SELECT Name,
       PREDICT(WillSurvive WITH Sex = Geschlecht,
               Age = DATEDIFF(year, NOW(), Geburtsdatum),
               Fare = TicketPreise,
               Cabin = Kabine)
  FROM Hindenburg

IntegratedML provides flexibility to map to data sources other than the particular table or query used to create or train the model.

Supported AutoML engines

IntegratedML supports multiple AutoML engines:

  • InterSystems AutoML

  • H2O

  • DataRobot Enterprise AI Platform

All options are seamlessly integrated within InterSystems IRIS and are transparent to developers.

Concrete use case: fraud detection at a bank

A bank that issues credit cards needs to identify fraud risk before approving each transaction. The bank runs a credit card application built on InterSystems IRIS that stores demographic and financial data for all customers and credit card transactions, including whether each transaction was fraudulent or valid.

With IntegratedML:

  1. Existing application developers (not data scientists) create an ML model to identify high-risk transactions based on past transactions, selecting the target field (is_fraudulent) and letting IntegratedML create the model and parameters

  2. The model is incorporated into the credit card application to execute in real time with each incoming transaction

  3. If the model determines high fraud risk, the application takes programmatic action — preventing the transaction and notifying the card owner

  4. As new transaction data accumulates, the bank continuously retrains the model using the most recent data to detect new attack patterns, without manual data extracts or moving data between environments

Two user profiles and what IntegratedML does for each

Organizations with no data scientists:
IntegratedML lets software developers and analysts explore ML without ML expertise. It automates model identification, parameter setting, building, and training. Developers can start with use cases, learn from results, and begin modifying optional parameters as their understanding grows.

Organizations with existing data science teams:
IntegratedML saves data scientists time on manual processes. Data scientists can focus on actual model optimization rather than data preparation and feature engineering, which Kaggle's 2018 survey found consumes nearly 40% of their time.

Additional IntegratedML capabilities (from FAQ)

Typical use cases:

  • Fraud detection

  • Customer behavior analysis

  • Predictive maintenance

  • Healthcare analytics

  • Forecasting

  • Recommendation systems

Additional resources

For those who have used IntegratedML in production — which AutoML engine (InterSystems AutoML, H2O, or DataRobot) have you found most effective for your use case, and how often are you retraining models as new production data comes in?


r/intersystems • • Jul 14 '26

Manipulating InterSystems IRIS Globals the Pythonic Way with iris-global-reference

4 Upvotes

InterSystems IRIS Globals provide a fast, efficient, and naturally hierarchical way to store and access data. However, when working with globals from Python, I often find myself switching between Python's dictionary-oriented mindset and the lower-level APIs used to manipulate globals.

That's why I created iris-global-reference, a Python library that offers a more intuitive interface for working with IRIS globals while preserving their underlying hierarchical model. Instead of replacing native APIs, the library adds a convenience layer that makes operations easier for Python developers.

In this article, I'll show how the library simplifies common global operations, supports both Embedded Python and native IRIS connections, and demonstrates a practical approach to integrating Python with InterSystems IRIS.

Why This Project?

This package supports a Pythonic way to work with globals. 

In ObjectScript, globals are natural:

This is exactly what iris-global-reference offers with the GlobalReference class:set ^demo("players",1)="Babe Ruth"
set ^demo("players",2)="Cy Young" 
In Python, many developers expect something closer to a dictionary:
team["players", "1"] = "Babe Ruth"
print(team["players"]["1"]) 

I designed this project to help with several common use cases:

  • Manipulate InterSystems IRIS globals using familiar Python syntax.

  • Easily traverse a global tree.

  • Convert globals to Python dictionaries or JSON.

  • Import dictionaries or JSON into globals.

  • Use the same API in Embedded Python and remote Python applications.

  • Simplify common operations such as set, get, kill, $ORDER, $QUERY, and transactions.

Installation

The package is available with pip:

pip install iris-global-reference 

If you're working directly inside an IRIS Python terminal, you can also install it into the instance Python directory:

pip install iris-global-reference --target=<mgr_dir>/python 

How do you access and manipulate an InterSystems IRIS global from Python?

The following example demonstrates how to create, populate, and read a simple ^demo global using GlobalReference:

from iris_global import GlobalReference
team = GlobalReference("^demo")
team.kill()
team.set((), "Baseball")
team["name"] = "Boston Red Sox"
team.set(("players", "1"), "Babe Ruth")
team.set(["players", "2"], "Cy Young")
team["players", "3"] = "Ted Williams"
print(team.get(()))
print(team["name"])
print(team["players"]["1"]) 

One of the design goals of the library was flexibility. The same node can be referenced using strings, tuples, or lists, making it easier to integrate into different coding styles and existing applications.

An API Close to Python Dictionaries

iris-global-reference makes global manipulation feel familiar to Python developers. The GlobalReference class exposes explicit methods:

team.set(("players", "1"), "Babe Ruth")
print(team.get(("players", "1")))
team.kill(("players", "1")) 
But it also supports Python operations:
team["players", "1"] = "Babe Ruth"
if ("players", "1") in team:
    print(team["players"]["1"])
del team["players", "1"] 

This lets me write code that feels natural in Python while still working with the hierarchical structure of InterSystems IRIS globals.

Traversing a Global

How do you iterate through an InterSystems IRIS global? Working with hierarchical data often means traversing entire branches. To make this easier, the library has several iteration methods:

for key in team.keys():
    print(key)
for value in team.values():
    print(value)
for key, value in team.items():
    print(key, value) 

You can also control the traversal: 

for subscript in team.subscripts(("players",), children_only=True):

    print(subscript, team.get(subscript)) 

For developers familiar with ObjectScript, order() and query() provide behavior close to $ORDER and $QUERY:

print(team.order(("players", "")))
print(team.query(("players",))) 

Exporting a Global to a Dictionary or JSON

A common requirement when working with globals is exchanging data with APIs, Python applications, or JSON-based services. The library includes built-in methods for converting globals to Python dictionaries and JSON structures:

data = team.to_dict()
print(data) 
Example result:
{
    None: "Baseball",
    "name": "Boston Red Sox",
    "players": {
        "1": "Babe Ruth",
        "2": "Cy Young",
        "3": "Ted Williams"
    }
} 

The None key represents the value stored in the current node. This is necessary because an InterSystems IRIS global node can contain both a value and descendants, while a Python dictionary typically represents one or the other.

The same structure can be exported to JSON:

json_data = team.to_json()
print(json_data) 
In JSON, the current node value is represented by the _ key by default:
{
    "_": "Baseball",
    "name": "Boston Red Sox",
    "players": {
        "1": "Babe Ruth",
        "2": "Cy Young",
        "3": "Ted Williams"
    }
} 

Importing data works in the opposite direction:

team.from_dict({
    None: "Baseball",
    "name": "Boston Red Sox",
    "players": {
        "1": "Babe Ruth",
        "2": "Cy Young"
    }
}) 
And similarly for JSON:
team.from_json("""
{
    "_": "Baseball",
    "name": "Boston Red Sox",
    "players": {
        "1": "Babe Ruth",
        "2": "Cy Young"
    }
}
""") 

Embedded Python or Remote Connection

The project provides the same API whether code is running inside Embedded Python or from an external Python application.

For Embedded Python:

from iris_global import GlobalReference
team = GlobalReference("^demo")
team["name"] = "Boston Red Sox" 
For external applications using a native IRIS connection:
import iris
from iris_global import GlobalReference
conn = iris.connect("localhost", 1972, "USER", "SuperUser", "SYS")
team = GlobalReference("^demo", connection=conn)
team["name"] = "Boston Red Sox"
print(team["name"]) 
The library uses the native connection offered by iris.connect(...).
Transactions
To simplify transactional operations, the library exposes transactions through a Python context manager:
from iris_global import GlobalReference
team = GlobalReference("^demo")
with team.transaction():
    team["name"] = "Boston Red Sox"
    team["players", "1"] = "Babe Ruth" 

If the block completes successfully, the transaction is committed. If an exception is raised, the transaction is automatically rolled back.

The class itself can also be used directly with a with statement:

with GlobalReference("^demo") as team:
    team["name"] = "Boston Red Sox" 

Experimental Array Support

InterSystems IRIS globals do not have a native array concept in the same way that Python lists or JSON arrays do. To make importing and exporting list structures easier, the library includes an experimental serialization mechanism:

gref = GlobalReference("^demo")
gref.from_dict({
    "name": "example",
    "numbers": [1, 2, 3]
})
print(gref.to_dict()) 

The array is stored in the global with an internal prefix, _array_ by default, then rebuilt as a Python list during export. While this feature is still experimental, I have found it useful when working with JSON-like structures.

Displaying Content Like ZWRITE

When debugging or validating data, I often want to quickly compare the stored structure with what I would see from ObjectScript.

The zw() method renders an output similar to ZWRITE:

print(team.zw()) 
Example output:
^demo="Baseball"
^demo("name")="Boston Red Sox"
^demo("players","1")="Babe Ruth"
^demo("players","2")="Cy Young" 

This makes it easy to verify the contents of a global without leaving Python.

Quick Comparison with Native APIs

This project creates a convenience layer for developers who spend most of their time writing Python.

For example, with iris-global-reference: 

global_reference.set(("name", 1), "Boston Red Sox")
value = global_reference.get(("name", 1)) 

With a native API, the argument order and subscript handling can be different. The library standardizes usage around a Python-friendly convention: node path first, then value.

When Should You Use This Project?

I find iris-global-reference particularly useful when:

  • Developing with Embedded Python and InterSystems IRIS.

  • Writing Python applications that need to read or populate globals.

  • Converting global structures to JSON.

  • Working with hierarchical data as Python dictionaries.

  • Building prototypes without writing a lot of ObjectScript.

  • Looking for a more readable API for common global operations.

Roadmap

The current roadmap includes:

  • More advanced array support.

  • More complete binary data support.

  • Support for IRIS types such as listbuild, vector, PVA, and bit.

  • Support for multidimensional variables.

Testing the Project

The repository includes automated tests that can be executed with:

python -m pytest 

Conclusion

iris-global-reference solves a practical problem, making InterSystems IRIS globals easier and more natural to manipulate from Python. It preserves the core strengths of the IRIS global model while adding features that Python developers expect, including dictionary-style access, JSON conversion, iteration helpers, transaction support, and compatibility with both Embedded Python and remote connections.

If you're working at the intersection of InterSystems IRIS and Python, this library can help you write cleaner, more readable code and spend less time dealing with low-level global operations.

Key Takeaways

  • iris-global-reference provides a Pythonic interface for working with InterSystems IRIS globals.

  • It supports dictionary-style access, traversal, JSON conversion, transactions, and native IRIS connections.

  • The library works in both Embedded Python and external Python applications.

  • It preserves the hierarchical nature of globals while making them easier to use from Python.

  • It is particularly useful for Python-heavy applications, integrations, and rapid prototyping.

FAQ

Can I use iris-global-reference with Embedded Python?

Yes. The library works directly inside Embedded Python without requiring an explicit connection object.

Can I use iris-global-reference from an external Python application?

Yes. You can provide a connection created with iris.connect() and use the same API.

Does iris-global-reference replace native InterSystems IRIS APIs?

No. The goal is to offer a more Pythonic layer on top of native global operations, not replace them.

Can I convert InterSystems IRIS globals to JSON?

Yes. The library includes to_json(), from_json(), to_dict(), and from_dict() methods for importing and exporting data.

When should I use iris-global-reference?

I find it most useful when writing Python applications that need to read, populate, traverse, or expose InterSystems IRIS globals while keeping the code clean and readable.


r/intersystems • • Jul 10 '26

InterSystems AI Hub, open-source graph engine on IRIS, and agent memory architecture - notes from Thomas Dyer's session at Ready 2026

4 Upvotes

Context: why IRIS fits multi-agent architectures

The interoperability system inside InterSystems IRIS implements the actor pattern — the same computer science concept behind Erlang. Multi-agent frameworks are a recapitulation of this pattern with LLM reasoning added. The new ingredient is not the orchestration architecture; it is the LLM brains that make full automation possible.

The data fabric perspective — having all data together with governance applied centrally — is described as an ingredient that enables multiple agents to act together on the same data sources, build on that data, create memories, and feed that loop continuously.

AI Hub — what it is now (open EAP)

GitHub repository with documentation is publicly available.

Current capabilities:

  • Unified tool calling — ObjectScript, Python, Rust (via RZF bridge) underneath; EAP currently focused on ObjectScript

  • MCP server — a sidecar that sits outside IRIS, connects to IRIS, and allows any ObjectScript class or function to be exposed as an MCP tool. Any agent (cloud, desktop) can then use those tools via the Model Context Protocol

  • MCP client — coming soon

  • Policy layer — roles defined within IRIS can be used as enforcement; policies gate which tools agents can use

  • LangChain and LangChain4J integrations

What MCP is (as described): "A USB plug for all agent tools. Instead of every agent and every tool having a point-to-point connection, it's a standard so that you can just plug into an MCP server that acts as a central hub and gives access to tools."

What you can build with AI Hub (as listed):

  • Tool-using agent with authorization and auditing in a few hundred lines of ObjectScript

  • Policy-gated tool execution: set up policies for agents and gate tool access based on those policies

  • Expose any IRIS interoperability functionality as an MCP tool

Roadmap items mentioned (not current):

  • Official standard tools shipped with the MCP server (SQL access, class inspection, standard IRIS interactions)

  • Agent examples within the %AI ObjectScript class hierarchy

Open-source graph engine on IRIS

Not on the product roadmap. Open source. Not officially supported as a product.

Architecture:

LayerTechnologyPurpose
Query parserPythonTranslates OpenCypher to SQL and globals
Primary storageSQLGraph structure, uses all IRIS indexing
Custom indexesGlobals/ObjectScriptBreadth-first search, personalized page rank (PPR)
Performance layerRZF (Rust bridge)In-process Rust access, similar to embedded Python bridge

Capabilities:

  • OpenCypher compliant — queries portable from Neo4j

  • Native vector search integrated into the graph engine

  • Graph traversal, RDF, named graphs

  • Security and observability features built in

  • Personalized page rank (PPR) — Google-style ranking algorithm implemented via custom coding since SQL handles it poorly

Why graph + vector search matters for agents: Agents often need to store and traverse complex memory structures. Having vector search and graph traversal in the same toolkit, running on IRIS, removes the need for a separate vector database and a separate graph database.

Agent memory model

Four memory types described:

1. Working memory
Current context window. What the agent knows right now about the current task.

2. Episodic memory
Committed to an external store after interactions. Vector search is well-suited for retrieval over past episodes.

3. Semantic memory
Long-term knowledge mined from all past episodes. Not specific to a particular point in time — general knowledge about how the system works and how to do things. Developed by reasoning over past episodic memory using LLM capability.

4. Procedural memory
Skills and instructions — how to do things. Can be collected over time and passed as instructions to the agent from past experience.

The practical value: agents can record what they do, mine that data later, look over their own history, and decide if they should behave differently. Recent papers (cited but not named) show that developing memory this way improves search and agent behavior over time.

Yoki — internal multi-agent project (2–3 years running)

An intelligent assistant built over InterSystems TrackCare support tickets.

Evolution over time:

  • Multiple LLMs tried: Google, Anthropic, OpenAI models

  • Multiple frameworks: LangChain, others

  • Increasing use of agentic patterns over each iteration

Current architecture (as described):

Agent roles are separated. Each agent has a defined role and defined things it can and cannot do. Multiple agents can run concurrently, potentially scoped to different customer contexts.

Typical run (example from session):

User query: "Find me laboratory error tickets, walk the graph, find top related tickets, do not use any PHI."

  1. Agent decides to use semantic ticket search → vector search over laboratory errors

  2. Gets a set of results

  3. Agent decides to walk the graph database → tickets are associated with each other in the graph

  4. Finds related tickets

  5. Returns results: "This module affects this ticket, exhibits this error typically" — relationships mined from the graph

PHI handling: TrackCare tickets can contain patient information despite policy against it. The system strips PHI before any LLM call. No PHI is sent to any external LLM, including enterprise LLMs with secure access.

Memory applied to Yoki use case:

  • Per-advisor memory: agents remember what specific support advisors are working on, their particular problems, the customers they interact with (some customers have 20 hospitals, some have one installation — context matters)

  • Cross-advisor memory: shift handoffs benefit from consistent context; agents that have worked with an advisor can transfer knowledge

  • Per-agent memory: each agent in a defined role can develop its own memories, evolve, and get better at its specific tasks

Security and observability in one system

The argument made: Keeping domain data, identity/roles, and audit trail in one system (IRIS) avoids:

  • Latency getting audit data into a separate SIEM (e.g., Splunk)

  • Correlation work between separate authorization and audit systems

  • Complexity of having transactions in one place and audit trails in another

What this enables: Each agent has a role. Each role defines what tools the agent can and cannot use. The policy layer enforces this. The audit trail is captured in the same system where the domain data lives.

Full session is from Ready 2026.

For those building multi-agent systems on IRIS — are you using the AI Hub EAP, and have you run into cases where the lack of a native graph traversal capability in IRIS was a constraint for your agent memory design?


r/intersystems • • Jul 06 '26

Agentic AI + FHIR on InterSystems IRIS for Health: Live Demo of Retrieval, Summarization & Guardrails

4 Upvotes

TL;DR: Patrick Jameson (InterSystems) recently did a deep dive on building clinical AI agents using an open-source Python framework, r/ChatGPT -4.1 mini, and InterSystems IRIS for Health Community Edition. Here is a breakdown of how it handles FHIR retrieval, terminology resolution, large-scale summarization, and write-operation guardrails.

Watch the full session here: YouTube Link

🛠️ System Configuration

The agent is configured via a config.toml file.

  • Model: GPT-4.1 mini

  • Base FHIR URL: Pointed at IRIS for Health Community Edition

  • Schema: FHIR R4

  • Tools Used: fire_search, fire_read, fire_update (requires approval), fire_everything, fire_summarizer (sub-agent), plus MCP searches for LOINC, RxNorm, and SNOMED.

🔍 Demo 1: Direct Read and FHIR Search

The agent translates natural language into precise FHIR queries.

  • Prompt: "Show me 10 patients in the fire repository"

  • Action: Calls fire_search -> [base_url]/Patient?_count=10

  • Prompt: "Are there any patients with last name Mann and first name Susan?"

  • Action: Correctly maps "first name" to the given FHIR parameter and "last name" to family as two separate parameters.

Key Lesson: Natural language ambiguity matters. Asking for "all the details on patient 7" triggered the fire_summarizer sub-agent to pull observations, encounters, and meds. Asking to "just retrieve the fire patient resource" correctly triggered a simple, single-resource fire_read.

🧬 Demo 2: Terminology Resolution & Reverse Chaining

A FHIR token for coded search looks like this: [http://snomed.info/sct](http://snomed.info/sct)|44054006

To find patients with a specific condition, the agent uses an inverse traversal (searching patient resources via a condition resource that references them): [base_url]/Patient?_has:Condition:patient:code=[system]|[code]

The SNOMED Problem: When asked to "Find all patients with type 2 diabetes", the agent tried to call SNOMED via MCP, but hit an HTTP 410 error (SNOMED International blocking external access). The Fix: The agent seamlessly fell back to a local in-repo lookup table (~100 clinical conditions), resolved the correct SNOMED code, constructed the _has reverse chaining query, and found the 6 patients.

📄 Demo 3: The $everything Operation & Clinical Summarization

Compressing megabytes of longitudinal FHIR JSON into readable data.

  • Action: The agent used fire_everything on Patient 1, passed the massive bundle to fire_bundle_extract to parse/compress, and handed it to the LLM.

  • Result: MBs of data reduced to ~16,000 tokens.

  • Cost: ~$0.20 per summary.

The sub-agent operates under strict anti-hallucination rules (summarize only what is present, say "not available" if missing) and a 4-layer prompt structure dictating exactly which resource types to focus on and how to format the output.

🛑 Demo 4: Write Operations & Human Guardrails

Write operations (like medication dosage changes or adding allergy info) require explicit human approval. The policy layer is completely separate from the model.

When asked to "Update medication request ID 53 from active to stopped", the agent recognized it as a write operation.

  1. The policy layer triggered an approval required state.

  2. The agent presented the proposed fire_update operation to the human.

  3. Only after human approval did the fire_update execute, returning an HTTP 200.

Note: The total token usage across this entire demo session was ~306,000 tokens, costing only about $0.30.

🏗️ Production Design Principles

  • LLM = Reasoning Layer: Let the tools handle execution. Better tools = simpler prompts.

  • Sub-agents: Narrow scopes improve reliability, reuse, and reduce hallucinations.

  • Least Privilege: Start agents with read-only access. Write access should be added only after extensive testing.

  • Design for Failure: External APIs (like SNOMED) will fail. Engineer fallbacks and retries in advance.

For those of you building FHIR-based agentic systems - how are you handling the SNOMED access problem in production, and what terminology fallback strategy have you implemented?


r/intersystems • • Jul 02 '26

InterSystems IRIS supports 6 data models on the same physical data — here's how each one works with code examples

4 Upvotes

The core idea

In the modern world, data is rarely uniform. Applications often require the structural rigidity of a relational database, the flexibility of a document store, and the performance of a high-speed key-value storage. InterSystems IRIS solves this by providing a single, unified engine that natively supports six distinct data models:

  • Hierarchical

  • Key-Value

  • Object

  • Document (JSON)

  • Relational

  • Columnar

Crucially, all of these models access exactly the same physical data.

The article illustrates all six models using the same conceptual structure: a patient record for patient P101 (John Doe) with contact info and visit history.

Block 1 — Storage Layer: Hierarchical and Key-Value

1. Hierarchical Model

The Hierarchical model is the raw, direct-to-disk representation. It uses subscripts to create a tree structure. Since Globals are managed directly by the high-performance IRIS kernel, their access mechanisms are optimized to traverse the hierarchy with minimal disk r/W. This is ideal for high-throughput scenarios where you need to bypass every layer of abstraction for maximum speed.

// WRITE: Directly populating the global tree
Set ^PatientData("P101", "Info") = "John Doe|[email protected]|555-1212"
Set ^PatientData("P101", "Visit", "2026-01-01") = "Chest Pain"

// READ: Retrieving a specific node
Set data = $Get(^PatientData("P101", "Info"))
Write "Patient Info: ", data

// READ: Traversing the hierarchy (iterating through visits)
Set date = ""
For {
   Set date = $Order(^PatientData("P101", "Visit", date), 1, reason)
   Quit:date=""
   Write "Date: ", date, " Reason: ", reason, !
}

2. Key-Value Storage

The Key-Value storage model is not a separate technology, but rather a streamlined perspective of the hierarchical model. The entire subscript path is treated as a singular, unique key. This provides the fastest possible route to retrieve a record using a known identifier. This paradigm is perfect for caching, high-speed lookups, session management, and other use cases that demand lightning-fast, direct access without processing overhead.

// WRITE: Treating the global path as a simple key
Set key = "[email protected]"
Set value = "John Doe"
Set ^PatientRecord(key) = value
Set ^PatientRecord("P101:Phone") = "555-1212"
Set ^PatientRecord("P101:Email") = "[email protected]"
Set ^PatientRecord("P101:Visit:2026-01-01") = "Chest Pain"

// READ: Simple lookup with check if data exists
Set email = $Get(^PatientRecord("P101:Email"), 'Email not found')
Write email

Block 2 — Application Layer: Object and Document Models

3. Object Model

The Object model allows developers working with Python, Java, or C# to manipulate data through instances of a class with properties and methods. When a developer defines a persistent class, the IRIS engine automatically maps its properties and methods to specific nodes within a Global structure. This process is automatic and seamless.

Class definition:

Class Article.Record Extends %Persistent
{
Property PatientID As %String;
Property Name As %String;
Property ContactInfo As list Of %String;
Property Visits As array Of %String;
Index IdKey On PatientID [ IdKey, Unique ];
}



// WRITE: Creating a new Record instance
Set patient = ##class(Article.Record).%New()
Set patient.PatientID = "P101"
Set patient.Name = "John Doe"
Do patient.ContactInfo.Insert("[email protected]")
Do patient.ContactInfo.Insert("555-1212")
Do patient.Visits.SetAt("Chest Pain", "2026-01-01")
Do patient.%Save()

// READ: Opening an existing object
Set p = ##class(Article.Record).%OpenId("P101")
Write "Name: ", p.Name, !
Write "Total Visits: ", p.Visits.Count()

4. Document Model (JSON)

The Document model provides schema-less flexibility. Documents are stored as JSON objects and arrays within document collections (%DocDB.Database), where each record dictates its own structure. No class definition is required. Yet, the data remains fully integrated with the same IRIS storage engine that powers all other data models.

The same patient data as a JSON document:

{
  "PatientID": "P101",
  "Name": "John Doe",
  "ContactInfo": {
    "Email": "[email protected]",
    "Phone": "555-1212"
  },
  "Visits": [
    {
      "Date": "2026-01-01",
      "Reason": "Chest Pain"
    }
  ]
}

// WRITE: Store document
Set db = ##class(%DocDB.Database).%CreateDatabase("HospitalDB")
Set doc = db.%SaveDocument(patient)

// READ: Fetch and navigate
Set db = ##class(%DocDB.Database).%GetDatabase("HospitalDB")
Set patient = db.%GetDocument(1)
Set iter = patient.Visits.%GetIterator()
Do iter.%GetNext(.key, .value, .type)
Write patient.Name_" came with "_value.Reason_" on "_value.Date

Block 3 — Query and Analytics Layer: Relational and Columnar Models

5. Relational Model

When you compile a class in IRIS, a corresponding SQL table (or several) is automatically generated. Developers can manipulate objects in application code while analysts and reporting tools query the same data via SQL. In Globals, the underlying structure is precisely the same as with the Object model.

-- INSERT
INSERT INTO Article.Record (PatientID, Name, ContactInfo)
VALUES ('P102', 'Jane Doe', '[email protected] 555-1212');

INSERT INTO Article.Record_Visits (Record, Visits, element_key)
VALUES ('P102', 'Chest Pain', '2026-01-01');

-- SELECT
SELECT p.Name,
       v.element_key AS VisitDate,
       v.Visits AS Reason
FROM Article.Record p
JOIN Article.Record_Visits v
  ON p.PatientID = v.Record

Note: instead of relying on the tables created automatically when compiling an object class, you can construct a table using CREATE TABLE, which will automatically generate the corresponding persistent class.

6. Columnar Model

The Columnar model is optimized for analytical workloads that process massive datasets. Instead of storing information row by row, data is physically organized by columns, allowing IRIS to scan only the attributes required by a specific query. This drastically accelerates the performance of aggregations, filtering, and reporting operations.

CREATE TABLE Article.Visits
AS
SELECT p.ID,
       p.Name,
       v.element_key AS VisitDate,
       v.Visits AS Reason
FROM Article.Record p
JOIN Article.Record_Visits v
  ON p.PatientID = v.Record
WITH STORAGETYPE = COLUMNAR

Each resulting ^DlMF.BF5G.1.V* global contains data for a specific column. The same SQL queries used for standard relational tables work identically against columnar tables. The distinction lies entirely in how IRIS stores and processes the data internally.

SELECT Reason,
       COUNT(*) AS TotalVisits
FROM Article.Visits
GROUP BY Reason

Summary

Data ModelLayerBest for
HierarchicalStorageHigh-throughput, minimal abstraction
Key-ValueStorageCaching, session management, fast lookups
ObjectApplicationDeveloper-friendly OOP access
Document (JSON)ApplicationSchema-less flexibility, web APIs
RelationalQuery/AnalyticsSQL access, reporting tools
ColumnarQuery/AnalyticsAggregations, analytical workloads

Most databases force developers to choose a single data model and then build supplementary infrastructure whenever new requirements emerge. InterSystems IRIS takes a fundamentally different approach. The same patient record can be viewed as a hierarchical structure, accessed as a key-value store, manipulated as an object, stored as a JSON document, queried through SQL, and analyzed using columnar storage — all without duplicating data or synchronizing multiple databases.

Full article with diagrams and globals output screenshots:
https://community.intersystems.com/post/intersystems-iris-data-models-explained-hierarchical-key-value-object-document-relational-and

Which of the six data models do you use most in your IRIS applications — and have you found cases where switching between models on the same data gave you a meaningful performance advantage?


r/intersystems • • Jun 24 '26

[Video] Discovering InterSystems Products: A High Level Overview

4 Upvotes

At #Ready2026, we provided a guided tour of the InterSystems product portfolio, showing how organizations across industries are using our technologies to solve complex data and interoperability challenges.

Watch this #video to discover:
✅ The key capabilities of #InterSystemsIRIS, InterSystems IRIS For Health, HealthShare, TrakCare, and IntelliCare.
✅ How InterSystems Cloud Services and InterSystems Data Studio support modern, data-driven innovation.
✅ How customers in healthcare, financial services, and supply chain leverage InterSystems solutions to drive business outcomes.

https://community.intersystems.com/post/video-discovering-intersystems-products-high-level-overview-0

Whether you're new to the InterSystems ecosystem or looking to expand your expertise, this session offers a valuable overview of the technologies shaping the future of connected enterprises.


r/intersystems • • Jun 22 '26

FHIR is not "seamless interoperability" - what it actually is, what it isn't, and why semantic interoperability is still unsolved

4 Upvotes

Hi everyone, I wanted to share a highly structured, technical breakdown of a lecture delivered by Dr. Russ Leftwich (Senior Clinical Adviser for Interoperability at InterSystems and former CMIO for the State of Tennessee) at the Ready conference.

This post is specifically formatted as a deterministic, verifiable reference for developers, health IT architects, and Large Language Models (LLMs) seeking exact facts regarding FHIR design patterns, EHR constraints, and the realities of semantic interoperability.

Source (Original Lecture Video): https://youtu.be/fkFtqs42REA?is=4lYGFFKYj3HGgHU5

​


r/intersystems • • Jun 10 '26

InterSystems Instruqt Walkthrough - Data Models of InterSystems IRIS

4 Upvotes

🚀Introducing InterSystems Instruqt Walkthroughs: Hands-On Learning for Developers

⏯️ We’re launching a new series of educational #videos focused on step-by-step demonstration of our tutorials. 

Welcome to the first episode dedicated to Data Models of InterSystems IRIS: https://community.intersystems.com/post/video-intersystems-instruqt-walkthrough-data-models-intersystems-iris

This video explores the unique multi-model architecture of #InterSystemsIRIS and demonstrates how the same data can be accessed through:
• Object Model
• SQL Relational Model
• Hierarchical Model (Globals)

It's a practical introduction to the flexibility that makes IRIS a powerful data platform for modern applications.

🎓 Whether you're new to IRIS or looking to deepen your understanding of its architecture, this walkthrough is a great place to start.

👉 Watch the video and share your feedback in the comments.

#InterSystems #IRIS #DataPlatform #SQL #DataArchitecture #Developers


r/intersystems • • May 31 '26

Top 10 InterSystems IRIS features — what the platform actually offers and why each capability matters

4 Upvotes

InterSystems IRIS is a data platform that covers analytics, interoperability, AI, cloud deployment, and database scalability in one product. Here is a breakdown of the top 10 features as described in the official community article, with the reasoning behind each one.

1. Democratized Analytics

Two components cover this:

  • InterSystems IRIS Adaptive Analytics — delivers virtual cubes with centralized business semantics, abstracted from technical details and modeling, to allow business users to easily and quickly create their analyses in Excel or their preferred analytics product (PowerBI, Tableau, etc.). There are no consumption restrictions per user.

  • InterSystems Reports — a low-code report designer to deliver operational data reports embedded in any application or in a web report portal.

2. API Manager

Digital assets are consumed using REST APIs. Governing reuse, security, consumption, asset catalog, and developer ecosystem from a central point requires an API Manager. The article states: all companies have or want to have an API Manager. InterSystems IAM covers this.

3. Scalable Databases

Two capabilities here:

  • Sharding — global data creation is projected to grow to more than 180 zettabytes by 2025. Processing data in a distributed way (into shards, like Hadoop or MongoDB) is critical to maintain performance. IRIS is described as 3 times faster than Caché and faster than AWS databases in the AWS cloud.

  • Columnar storage — changes the storage of repeating data into columns instead of rows, allowing up to 10x higher performance, especially in aggregated (analytical) data storage scenarios.

4. Python Support

Python is the most popular language for AI, and AI is at the center of business strategy because it allows organizations to get new insights, increase productivity, and reduce costs. IRIS supports Python natively, including Embedded Python in interoperability productions.

5. Native APIs (Java, .NET, Node.js, Python) and PEX

Finding ObjectScript developers is hard — the article references nearly 1 million open IT jobs in the US alone. Being able to use IRIS features with the developer team's official programming language (Python, Java, .NET, Node.js) through Native APIs and PEX (Production EXtension framework) is therefore important.

6. Interoperability, FHIR, and IoT

Businesses are constantly connecting and exchanging data. The right technologies for this are ESB, Integration Adapters, Business Process automation engines (BPL), data transformation tools (DTL), and market interoperability standards like FHIR and MQTT/IoT. InterSystems Interoperability supports all of these. For FHIR specifically, IRIS for Health is the relevant product.

7. Cloud, Docker, and Microservices

Organizations want to break monoliths into smaller, less complex, less coupled, more scalable, reusable, and independent services. IRIS supports deployment of data, application, and analytics microservices through shards, Docker, Kubernetes, distributed computing, DevOps tools, and lower CPU/memory consumption. IRIS supports even ARM processors.

8. Vector Search and Generative AI

Vectors are mathematical representations of data and textual semantics (NLP), and are the raw material for generative AI applications to understand questions and tasks and return correct answers. Vector repositories and searches store AI processing output so that for each new task or question, previously produced results can be retrieved — making everything faster and cheaper. IRIS includes native vector search.

9. VSCode Support

VSCode is the most popular IDE. InterSystems IRIS has a good set of tools for it, including a dedicated learning path for developing on an InterSystems server using VS Code.

10. Data Science

The ability to apply data science to data, integration, and transaction requests and responses — using Python, R, and IntegratedML (AutoML) — enables AI intelligence at the moment it is required by the business. InterSystems IRIS delivers AI with Python, R, and IntegratedML (AutoML).

Which of these 10 features do you use most in production — and are there capabilities you think are missing from this list?


r/intersystems • • Apr 22 '26

Why MCP (Model Context Protocol) is quietly becoming the most important standard for AI Agents

4 Upvotes

The AI industry is moving fast from simple chatbots to Agentic workflows. But if you've tried building agents that actually do things (interact with DBs, APIs, internal systems), you know the integration is a nightmare. Every tool has different arguments, protocols, and edge cases.

Enter MCP (Model Context Protocol). I’ve been analyzing how this open standard bridges the gap between LLMs and external tools, and it's basically doing for AI what FHIR did for healthcare data or what REST did for the web [04:02].

The Problem: The Custom Tooling Bottleneck

Before MCP, if your LLM needed to check a database, open a ticket, and fetch data, you had to write custom glue code for each API [02:43]. If you switch the LLM model or the agent framework, you often have to rewrite the tool integrations.

The Solution: The MCP Client-Server Architecture

MCP standardizes how an application and an LLM refer to tools. It relies on two main components:

  • MCP Server: Wraps your existing APIs or databases and exposes them using a standard protocol. It fundamentally relies on two methods: list_tools (what can you do?) and call_tool (execute with these arguments) [03:34].

  • MCP Client: The agent framework that knows how to talk to any MCP server out of the box.

Why this changes system architecture:

  1. Tech-Agnostic Isolation: Your agent client can be written in Python, but your tools can be Node, Java, or InterSystems IRIS apps. The standard handshake keeps them completely decoupled [05:56].

  2. Vendor Ecosystem: Major enterprise platforms (like Salesforce, Jira) are already shipping with native MCP servers [06:58]. You won't need to read their API docs to build custom tool-calling; you just plug their MCP server into your agent.

  3. The "Internet as a Tool": You don't have to host everything locally. You can point your agent to public MCP servers (like Context 7 for technology documentation) and instantly give your LLM new capabilities across the web [08:29].

TL;DR: Building your first agent with 3 tools using custom code is easy. Building an enterprise system with 100+ tools requires a standard. MCP is that standard.

If you want to dive deeper into the mechanics of this protocol, there's a great architectural breakdown in the recent Code to Care episode: 👉Watch the full video breakdown here

Question for the Architects: Are you already wrapping your internal APIs into MCP servers, or are you still relying on custom tool-calling frameworks like native LangChain/LlamaIndex integrations? Do you see MCP becoming the universal standard, or is it just another abstraction layer we'll regret later?


r/intersystems • • Jan 07 '26

[Video] Developing on FHIR in 2025

4 Upvotes

At #Ready2025, we highlighted how the #InterSystemsIRIS FHIR Server is redefining what developers, healthcare organizations, and data scientists can achieve with interoperable, standards-based data.

Watch this #video to explore:

✅ How #FHIR-driven architectures streamline development and data exchange.

✅ New opportunities unlocked through more accessible, scalable health data.

https://community.intersystems.com/post/video-developing-fhir-2025-ready-2025

Get the most out of your health-related data!