Poppy LabTry the live demoLive demo

Approvals with Operations

The Operations extension (version 3) answers one question: how does a Company know the user agreed to this exact change, when the request comes from an agent? Instead of performing the change, the Company answers with its exact terms and waits for an approval of them.

The life of an operation

The user Personal Agent Company 1 · Request the change 2 · approval_required, with the terms and a revision Waiting for approval of this revision 3 · The user approves these terms 4 · The same request, with the approval If the terms still match 5 · The change is made once, or declined If the terms have changed 5 · A new revision; the old approval no longer applies User Agent Company 1 · Request the change 2 · approval_required, with the terms and a revision Waiting for approval of this revision 3 · The user approves these terms 4 · The same request, with the approval If the terms still match 5 · The change is made once, or declined If the terms have changed 5 · A new revision; the old approval no longer applies
A request, an answer that holds the terms, an approval of exactly those terms, and a change made once.

Advertising the extension

A Company lists the extension in poppy.json:

"extensions": { "operations": [{ "version": "3" }] }

and an agent that supports it declares it on each request:

Poppy-Extensions: "operations";v="3"

A change attempted without it is refused with 403 {"error": "extension_required", "extension": "operations"}, so an agent that can't show the user an approval can't trigger a change. An agent declares the extension only where it can show one.

What an operation holds

{  "operation_id": "op_xs9hiC1D6rgUPCI-CV-jEARy",  "revision": "1795602001-9J3BYg4QmZBKbSiM",  "summary": "Refund 1 × Pork gyoza (6) (USD 8.00) missing from order ord_LNB0907, …",  "terms": {    "order_id": "ord_LNB0907",    "dish_id": "pork-gyoza",    "quantity": 1,    "refund_cents": 800,    "currency": "USD"  },  "expires_at": "2026-11-25T10:30:01.660Z"}
  1. operation_id is the action. It stays the same when the terms change.
  2. revision is these terms. Any change to the terms or the expiry means a new revision.
  3. summary is the terms in plain language, optional: bold, italics and lists, never links or images.
  4. terms is everything that affects the action, as data the agent can check and show.
  5. expires_at is the last moment an approval of this revision counts.

The Company performs only what the approved revision describes, so anything missing from terms isn't part of the deal.

The same operation in every interface

Every interface carries the same operation (Operations §4):

InterfaceThe Company asks withThe agent approves with
API403 {"error": "approval_required", "operation": {…}} (example)the identical request with a Poppy-Approval header
MCPan error tool result (isError), with the operation in structuredContentthe identical tool call with the approval in _meta under personalagentprotocol.org/approval
Conversationa Company message with extensions.operations.operation (example)a message with extensions.operations.approval
Website403 with a Poppy-Operation header naming the Session and a referencea request to the extension's endpoint, never through the browser; then the browser repeats the action

Who approves

Approval comes in two kinds (Operations §5):

  • User approved. The agent shows the user the Company's name and the terms, and takes the answer through its own interface; in Iris, a card with the Company's verified domain and a button. A Company message saying "the user agreed" is never an approval; neither is the model deciding the user would agree.
  • Agent approved. The agent approves on an instruction the user gave it, such as "any exchange under $20 is fine". The instruction must come from the user, not from anything the agent read. When the agent can't tell whether the terms fit, or the Company returns a new revision, the user decides.
Company sends the terms Personal Agent approves, or asks the user The user sees the Company's name and the terms Agent approved on the user's instruction User approved in the agent's own interface the terms not covered, can't tell, or a new revision code finds the exact terms in the instruction An instruction the user wrote not from anything the agent read The user approves Never an approval A Company message saying the user agreed The model deciding the user would agree Company sends the terms Agent approves, or asks the user Agent approved on the user's instruction The user sees the Company's name and the terms User approved in the agent's own interface the terms An instruction the user wrote not from anything the agent read code finds the exact terms inside it not covered, can't tell, or a new revision The user approves Never an approval A Company message saying the user agreed The model deciding the user would agree
An approval comes from the user in the agent's own interface, or from the agent on an instruction the user wrote.

