terminal / blog

Agent Tool Call Access Events in Healthcare Environments

October 21, 2026 · ai · infrastructure

HIPAA in the AI Era

Workflows are changing drastically in the agentic AI era. Even with this new technology, organizations are still responsible for adhering to the required security rule of HIPAA. This can be a confusing compliance puzzle for officers intent on providing leading edge technologies to users operating in regulated environments, but can be achieved by contextualizing the problem in the ways we’ve used access controls for many years now. Framing the user as the subject from which the actor chain is initialized and roles within an environment are assumed.

We need to answer three questions:

  1. Who was the human user who initialized the data access/agentic action?
  2. What acted? (the agent, the service outlined in the MCP server)
  3. What caused this specific access? (The prompt log)

Here is what needs to happen per traced event to answer all three:

  1. The user authenticates using the orgs identity provider
  2. When the agent calls a tool from the MCP client to the MCP server (with or without explicit intent from the user) the user's authentication token is exchanged for a short-lived down-scoped token. This creates an explicit delineation between the subject (the user) and the actor (the agent) that we can log with the answers to questions 1 and 2. This can even be nested so that the actor claims can extend to sub-agents in specific workflows.
  3. The MCP server authorizes as the user, so it can never exceed the scope of the user’s permissions and access data not meant for that user to engage with.
  4. There is a common trace ID that logs all the hops in the traced event connecting logs in a manifest.

By simply using the same logic we use in environments to have users assume a role to complete specific actions, we’ve created a traced event that meets the security rule requirements of HIPAA while using agentic AI. The existing analog is AWS’ Security Token Service that allows a user to assume a role that can be traced as a CloudTrail event.

What a logged access event looks like in practice:

{
  "event": "phi.read",
  "timestamp": "2026-10-20T22:14:03Z",
  "subject": "clinician:jdoe@org",            // accountable human
  "actor_chain": ["agent:chart-assistant", "mcp:patient-records"],
  "on_behalf_of_auth": "token-exchange",
  "trace_id": "7f3c…",                         // joins to session, prompt, model turn
  "tool": "get_patient_record",
  "patient_id": "4471",
  "resources_returned": ["labs:2026-09", "meds:active"],
  "purpose": "treatment",
  "encounter_id": "E-90211",
  "initiation": "user_requested",              // vs agent_inferred
  "prompt_ref": "audit-store://prompts/7f3c…/turn-4"
}

Not only can we see who accessed data and when, but we can also see what they accessed by referencing the resources returned as part of the agent's response/actions. We can determine if the user intended to query a confidential data-set or if the agent returned information by inferring the intention of the user. Lastly, this log can reference the prompt if the model is using AWS Bedrock with model invocation logging.

Oftentimes, it helps to frame the agent as an actor in these environments that can non-deterministically query confidential data on the users behalf just like a human could with inadequate communication. What matters is the intention of the user, and the appropriate access controls that govern all actors in the access event.