# AgentEventMessage
Source: https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/agenteventmessage/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: [packages/protocol/src/lib/envelope.ts:425](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/envelope.ts#L425)

An `engine.agent.event` frame: carries one [AgentEvent](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/agentevent/) from the Agent Session of `sessionId` to its client. Events are streamed and correlate to inputs through the inner event’s `inputId` or `changeId`, not to a request, so the frame carries its own `id` rather than a `requestId`.

The agent loop is experimental in 0.3 and may change in any minor release.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

## Properties

### event

> **event**: [`AgentEvent`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/agentevent/)

Defined in: [packages/protocol/src/lib/envelope.ts:436](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/envelope.ts#L436)

The agent event carried by this frame.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### id

> **id**: [`MessageId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/messageid/)

Defined in: [packages/protocol/src/lib/envelope.ts:432](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/envelope.ts#L432)

Identifies this frame on the transport. Agent correlation uses the inner `inputId` and `changeId` fields.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### sessionId

> **sessionId**: [`SessionId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/sessionid/)

Defined in: [packages/protocol/src/lib/envelope.ts:434](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/envelope.ts#L434)

Session whose Agent Session emitted the event.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.

* * *

### type

> **type**: `"engine.agent.event"`

Defined in: [packages/protocol/src/lib/envelope.ts:427](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/envelope.ts#L427)

Frame discriminator.

> [!WARNING]
> Experimental
> 
> This API should not be used in production and may be trimmed from a public release.
