Step 1: the action envelope (AEE)
Before the refund ever reached a payment API, the agent's action was captured as an envelope, not a log line. An envelope is a structured message: it names the actor, the action, the target, and, critically, what caused it, so a chain of related actions can be reconstructed later rather than guessed at.
Illustrative envelope for the refund (fictional agent, fictional customer ID, field names simplified for readability):
{
"v": "1",
"id": "aee-9f21-refund",
"ts": "2026-09-01T02:14:07Z",
"type": "task",
"from": "agent:refund-handler-v3",
"to": "tool:payments",
"intent": "issue_refund",
"corr": "corr-ticket-4127",
"reply_to": "aee-7a04-ticket-triage",
"payload": { "order": "ORD-88213", "amount": "340.00", "currency": "USD", "reason": "duplicate_charge" }
}
The corr and reply_to fields are doing real work. reply_to says this refund didn't come from nowhere: it was triggered by an earlier envelope, a ticket-triage action, and corr threads every envelope in that conversation onto one correlation id, all the way back. That explicit causal chain, two of AEE's fourteen fixed fields, is what lets you answer "why" and not just "what."