> ## Documentation Index
> Fetch the complete documentation index at: https://agentmall.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Evidence

> The record of what the agent did, what the shopper approved and what happened to the order.

Every agent action and every order step is recorded as an event that can't be changed. Together these events are the evidence trail: a record of who did what, and when.

The trail answers questions after the fact. Did the agent search before it bought? Did the shopper see the total before approving? When did the merchant confirm? These come up in support tickets, refund requests and audits.

## Two kinds of event

| Events | What they record | Tool | Example |
| - | - | - | - |
| Session events | What the agent did | `get_session_events` | Searched for AA batteries, created a cart |
| Order events | What happened to the purchase | `get_order_events` | Mandate issued, merchant confirmed |

A session that ends in an order links to it through `orderId`. Session events show how the agent got there. Order events show what happened next.

`get_session_events`:

```json theme={null}
[
  {
    "tool": "search_catalog",
    "durationMs": 1200,
    "resultSummary": "AA batteries → 10 products",
    "failed": false,
    "timestamp": "2026-10-24T10:00:10Z"
  }
]
```

`get_order_events`:

```json theme={null}
[
  { "label": "Mandate issued", "timestamp": "2026-10-24T10:02:00Z" },
  { "label": "Merchant confirmed", "timestamp": "2026-10-24T10:04:10Z" }
]
```

Both lists come back oldest first.

## Execution steps

`get_order` also returns `executionSteps`: each step AgentMall ran to place the order, with its state, how long it took and a `correlationId` for tracing it.

```json theme={null}
{
  "executionSteps": [
    {
      "name": "Catalog search",
      "state": "succeeded",
      "correlationId": "trace_01K8V6_catalog",
      "durationMs": 1200
    },
    {
      "name": "Cart creation",
      "state": "succeeded",
      "correlationId": "trace_01K8V6_cart",
      "durationMs": 900
    },
    {
      "name": "Checkout submit",
      "state": "succeeded",
      "correlationId": "trace_01K8V6_checkout",
      "durationMs": 8400
    },
    {
      "name": "Order confirmation",
      "state": "running",
      "correlationId": "trace_01K8V6_confirm",
      "durationMs": null
    }
  ]
}
```

A step's `state` is `pending`, `running`, `succeeded` or `failed`.

## What the trail shows

| Question | Where to look |
| - | - |
| What was the agent looking for? | Session events: the searches and products it viewed. |
| Did the shopper approve this? | Order events: approval requested, then mandate issued. |
| Was the order placed? | Order events and execution steps. |
| What was charged and refunded? | `get_order_receipt`. See [Order flow](https://agentmall.mintlify.site/concepts/order-flow.md#money). |
| Was a return handled? | Order events: return requested, approved, refund completed. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.