# Workload Events

> Understand what Workload Events are, how they're structured, and how Agent Proxy classifies their outcomes

A workload event is a structured audit record that Aembit generates when application-level traffic flows through Agent Proxy. These events provide an audit trail for monitoring communication and interactions of workloads within your environment.

* To review events in the Reporting Dashboard, see [Review Workload Events](/user-guide/audit-report/workload-events/review/).
* For the fields that every event shares, see the [Workload Event reference](/user-guide/audit-report/workload-events/reference/).
* For the fields each protocol carries, see [Supported protocols and application fields](/user-guide/audit-report/workload-events/supported-protocols/).

## Event structure

Every workload event shares a common JSON structure:

* [**version**](/user-guide/audit-report/workload-events/reference/#top-level-fields) - Workload event schema version.
* [**meta**](/user-guide/audit-report/workload-events/reference/#meta) - Event metadata including timestamp, event type, connection and event identifiers, policy ID, action, and severity. Severity values are `Error`, `Warning`, or `Info`. TCP Passthrough events also include `identifiedProtocol` in `meta` when Agent Proxy can identify the underlying protocol.
* [**workload**](/user-guide/audit-report/workload-events/reference/#workload) - The identified Client Workload and Server Workload involved in the event.
* [**network**](/user-guide/audit-report/workload-events/reference/#network) - Network-level details including client and server IP addresses, ports, transport protocol, and proxy port.
* [**outcome**](/user-guide/audit-report/workload-events/reference/#outcome) - The result of the event: `Passthrough`, `Modified`, or `Error`, with an optional reason.
* [**application**](/user-guide/audit-report/workload-events/supported-protocols/) - Protocol-specific data that varies by protocol type.

> **MCP workload events**
>
> Model Context Protocol (MCP) workload events include an additional top-level field, `authorizationChain`. It contains an ordered list of authorization-event context IDs that tie the event to the authorization decisions behind the request. See [Trace a request with the authorization chain](/user-guide/troubleshooting/mcp-ai-iam/#trace-a-request-with-the-authorization-chain).
>
> This field requires version 1.32 or later. Events from earlier components don’t include it.

## Outcome classification

The `result` field in every workload event indicates how Agent Proxy handled the traffic:

| Outcome       | Description                                                                          |
| ------------- | ------------------------------------------------------------------------------------ |
| `Passthrough` | The request or response passed through Agent Proxy unchanged.                        |
| `Modified`    | Agent Proxy modified the request or response. For example, by injecting credentials. |
| `Error`       | Agent Proxy generated an error response to the Client Workload.                      |

When there is an error, the `reason` field describes what went wrong.

### Error priority

When multiple error sources exist for a single event, the `reason` field contains the error message from the highest-priority source:

1. **Agent-generated errors** (highest priority) - Errors generated by Agent Proxy itself.
2. **Directive errors** - Errors specified in the directive from the control plane.
3. **Server Workload errors** (lowest priority) - Errors returned by the Server Workload.

## Types of workload events

Workload events can be one of two types:

* [Workload request events](#workload-request-events) - when a Client Workload sends a request through Agent Proxy.
* [Workload response events](#workload-response-events) - when the Server Workload returns a response.

### Workload request events

A workload request event captures the details of a request sent from a Client Workload to a Server Workload through Agent Proxy. The `eventType` field follows the pattern `<protocol>.request` (for example, `mcp.request`), and the `application` block contains protocol-specific request fields.

> **Modified outcome**
>
> The `outcome` `result` of `Modified` in this example indicates that Agent Proxy made a change to the request. For example, it injected credentials into the request before forwarding it to the Server Workload. See [Outcome classification](#outcome-classification) for all possible values.

```json
{
  "version": "1.0.0",
  "meta": {
    "timestamp": "2026-03-15T14:22:08.000Z",
    "eventType": "mcp.request",
    "connectionId": "3f8b2e1-7c4d-4a91-b5e6-9d2f1c8a4b73",
    "eventId": "e7a4c9d2-1b3f-4e8a-a6c5-2d9b7f3e1a84",
    "policyId": "dd987f8c-34fb-43e2-9d43-89d862e6b7ec",
    "action": "forward",
    "severity": "Info",
    "resourceSetId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
  },
  "workload": {
    "client": {
      "id": "7c466803-9dd4-4388-9e45-420c57a0432c",
      "name": "MCP Client App"
    },
    "server": {
      "id": "49183921-55ab-4856-a8fc-a032af695e0d",
      "name": "MCP Remote Server"
    }
  },
  "network": {
    "clientWorkloadIP": "10.0.1.15",
    "clientWorkloadPort": 53134,
    "transportProtocol": "TCP",
    "serverWorkloadHost": "mcp.example.com",
    "serverWorkloadIP": "10.0.2.30",
    "serverWorkloadPort": 443,
    "proxyPort": 8080
  },
  "outcome": {
    "result": "Modified"
  },
  "application": {
    "mcp": {
      "httpMethod": "POST",
      "httpVersion": "HTTP/1.1",
      "uri": "/mcp/v1/tools/list",
      "headers": [
        {"content-type": "application/json"},
        {"host": "mcp.example.com"}
      ]
    }
  }
}
```

### Workload response events

A workload response event captures the details of a response returned from a Server Workload to a Client Workload through Agent Proxy. The `eventType` field follows the pattern `<protocol>.response` (for example, `mcp.response`), and the `application` block contains protocol-specific response fields.

> **Sensitive data protection**
>
> For HTTP-based protocols, sensitive headers such as `Authorization` and `Set-Cookie` are automatically redacted from workload event data.

```json
{
  "version": "1.0.0",
  "meta": {
    "timestamp": "2026-03-15T14:22:08.123Z",
    "eventType": "mcp.response",
    "connectionId": "3f8b2e1-7c4d-4a91-b5e6-9d2f1c8a4b73",
    "eventId": "b2c8d4e6-3a1f-4b7c-9d5e-8f2a6c4b1d73",
    "policyId": "dd987f8c-34fb-43e2-9d43-89d862e6b7ec",
    "action": "forward",
    "severity": "Info",
    "resourceSetId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
  },
  "workload": {
    "client": {
      "id": "7c466803-9dd4-4388-9e45-420c57a0432c",
      "name": "MCP Client App"
    },
    "server": {
      "id": "49183921-55ab-4856-a8fc-a032af695e0d",
      "name": "MCP Remote Server"
    }
  },
  "network": {
    "clientWorkloadIP": "10.0.1.15",
    "clientWorkloadPort": 53134,
    "transportProtocol": "TCP",
    "serverWorkloadHost": "mcp.example.com",
    "serverWorkloadIP": "10.0.2.30",
    "serverWorkloadPort": 443,
    "proxyPort": 8080
  },
  "outcome": {
    "result": "Passthrough"
  },
  "application": {
    "mcp": {
      "httpVersion": "HTTP/1.1",
      "headers": [
        {"content-type": "application/json"}
      ],
      "httpResponseCode": 200
    }
  }
}
```

For the fields carried in each `application` block, see [Supported protocols and application fields](/user-guide/audit-report/workload-events/supported-protocols/).