Preventing PHI leakage between Google ADK sub-agents and agent transfers
To prevent PHI leakage between Google ADK sub-agents, define which PHI each agent and tool may receive, and treat every transfer, shared state entry, tool call, and sub-agent return as a boundary. Limit exposure in design through context scoping, minimal state sharing, and least-privilege tools. Enforce the rule at runtime with allow, redact, and block decisions, because prompt instructions alone do not constrain what crosses a boundary. Keep a record of each decision as audit evidence.
Which controls belong in code and which in policy
Context scoping on transfer
Application code decides what task description a sub-agent should receive. Runtime policy checks what is actually sent.
Session state layout
Application code decides what is stored and under which keys. Runtime policy can block or redact PHI headed for an agent that should not see it.
Tool access
Application code assigns tools to agents. Runtime policy enforces per-call rules on arguments and results.
Sub-agent outputs
Application code shapes response formats. Runtime policy inspects what returns to the parent.
Decision records
Code can write its own records. Enforcement in the path produces them consistently for every decision.
The boundaries that matter
A multi-agent system built with Google ADK usually has a parent agent that routes work to specialized sub-agents, some of which call tools or other agents. PHI that one agent legitimately needs, such as a patient identifier for a scheduling lookup, should not automatically be visible to a billing-code agent or a general knowledge agent. The first implementation task is to enumerate the places where content moves between components.
Four paths account for most of the exposure in healthcare designs. Conversation history and context can move to a sub-agent when control is transferred. Shared session state can hold values written by one agent and read by another. Tool call arguments and results carry PHI to and from external systems. Sub-agent outputs return to a parent agent and may contain more detail than the parent needs.
Each path is a place where a receiving component gains access to content. Prompt instructions such as "do not repeat patient details" ask a model to behave, but they do not stop the content from being delivered. The control has to act on what is delivered, not on what the model is told to do with it.
Design-time mitigations in the agent architecture
Design choices reduce how much PHI is available to leak before any enforcement runs. Three are worth applying to every ADK build.
Scope the context. Decide what a sub-agent receives when it takes over a task, and prefer a narrow task description over a full conversation. If a sub-agent only needs a medication name, it should not receive the full encounter narrative. Where a sub-agent is invoked as a tool, the same principle applies to the input you construct for it.
Share minimal state. Treat session state as a shared surface. Store identifiers or references rather than full clinical content where the design allows, and avoid writing PHI into state that agents with unrelated roles can read. Name and organize state keys so that the owner and intended reader of each value are clear.
Grant tools by role. Give each agent only the tools its task requires, and make each tool accept the narrowest arguments that work. A tool that returns an entire patient record to an agent that needs one field creates a leak path through the result.
ADK callbacks that run before and after model calls and before and after tool calls give application code a place to inspect or modify content at these points. They are useful, but they carry limits. They are code you write and attach agent by agent, so a missed or misconfigured attachment leaves a gap. Detection logic for PHI is imperfect, and a callback that edits content does not by itself produce a consistent, reviewable record of what it decided.
What HIPAA provisions apply
The HIPAA Security Rule sets national standards for protecting electronic PHI that a covered entity or business associate creates, receives, uses, or maintains. Subpart C requires policies and procedures so that workforce members have appropriate access to ePHI and so that those without access cannot obtain it. Section 164.514 requires a covered entity to identify the persons or classes of persons in its workforce who need access to PHI to do their jobs. Whether an AI agent is treated as workforce is not settled by that text, so applying it to agents is an interpretation. As a design discipline, it maps well: a per-agent access matrix that names the PHI classes each agent and tool may receive.
Subpart E limits use and disclosure of PHI to what the rule permits, and its business associate provisions require appropriate safeguards. If a sub-agent, model, or tool is operated by a third party that handles PHI, review those contract requirements with counsel. The matrix should also feed your documented risk analysis, which 164.308(a)(1)(ii)(A) requires for risks to the confidentiality, integrity, and availability of ePHI.
Section 164.312 covers technical safeguards, and audit controls appear at 164.312(b). In practice, reviewers will want to see what PHI moved between agents and tools and what the system did about it. A record of each allow, redact, or block decision at a boundary gives you that evidence. A HHS proposal to strengthen the Security Rule was published in January 2025; as of November 2026, treat the current eCFR text as governing and confirm status before relying on any change.
Runtime enforcement and evidence with Trussed
Trussed enforces policy in the execution path, at individual interactions and tool calls. When a sub-agent receives content or a tool is invoked, the policy decides to allow, redact, or block, and that decision is enforced at runtime, not reviewed after the fact. The same enforcement generates audit-ready evidence mapped to HIPAA, including 164.312(b) audit controls. Trussed runs in production with healthcare and pharma organizations and can be deployed self-managed in the customer cloud, with configurable retention and data residency.
The scope is deliberate. Decisions are recorded per interaction and tool call. Trussed does not provide end-to-end tracing of agentic workflows or transaction-level governance across agents, so your architecture review and access matrix still define what each agent should be able to see. The value of enforcement in the path is that the matrix is applied uniformly and each outcome leaves evidence.
Where PHI can cross a Google ADK agent boundary
Label: Agent transfer
Description: Conversation history and context handed to the receiving sub-agent.
Label: Shared session state
Description: Values written by one agent and readable by others.
Label: Tool arguments and results
Description: PHI sent to a tool and PHI returned from it.
Label: Sub-agent output
Description: Responses returned to a parent agent that may not need the detail.
Label: Runtime decision
Description: Allow, redact, or block, recorded as evidence.
Review your agent boundaries against enforceable policy
Talk through your Google ADK architecture, the PHI that crosses each boundary, and how allow, redact, and block decisions produce audit-ready evidence.
Talk to an Expert