多個 AI 智能體如何安全共享交易結果
How Multiple AI Agents Can Safely Share Transaction Outcomes
文章説明多個 AI 智能體如何透過具範圍、可撤銷的委派,讓替代智能體安全取回已完成交易的結果,而不交出原智能體憑證。授權只限單一承諾的 `result_retrieve` 讀取操作,且每次存取均檢查有效期及撤銷狀態。作者以三個不同主體進行本地驗證,未授權或條件不符的請求均遭拒;兩個獲授權工作者並行恢復時,只有一個權威結果,沒有重複財務效果。
How Multiple AI Agents Can Safely Share Transaction Outcomes
December 1, 2026
An agent creates a commitment, executes a transaction, and disappears. The work is done, the result is durable — but the only worker who knew about it is gone. Can a different agent take over? The answer must be yes, safely — or the commercial outcome dies with the original worker.
This article explains the difference between sharing credentials (dangerous) and delegating scoped authority (safe), and describes an implemented, locally verified model for replacement-agent recovery.
The wrong way: shared credentials
The simplest "handoff" is to give the replacement agent the original agent's keys. It works until it doesn't:
- The replacement now has full authority, including capabilities the recovery never needed.
- Nothing distinguishes "recovering a result" from "executing a new payment."
- Revocation is impossible — once keys are shared, they are shared.
- Audit trails record one actor for every action, hiding who actually acted.
Shared credentials are impersonation, not delegation.
The right way: scoped, revocable delegation
Delegated recovery has distinct properties:
- Distinct principals. The replacement authenticates as itself, with its own signer and its own proof of identity. It never pretends to be the original.
- Explicit authorization. A durable authorization record names the replacement, the commitment, the operation it may perform, and the authority domain.
- Commitment-scoped. The grant covers one commitment, not a fleet.
-
Operation-specific. The grant covers exactly the recovery operation (here:
result_retrieve), not settlement, not evidence modification, not execution. - Time-limited and revocable. Expiry and revocation are enforced on every access attempt.
- Ownership preserved. The original buyer, seller, and commitment ownership never change because a replacement read the result.
The key sentence: authorization to retrieve a result is not authorization to execute, settle, or modify. Delegated recovery is a read path with strict bounds.
What happens at recovery
- The original agent terminates.
- A replacement agent starts in a fresh process — distinct credentials, no checkpoint, no shared memory.
- It authenticates independently and presents its delegation record.
- The system verifies: active grant? correct commitment? correct operation? correct domain? not expired? not revoked?
- It retrieves the authoritative result — original or canonical, with source labeled.
- Unauthorized agents — including agents with no grant, wrong commitment, wrong domain, or revoked/expired grants — are rejected without exposing the result.
The original commitment ownership is untouched by any of this.
What was verified
Local, disposable verification with three distinct principals:
| Scenario | Result |
|---|---|
| Authorized replacement retrieves the original result | Pass — actual MCP call, hash-verified |
| Unauthorized agent attempts retrieval | Rejected; no result payload exposed |
| Expired delegation | Rejected |
| Revoked delegation (after a successful retrieval) | Rejected |
| Wrong commitment | Rejected |
| Wrong authority domain / principal substitution | Rejected |
| Concurrent recovery by two authorized workers | One authoritative outcome; zero duplicate financial effects |
| Repeated delegated retrieval | No state change, no duplicate events |
Every protected request was auditable: original owner, replacement requester, grantor, grant scope, and outcome are distinguishable in the record.
Takeaway
- Never "hand off" by handing over credentials. Authenticate the replacement as itself.
- Make delegation explicit, scoped, expiring, and revocable, enforced from an authoritative store — not from a caller-supplied claim.
- Keep delegated access read-only where the task is recovery. Retrieving a result is not the same as owning the transaction.
SAAX — Trust. Durability. Recovery.
來源:DEV Community · dev.to