Either way, the agent checks that terms agree with what was asked for and with the summary. The Company writes both, so a summary could describe something the terms don't.

In Iris, an agent approval comes from a standing instruction for one Company. Code, never the model, checks it against the exact terms: an amount over the limit (fees included), a refund, another currency or a disagreeing summary goes to the user. The server checks again with its own copy of the operation and holds its own limits, five approvals an hour and three times the limit in total, so a tampered browser can't stretch a rule. The approval goes out as approver="agent", without input_type, and its reference is an entry in a ledger the user sees next to the instruction.

What an approval carries

At an API, the approval is a header on the identical request:

Poppy-Approval: operation_id="op_xs9hiC1D6rgUPCI-CV-jEARy", revision="1795602001-9J3BYg4QmZBKbSiM", approver="user", approved_at=1795600000, input_type="tap", reference="apr_01JD8ZK3Q9"
MemberMeaning
approveruser or agent
approved_atWhen it was given, in seconds
input_typeFor a user approval, how, such as tap
referenceThe agent's own record, for the Company's support staff

The agent keeps the approval with the operation. The Company records approver, input_type and reference with the change, and can stop accepting a misbehaving agent.

What the Company checks

After the usual Session and token checks, the Company checks that:

  1. the Session can approve this operation;
  2. it hasn't been performed already, and if it has, it answers with the original result;
  3. the revision is one it issued, hasn't expired, and the request asks for exactly what that revision describes.

If the third check fails, it performs nothing and returns the operation with a revision for what the request asks now, never the one the approval named, so the agent can't loop on a stale approval.

Proposed waiting for approval Made once the change is performed Declined by the Company approval_declined final for that approval A new revision the old approval no longer applies Declined in the agent the Company is not told Expired nothing was done; it can't be approved late or the agent, on an instruction the user gave it The user approves then the Company checks the approval terms still match Company declines terms changed The user declines the time runs out waits until it expires Proposed waiting for approval of this revision Made once the change is performed Declined by the Company approval_declined final for that approval A new revision the old approval no longer applies Declined in the agent the Company is not told Expired nothing was done; it can't be approved late The user approves or the agent, on an instruction the user gave it then the Company checks the approval terms still match Company declines terms changed The user declines the time runs out waits until it expires
A proposal ends with the change made once or with nothing done, and the Company checks each approval first.

Declines

A Company may refuse a valid approval for its own reasons. It answers 403 {"error": "approval_declined"} with the operation ID and revision, an optional reason in plain language and an optional alternative, such as a page where the user can do it themselves. The extension has no reason codes: an agent does the same whatever the reason, and codes would reveal the Company's risk rules.

A decline is final for that approval. The agent shows it to the user and doesn't resend it.

The lab's bank, Harborline, declines every agent approval that moves money: "Harborline moves money only when you approve it yourself." The user can then approve the same revision themselves, and Harborline performs it. A decline lets a Company accept agents for some actions and insist on the person for others.

Retries and at most once

Networks fail after the work is done. The agent resends the identical request with the identical approval, and the Company answers with the original result instead of acting twice (Operations §7). For that to hold:

  • the Company records the result before replying;
  • the agent never proposes the change again to "check" whether it happened.

It must also hold across a failure: when the connection is cut after an order is saved and the Company is rebuilt from its store, the resent approval still gets the original response and the store holds one order.

What an approval proves, and what it doesn't

An approval proves that a specific agent, in a specific Session, and with an access token for the account when signed in, stated that a specific revision was approved, by the user or on their instruction. It doesn't prove what happened on the user's screen: the Company relies on the agent for that.

A Company that must see the user confirm for itself, as when closing an account, can skip operations and have the user confirm on its website or app, signed in.

Go deeper