# AgentInputMessageSchema
Source: https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/agentinputmessageschema/
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` **AgentInputMessageSchema**: `ZodObject`<{ `id`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `input`: `ZodDiscriminatedUnion`<\[`ZodObject`<{ `chart`: `ZodType`<[`ChartRequest`](https://docs.maelstrom-ai.co/0.2/reference/protocol/interfaces/chartrequest/), `unknown`, `$ZodTypeInternals`<[`ChartRequest`](https://docs.maelstrom-ai.co/0.2/reference/protocol/interfaces/chartrequest/), `unknown`\>>; `inputId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `source`: `ZodEnum`<{ `text`: `"text"`; `voice`: `"voice"`; }>; `text`: `ZodString`; `type`: `ZodLiteral`<`"utterance"`\>; `version`: `ZodLiteral`<`1`\>; }, `$strip`\>, `ZodObject`<{ `actionOutcomes`: `ZodArray`<`ZodObject`<{ `error`: `ZodOptional`<`ZodString`\>; `ok`: `ZodBoolean`; }, `$strip`\>>; `changeId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`ChangeId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/changeid/), `string`\>>; `chart`: `ZodType`<[`ChartRequest`](https://docs.maelstrom-ai.co/0.2/reference/protocol/interfaces/chartrequest/), `unknown`, `$ZodTypeInternals`<[`ChartRequest`](https://docs.maelstrom-ai.co/0.2/reference/protocol/interfaces/chartrequest/), `unknown`\>>; `type`: `ZodLiteral`<`"ui_applied"`\>; `version`: `ZodLiteral`<`1`\>; }, `$strip`\>\], `"type"`\>; `sessionId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`SessionId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/sessionid/), `string`\>>; `type`: `ZodLiteral`<`"client.agent.input"`\>; }, `$strip`\>

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

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