Skip to content

Review an agent's trust boundaries

Trace data and authority through an agent and identify defensive tests for the exposed boundaries.

Scenario

A grants portal prepares public award summaries. It reads applicant attachments and scoped grant records, remembers editorial preferences and returns drafts to reviewers. A proposed update lets it send drafts directly to a publishing queue.

Explanation

Draw the boundaries for untrusted input, private reads, state writes and external outputs. Combining untrusted input, private access and outbound communication raises the stakes of any model error. Put external documents and tool results in tool_result blocks, JSON-encoded where possible. Restrict access in the tool handler and validate outbound content and destination separately.

Treat tool descriptions and memory as integrity boundaries. Use approved MCP servers, scoped credentials and reviewed schema changes. Let durable memory accept only authorized writes, with provenance and review where the data changes future behavior. Use OWASP's Top 10 to prompt threat questions about areas such as injection and excessive agency. Use the NIST AI RMF and its Generative AI Profile to assign responsibility and record how the team measures and manages identified risks.

Test controls with inert fixtures and no external side effects. Include one permitted case for each denial case so you can measure false blocks. Inspect the action and the logged control decision, rather than inferring enforcement from model text.

Worked example

The grants team maps four paths before enabling the live queue.

Path Control
Attachment → agent Treat the attachment as untrusted data.
Private record → agent Verify the caller can read this grant.
Agent → editorial memory Require an authorized update with provenance.
Agent → review or publishing queue Enforce the draft's classification and approval.

The team tests with a private marker in a mock record. An approved public summary reaches the sandbox queue. A restricted draft goes to review, and an unapproved preference update leaves memory unchanged. Each result verifies one boundary without sending anything to a live destination.