Patterns
NemoClaw Agentic Workflows
Healthcare Lakehouse Guide / NemoClaw Agentic Workflows

NemoClaw Agentic Workflows & PHI Security

Deploying agents in clinical environments requires isolating Protected Health Information (PHI) while permitting models to execute reasoning loops. NemoClaw combines foundation models with a ReAct orchestration layer to implement strict de-identification/re-identification boundaries.

Fleet overview
Git repository
GitHub / GitLab β€” source of truth
commit β†’ webhook
ArgoCD hub
Management cluster, ApplicationSets
β†’
EKS
AWS prod
AKS
Azure prod
GKE
GCP prod
kubeadm
DC primary
RKE2
DC secondary
OpenShift
Regulated DC
Cluster labels (ArgoCD cluster secret annotations)
eks-us-east-prod
flavor:eks
env:prod
gpu:true
compliance:hipaa
aks-eastus-prod
flavor:aks
env:prod
gpu:true
compliance:hipaa
gke-us-central-prod
flavor:gke
env:prod
gpu:true
compliance:hipaa
dc1-kubeadm-prod
flavor:kubeadm
env:prod
gpu:true
compliance:hipaa
dc2-rke2-prod
flavor:rke2
env:prod
gpu:true
compliance:hipaa
dc3-ocp-regulated
flavor:openshift
env:prod
gpu:true
compliance:hipaa,hitrust
ApplicationSet pattern (platform addons fleet)
apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: platform-addons namespace: argocd spec: generators: - clusters: selector: matchLabels: platform: healthcare-ai # targets all 6 clusters template: metadata: name: 'platform-{{name}}' spec: project: platform source: repoURL: https://github.com/org/platform-iac path: addons/{{metadata.labels.flavor}} # per-flavor path targetRevision: HEAD destination: server: '{{server}}' syncPolicy: automated: prune: true selfHeal: true retry: limit: 3
Addon deployment matrix β€” flavor-specific overrides
AddonCloud (EKS/AKS/GKE)On-prem (kubeadm/RKE2)OpenShift
Cilium CNI deployed deployedβ€” OVN-Kubernetes (built-in)
Istio service mesh
MetalLBβ€” cloud LB used
Cloud CSI driver EBS/Disk/PDβ€” Longhorn / Rook-Cephβ€” ODF (Ceph)
Longhorn storageβ€” cloud CSI usedβ€” ODF used
Kyvernoβ€” SCC + OPA only
OPA Gatekeeper
Nvidia GPU Operator via OperatorHub
cert-manager
NemoClaw / NIM
Step through a complete NemoClaw agent reasoning cycle for a clinical drug interaction check. The agent uses a Reason β†’ Act β†’ Observe loop until it has enough information to synthesize a safe clinical output.
    PHI data journey β€” from EHR to clinical AI output
    EHR / source systems
    Epic, Cerner, or Meditech emits clinical events. SMART on FHIR app launches in EHR context with scoped access token (patient/*.read).
    Epic SMART on FHIRCerner MillenniumHL7 v2 ADT feedsDICOM modalities
    FHIR R4 ingestion β€” namespace: clinical-data
    Incoming FHIR resources validated (schema + terminology), persisted to Hapi FHIR server. HL7 v2 converted via FHIR Converter. DICOM metadata indexed. All writes trigger an audit event.
    Hapi FHIR R4 serverHL7 v2 β†’ FHIR ConverterDICOM β†’ DICOMweb adapterAudit: write logged
    De-identification pipeline
    Before any data reaches AI agents, the de-ID pipeline strips all 18 HIPAA Safe Harbor identifiers using NLP + rule-based detectors. A secure token maps the de-identified payload back to the original patient record.
    18 HIPAA identifier removalNLP NER (dates, names, MRN)Secure re-link token issuedReversible only by clinical-data ns
    NemoClaw agents β€” namespace: nemo-agents
    Agent Supervisor receives the de-identified payload and routes to the appropriate clinical agent. Agents operate entirely on de-identified data. Tool calls back to clinical-data namespace are authenticated via mTLS service identity and audit-logged.
    De-identified payload onlymTLS service identity (SPIFFE)Tool calls audit-loggedReAct reasoning loop
    NIM LLM inference β€” namespace: ai-platform
    NemoClaw calls NIM or Triton for LLM reasoning. De-identified clinical context is included in the prompt. NeMo GuardRails validates the model output for clinical safety before returning to the agent.
    NIM API (no PHI in prompt)Triton Inference ServerNeMo GuardRails validationGPU-resident, no egress
    Re-identification & output delivery
    Clinical AI output is re-linked to the patient record using the secure token held by the clinical-data namespace. The output is written as a FHIR Communication or ClinicalImpression resource and delivered to the clinician's EHR session.
    Secure token re-links to MRNOutput β†’ FHIR CommunicationDelivered to EHR SMART contextClinician review + sign-off
    Immutable audit trail
    Every PHI access, de-ID operation, agent tool call, LLM inference, and clinical output delivery is appended to an immutable log store (WORM). Logs are shipped to the SIEM for HIPAA audit readiness and stored for 7 years minimum.
    User ID + timestamp + actionPHI resource accessedWORM log store (7-year retain)Splunk / Elastic SIEM
    IaC monorepo structure
    platform-iac/
    β”œβ”€β”€ clusters/ Cluster API + Crossplane manifests
    β”‚ β”œβ”€β”€ cloud/
    β”‚ β”‚ β”œβ”€β”€ eks/ AWS CAPA ClusterClass + MachinePool
    β”‚ β”‚ β”œβ”€β”€ aks/ Azure CAPZ ClusterClass + MachinePool
    β”‚ β”‚ └── gke/ GCP CAPG ClusterClass + NodePool
    β”‚ └── onprem/
    β”‚ β”œβ”€β”€ kubeadm/ CAPD/CAPH machine + kubeadmControlPlane
    β”‚ β”œβ”€β”€ rke2/ CAPRKE2 cluster + machine config
    β”‚ └── openshift/ IPI install-config + MachineConfig
    β”‚
    β”œβ”€β”€ addons/ Helm + Kustomize add-on configs per flavor
    β”‚ β”œβ”€β”€ networking/ Cilium, Istio, Gateway API, MetalLB
    β”‚ β”œβ”€β”€ storage/ CSI drivers, Longhorn, Rook-Ceph, Velero
    β”‚ β”œβ”€β”€ monitoring/ Prometheus stack, Grafana, Loki, OTel
    β”‚ β”œβ”€β”€ security/ OPA, Kyverno, Falco, Trivy, cert-manager
    β”‚ └── gpu/ GPU Operator, Network Operator, DCGM
    β”‚
    β”œβ”€β”€ ai-platform/ Nvidia NIM, Triton, vLLM, KServe
    β”‚ β”œβ”€β”€ nim/ NIM deployment manifests + model config
    β”‚ β”œβ”€β”€ triton/ Triton server + model repository config
    β”‚ β”œβ”€β”€ vllm/ vLLM deployment + quantisation config
    β”‚ └── kserve/ InferenceService + ServingRuntime CRDs
    β”‚
    β”œβ”€β”€ nemo/ NemoClaw agent framework workloads
    β”‚ β”œβ”€β”€ agents/ Agent Supervisor, tool registry, ReAct config
    β”‚ β”œβ”€β”€ guardrails/ NeMo GuardRails config + clinical policies
    β”‚ β”œβ”€β”€ milvus/ Milvus vector DB + embedding pipeline
    β”‚ └── redis/ Redis cluster for short-term agent memory
    β”‚
    β”œβ”€β”€ clinical/ PHI-scoped healthcare workloads
    β”‚ β”œβ”€β”€ fhir/ Hapi FHIR R4 server + PostgreSQL
    β”‚ β”œβ”€β”€ hl7/ HL7 v2 broker + FHIR Converter
    β”‚ └── deid/ De-identification pipeline + token store
    β”‚
    β”œβ”€β”€ gitops/ ArgoCD App of Apps bootstrap
    β”‚ β”œβ”€β”€ bootstrap/ ArgoCD self-install + root app
    β”‚ β”œβ”€β”€ platform-appset.yaml Deploys addons to all clusters
    β”‚ β”œβ”€β”€ ai-appset.yaml Deploys AI platform (gpu=true selector)
    β”‚ └── clinical-appset.yaml PHI workloads (compliance=hipaa selector)
    β”‚
    └── terraform/ Cloud prerequisites only (VPC, IAM, KMS)
    β”œβ”€β”€ modules/ eks-prereqs, aks-prereqs, gke-prereqs
    └── environments/ dev / staging / prod tfvars
    Key convention β€” each addons/<flavor>/ directory holds a Kustomize base shared with addons/common/ and applies flavor-specific patches. The ArgoCD ApplicationSet resolves {{metadata.labels.flavor}} at sync time so a single ApplicationSet serves all 6 cluster flavors from one template.

    Safety & Guardrails for Clinical AI

    Workloads deployed inside the clinical-apps and clinical-data namespaces must implement strict boundary parameters using K8s native admission policies and service meshes:

    1. Cilium Network Policy β€” Clinical Data Namespace Isolation

    Enforces strict zero-trust isolation on the clinical-data namespace, preventing arbitrary traffic ingress and egress.

    apiVersion: cilium.io/v2
    kind: CiliumNetworkPolicy
    metadata:
      name: clinical-data-isolation
      namespace: clinical-data
    spec:
      endpointSelector: {}
      ingress:
      - fromEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: nemo-agents
        toPorts:
        - ports:
          - port: "8080"
            protocol: TCP
          rules:
            http:
            - method: GET
              path: /fhir/r4/.*
      - fromEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: clinical-apps
      - fromEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: monitoring
        toPorts:
        - ports:
          - port: "9090"
      egress:
      - toEndpoints:
        - matchLabels:
            io.kubernetes.pod.namespace: kube-system
            k8s-app: kube-dns
        toPorts:
        - ports:
          - port: "53"
            protocol: UDP
    ---
    apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
      name: default-deny-all
      namespace: clinical-data
    spec:
      podSelector: {}
      policyTypes:
      - Ingress
      - Egress
    

    2. Istio PeerAuthentication & AuthorizationPolicy

    Enforces strict mTLS in-transit encryption and explicitly validates SPIFFE identities.

    apiVersion: security.istio.io/v1beta1
    kind: PeerAuthentication
    metadata:
      name: clinical-data-mtls-strict
      namespace: clinical-data
    spec:
      mtls:
        mode: STRICT
    ---
    apiVersion: security.istio.io/v1beta1
    kind: AuthorizationPolicy
    metadata:
      name: fhir-server-allow
      namespace: clinical-data
    spec:
      selector:
        matchLabels:
          app: hapi-fhir
      action: ALLOW
      rules:
      - from:
        - source:
            principals:
            - "cluster.local/ns/nemo-agents/sa/drug-interaction-agent"
            - "cluster.local/ns/nemo-agents/sa/diagnostic-agent"
            - "cluster.local/ns/nemo-agents/sa/radiology-agent"
            - "cluster.local/ns/clinical-apps/sa/clinician-app"
        to:
        - operation:
            methods: ["GET"]
            paths: ["/fhir/r4/*"]
        when:
        - key: request.auth.claims[aud]
          values: ["fhir-server"]
    

    3. Istio Egress Gateway for External Tool APIs

    Forces all external agent requests through a centralized, audited egress gateway.

    apiVersion: networking.istio.io/v1alpha3
    kind: ServiceEntry
    metadata:
      name: drugbank-external
      namespace: nemo-agents
    spec:
      hosts:
      - api.drugbank.com
      ports:
      - number: 443
        name: https
        protocol: HTTPS
      location: MESH_EXTERNAL
      resolution: DNS
    ---
    apiVersion: networking.istio.io/v1alpha3
    kind: VirtualService
    metadata:
      name: nemo-agents-egress
      namespace: nemo-agents
    spec:
      hosts:
      - api.drugbank.com
      - api.fda.gov
      tls:
      - match:
        - port: 443
        route:
        - destination:
            host: istio-egressgateway.istio-system.svc.cluster.local
    

    Interactive Tools

    Practical tools to help you think systematically, build better AI agents, and master prompt engineering.

    Software Engineering Playbooks

    Practical, End-to-End implementation guides for building Production-ready Software. Each playbook includes working code, architecture diagrams, and step-by-step instructions.

    πŸ€–

    Research Agent with Gateway

    Build a production-ready AI research agent using Agent Gateway for unified traffic management, authentication, and observability across LLM providers.

    Agent Gateway A2A Protocol Multi-Agent
    πŸ”—

    RAG Pipeline with Vector Database

    Implement a complete Retrieval-Augmented Generation pipeline with vector embeddings, semantic search, and context injection for accurate AI responses.

    RAG Vector DB Embeddings
    πŸ”„

    Multi-Agent Orchestration

    Create a coordinated multi-agent system with specialized agents, task distribution, and result synthesis for complex problem-solving.

    Orchestration Task Distribution Synthesis
    1 / 2

    Future References

    Explore these resources for deeper learning on AI agent development, spec-driven development, and prompt engineering tools.

    Spec-Driven Development

    Comprehensive guide on Spec-Driven Development practices and methodologies.

    Awesome Copilot

    Curated list of GitHub Copilot resources, extensions, and best practices.

    Promptfoo

    Tool for testing, evaluating, and improving LLM prompts and applications.

    Prompts.chat

    Collection of prompt engineering resources and templates.

    Agent Skills

    Agent skills resources and documentation for building AI agent skills.

    Awesome Skills

    Curated list of awesome skill repositories and collections.

    Agent Skills Topic

    GitHub topic for discovering agent-related skills and repositories.

    AI Agent Topic

    Trendshift topic for discovering AI agents.

    AI Skills Topic

    Trendshift topic for discovering AI skills.

    Agent Governance Toolkit

    Agent governance toolkit.

    Pattern Sources

    Our patterns are curated from industry-leading sources with proper attribution and licensing compliance.

    Refactoring.Guru

    Classic GoF design patterns, code smells catalog, and refactoring techniques (https://refactoring.guru).

    Enterprise Integration Patterns

    65 messaging patterns for integrating enterprise applications by Gregor Hohpe and Bobby Woolf (CC BY 4.0).

    Microservices.io

    Comprehensive patterns for microservice architectures by Chris Richardson.

    Agent Catalog Patterns

    Patterns for agentic systems from agentpatternscatalog.org (CC BY 4.0).

    OWASP Foundation

    Security patterns from OWASP Top 10 for Web Applications, LLM Applications, and Agentic Applications (CC BY-SA 4.0).

    Industry Research

    ML/AI patterns from Microsoft, Google, Anthropic, and academic research.

    AI Agent Patterns

    Spec-driven development patterns from Claude, Gemini, OpenAI, and GitHub Copilot on github/spec-kit and OpenSpec.

    Data Engineering Leaders

    Data platform patterns from Martin Fowler (Data Mesh), Kimball Group (Dimensional Modeling), and cloud providers.

    MLOps Best Practices

    Data science patterns from MLflow, Great Expectations, and MLOps practitioners.

    Streaming & Analytics

    Real-time patterns from Confluent/Kafka, Apache projects, and serverless analytics platforms.

    Academic Papers

    Rigorous ML patterns from peer-reviewed research including data leakage prevention and active learning.

    5-Day AI Agents Course

    Intensive Vibe Coding Course With Google by Brenda Flynn et al. (2026) on Kaggle.

    The Agent Loop

    Foundational Agent Definition (Perceive + Act):
    Russell, S. J., & Norvig, P. (1995). Artificial Intelligence: A Modern Approach. Prentice Hall. (Current edition: 4th Ed., Pearson, 2020)

    Modern Iterative LLM Agent Loop:
    Yao, S., Zhao, J., Yu, D., et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models. arXiv:2210.03629.

    Historical Context:
    Incorporating AIMA's perceive/act model, Classical robotics' Sense-Plan-Act loop (Brooks, 1986), and ReAct's Thought→Action→Observation cycle.