# AgentEventMessageSchema
Source: https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/agenteventmessageschema/
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.

> `const` **AgentEventMessageSchema**: `ZodObject`<{ `event`: `ZodDiscriminatedUnion`<\[`ZodObject`<{ `inputId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `text`: `ZodString`; `type`: `ZodLiteral`<`"placeholder"`\>; `version`: `ZodLiteral`<`1`\>; }, `$strip`\>, `ZodObject`<{ `ack`: `ZodString`; `disposition`: `ZodEnum`<{ `agent`: `"agent"`; `amend`: `"amend"`; `answer`: `"answer"`; `independent`: `"independent"`; `noise`: `"noise"`; `supersede`: `"supersede"`; `ui_only`: `"ui_only"`; }>; `inputId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `runId`: `ZodNullable`<`ZodPipe`<`ZodString`, `ZodTransform`<[`RunId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/runid/), `string`\>>>; `type`: `ZodLiteral`<`"accepted"`\>; `version`: `ZodLiteral`<`1`\>; }, `$strip`\>, `ZodObject`<{ `delta`: `ZodString`; `runId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`RunId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/runid/), `string`\>>; `turnId`: `ZodString`; `type`: `ZodLiteral`<`"message"`\>; `version`: `ZodLiteral`<`1`\>; }, `$strip`\>\], `"type"`\>; `id`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `sessionId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`SessionId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/sessionid/), `string`\>>; `type`: `ZodLiteral`<`"engine.agent.event"`\>; }, `$strip`\>

Defined in: packages/protocol/src/lib/envelope.ts:398

Wire-format Zod parser for [AgentEventMessage](https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/agenteventmessage/). Validates the discriminator, the branded `id` / `sessionId`, and the inner [AgentEvent](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/agentevent/), including its `version`.
