Repository navigation
Proposal: AMEP evidence extension (signed effect receipts for tool calls) - #31
stafordtituss wants to merge 2 commits into
Conversation
vendrell46
left a comment
There was a problem hiding this comment.
Reviewing from the payments side, since the Motivation and the 20 Nov call both name financial services as an early audience. Checked against 46e3c72 and AMEP at 2e89e84.
1. A financial receipt can't say how much was paid. The receipt's executed block has no amount, and the proposal doesn't say where one goes. AMEP's payment vectors (interop/approval-path-attacks) carry it in x-args, with the payee as the resource, and that README asks (question 3) whether a monetary threshold should be a profile. I think a payments server needs that answered before it can use the extension, for two reasons:
- Without an approval, nothing in the evidence bounds the amount. I rebuilt the packet of
small-payment-within-budget-needs-no-approvalwith the amount changed from 84.10 to 840000.00 EUR, and AMEP's Python verifier still sayspreserved. The other way round, two payments of 0.50 EUR under the samebudget: 100come outviolated(I2), like the suite's 2 × 600.00 split, because each irreversible payment costs 60 points whatever it moves. x-argscan't carry a limit. Spec §16 says extensions MUST NOT change outcomes, and each server picks its own member names inside it. So two servers' receipts for the same payment can't be compared, which is the problem the Motivation sets out to fix.
What would close it: for financial effects, one defined member with the amount as a decimal string and its asset (an ISO 4217 code, or a CAIP-19 id for a token), keeping the payee in resource. A mandate could then carry a cap in that asset, per call and per period, and I2 could keep a running total the way §9.2 does for points. Whether that lives in this extension or in an AMEP profile it points to is your call, but the extension should say where a payments server puts the amount.
2. Amounts as strings. Requirement 4 keeps numbers inside the I-JSON safe range but leaves out AMEP §12.1's advice that amounts SHOULD be strings. It's worth carrying over: a server that writes a token amount in base units as a JSON number passes 2^53 at about 0.009 of an 18-decimal token, and the verifier then marks every invocation in the packet unresolved (I7; checked with 10 tokens).
If useful, I can add must-reject vectors in the suite's format once the shape is settled: payments that each fit a per-call cap but together cross a period cap, one payment over the cap with no approval, and an amount with no asset, which should come out unresolved rather than preserved.
AI use: Claude Code wrote this comment on my behalf from the proposal and the AMEP repo, and ran the checks above with AMEP's Python verifier.
This adds a draft Extensions Track proposal for
io.github.stafordtituss/amep-evidence, an optional extension that lets tool servers return signed receipts of the effects they actually executed, in thetools/callresult's_meta. An auditor can then verify afterwards, without trusting the agent or its host, whether each effect stayed within the authority the user delegated._meta: no new methods, no change to result content. Off unless both sides opt in.initialize, and2026-07-28withserver/discoverand per-request capabilities.#agents-wg.The TypeScript implementation follows in a separate PR to
packages/, ported to the{ id, setup(ctx) }extension API from modelcontextprotocol/typescript-sdk#2820 once that's released.Feedback is very welcome, especially on the open questions at the end of the proposal.