Skip to content
mentoor

Topic 5 of 5 · 4 min read

Agent design rules: the Rule of Two

Goal: Review an agent design against the Rule of Two and flag every session where all three capabilities meet.

The Rule of Two says an agent session should have at most two of three properties unless a human approves the risky step: it processes untrustworthy input, it can access private data or sensitive systems, and it can change state or communicate externally. Meta published it in 2025 as a practical version of the trifecta for agent builders.

Check yourself · 1 of 3

Under the Rule of Two, how many of the three properties may a session have without human approval?

Choose one answer

Why it matters

A rule you can check in a design review beats a general worry. It turns "is this agent safe?" into a short audit with a yes or no for each session. It also makes the trade-off visible: each agent picks the pair it needs and gives up the third, or adds a person at the point where all three would meet.

How to apply it

  1. List sessions. A session is one run of the agent with its tools and data. A product may have many, such as a reader, a planner and an actor.
  2. Mark each session with the three properties (the same legs as the trifecta, with outbound communication widened to any state change).
  3. Count. Two or fewer is acceptable by design. Three means redesign, or require human approval for the actions that complete the third property.
  4. Check the approvals. A person must see the real action and its content, and the approval must be needed every time, not remembered.

When users build their own tool sets

Platforms let users connect tools and servers. No one reviewed the combination. Make the check run in the platform: when a user adds a tool, compute the session's legs and warn or block when the third arrives. Treat any third-party tool server as untrusted content, since its tool descriptions are text the model reads. The MCP security guidance covers consent and token handling for these servers.

Before and after

Before: "Agent: reads shared docs from any customer, queries the billing database, calls any webhook the customer configures. Reviewed: yes, it has a good system prompt."

After: "Session check: untrusted input (customer docs), private data (billing), outbound (webhooks). Three of three. We move billing lookups to a separate session with no docs and no webhooks, and webhooks require manager approval."

What goes wrong

  • Teams review the agent once, then users add tools that complete the third property.
  • Teams count approvals that people click through without reading.
  • Teams label a property as "low risk" and stop counting it, when a determined attacker only needs a little data.

Examples

A design review in three lines

Session A, support reader: untrusted input yes, private data no, state change no. One of three, fine. Session B, billing helper: private data yes, others no. Fine. Session C, merged agent: all three. Fails the rule until split or gated.

Tool added by a user

A customer connects a third-party calendar server to an agent that already reads private mail and can send mail. The server's tool text is untrusted, mail is private and sending is outbound. The platform should warn at connection time and require approval for sending.

Key points

  • The Rule of Two allows at most two of three properties per session without human approval.
  • Check sessions one by one, since one product can run several with different tools.
  • Human approval counts only when the person sees the real action and content each time.
  • When users add their own tools, the platform must recheck the session's legs.
  • Third-party tool servers and their descriptions are untrusted content.

Common mistakes

  • Reviewing once and never rechecking when tools change.
  • Counting a click-through approval as a real control.
  • Ignoring tool descriptions from third-party servers as a source of untrusted text.
  • Dropping a property from the count because the data seems minor.

Check yourself · 2 of 3

A user adds a third-party tool server to an agent that already reads private mail and can send mail. What should the platform do?

Choose one answer

Check yourself · 3 of 3

A review shows one agent session with web browsing, a customer database and a Slack-post tool. What is the correct finding?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic