berk.ai
← Work

Triangle Health · 2025 – Present

Multi-agent AI healthcare platform

End-to-end architecture for an AI-powered healthcare platform — conversational agents, clinical workflows, FHIR interoperability, and production-grade orchestration.

Role: Principal Software Engineer

  • AI platforms
  • Healthcare
  • Multi-agent systems

Context

The problem and my role

Problem

Healthcare teams need AI that can participate in real clinical workflows — collecting data, analyzing documents, orchestrating steps — while meeting interoperability, consent, and compliance requirements. Generic chatbots break down when tools, identity, and auditability matter.

Role

Technical leader for design and implementation across frontend, backend, AI infrastructure, and cloud. Established scalable engineering patterns adopted across the platform and mentored engineers on AI integration and system design.

Constraints

  • Regulatory and privacy expectations around patient data and consent
  • Need for specialized agents rather than a single monolithic prompt
  • Interoperability with healthcare systems via HL7 FHIR and SMART on FHIR
  • Production observability for distributed AI services
  • Human-in-the-loop decision points for clinical safety

System

Architecture

System map

AI inside a clinical workflow

A supervised conversation routes work through specialized agents and standardized healthcare tools while preserving consent, observability, and human review.

  1. 01

    Patient or care team

    Begins a conversational or workflow-driven interaction

  2. 02

    Conversation layer

    Maintains context, identity, consent, and structured interaction

  3. 03

    Supervisor agent

    Plans work and coordinates specialized capabilities

  4. 04

    Specialized agents

    Handle onboarding, data collection, documents, and workflow steps

  5. 05

    MCP tools

    Expose clinical capabilities through consistent, auditable interfaces

  6. 06

    FHIR systems

    Exchange healthcare data through HL7 FHIR and SMART on FHIR

  7. 07

    Observability and human review

    Tracing, evaluation, and explicit intervention points surround the flow

Execution

What I built

  • Architected a multi-agent platform using GPT-5.x, MCP, and LangGraph for patient onboarding, clinical data collection, document analysis, and workflow orchestration.
  • Built an extensible MCP server ecosystem exposing healthcare tools and clinical capabilities through standardized interfaces.
  • Designed production AI pipelines covering prompt engineering, tool calling, structured outputs, retrieval workflows, and HITL controls.
  • Implemented consent, authentication, authorization, and secure data-sharing for patient-facing AI applications.
  • Established OpenTelemetry + Datadog observability with structured logging, metrics, and tracing for AI services.
  • Used event-driven cloud-native backends with asynchronous processing and resilient messaging.

Tradeoffs

Technical decisions

MCP as the tool boundary

Decision
Expose healthcare capabilities through reusable MCP servers and SDKs instead of binding every agent directly to backend services.
Why
A standardized boundary makes tools easier to discover, secure, observe, test, and reuse across workflows and teams.
Tradeoff
The abstraction adds protocol and schema design work, but avoids a larger collection of one-off integrations.

Explicit orchestration over prompt-only autonomy

Decision
Use LangGraph to coordinate specialized agents, structured outputs, tool calls, and human-in-the-loop checkpoints.
Why
Clinical workflows need visible state transitions, recovery paths, and intervention points that a monolithic prompt cannot reliably provide.
Tradeoff
Workflow graphs require more deliberate state design, but make production behavior easier to inspect and operate.

Observability as a platform capability

Decision
Instrument distributed AI services with OpenTelemetry, Datadog, structured logs, metrics, and traces.
Why
Prompts and model calls are only part of a production workflow; teams need end-to-end evidence when tools, queues, services, or agents fail.
Tradeoff
Rich telemetry adds implementation and data-governance cost, especially around sensitive healthcare context.

Value

Product impact

User impact

Supports AI-assisted healthcare interactions that remain connected to identity, consent, clinical data, and human decision points.

Business impact

Creates reusable agent, MCP, interoperability, and observability foundations that product teams can build on instead of recreating for each workflow.

Results

Outcomes

  • Unified architecture spanning conversational AI, clinical workflows, and healthcare interoperability standards.
  • Reusable MCP tool surfaces and SDKs that accelerate feature development across teams.
  • Engineering standards for AI evaluation, testing, deployment automation, and operational excellence.
  • Close collaboration with product, clinical, and executive stakeholders to turn requirements into scalable systems.

Notes

Notes from the system

Agent specialization

Rather than one general assistant, specialized agents own onboarding, data collection, document analysis, and orchestration — coordinated through LangGraph with clear tool boundaries via MCP.

Interoperability without shortcuts

SMART on FHIR and OAuth-backed access patterns keep AI-assisted workflows aligned with healthcare identity and data-sharing norms, instead of brittle one-off integrations.

Reflection

Lessons learned

  • Production healthcare AI must be observable, interruptible, and grounded in explicit system boundaries.
  • Platform investments compound when product teams can reuse tools, evaluations, and workflow patterns rather than rebuilding AI integration from scratch.

Tools

Stack

GPT-5.xMCPLangGraphLangChainRAGKotlinSpring BootTypeScriptNext.jsPostgreSQLRedisKafkaAWSKubernetesOpenTelemetryDatadogHL7 FHIRSMART on FHIR