CarolineDocs

Govern AI agents / Acting for a person

Acting for a person

When an agent works for someone, it may do only what that person may do, and only what the agent itself may do. Caroline decides both and allows the call only when both say yes.

Name the person

The gateway puts the person in context.on_behalf_of, taken from the session that started the agent, never from the model:

{
  "subject":  {"type": "agent", "id": "a_support_bot"},
  "action":   {"name": "issue"},
  "resource": {"type": "refund", "id": "r_refund_mid"},
  "context":  {"on_behalf_of": "u_rep_ana"}
}

Both sides decide

The agent's sideIts own rulesas the agent, with the whole context
The person's sideThe same rulesas if the person had asked themselves
The answerYes only if botha deny on either side refuses

The answer says why

OutcomeReason, as Caroline gives it
allowallowed by [agent-refund-within-limit], acting for u_rep_ana (allowed by [rep-refund-within-limit])
denydenied: acting for u_rep_ben, who has no matching allow rule
denydenied: acting for u_rep_ben, who is refused by [deny-suspended]
denydenied: on_behalf_of does not name a person the PIP holds

Decisions shows "for ..." beside the agent, and the Policy Tester shows what the person's own rules said.

Agents that must not act alone

Set delegation: required on an agent's record and every call that names no person is refused (delegation_required). Use it for any agent that works inside someone's session; leave it optional for a batch agent that works for the business.

What the gateway must get right

Caroline can only judge the person it is told about. The gateway must take on_behalf_of from the authenticated session (in the MCP reference gateway, the X-On-Behalf-Of header the agent's runtime sets) and never from the tool call's arguments.

The person fixed by the key

Or let the agent's key say it. An agent's key can be issued for one person: Caroline then writes context.on_behalf_of from the key, and refuses a request that names anyone else with 403 person_mismatch, before the engine. The gateway sends no person at all.

A connection can take the person from the key only: Fix the person by the key on its card in Keys. From then on a call there needs a proven agent key, and names a person only with a key issued for that person; anything else is 403 person_not_proven. Give out the keys first. Accept a named person takes the claimed person again, and waits for another person's countersign. A connection whose connector holds the system's own credential always takes the person from the key.

Caroline DocsAuthZEN 1.0 · OPA