# AgentErrorEvent
Source: https://docs.maelstrom-ai.co/dev/reference/protocol/interfaces/agenterrorevent/
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/agent-wire.ts:471](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L471)

A failure the Engine detects after the frame decoded that is not the run’s own ending, such as an unknown `ui_applied` or a failed loop-driven UI change.

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

### changeId?

> `optional` **changeId?**: [`ChangeId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/changeid/)

Defined in: [packages/protocol/src/lib/agent-wire.ts:483](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L483)

The UI change the failure belongs to: the change a failed `ui_applied` refers to, or a loop-driven change whose planning failed or whose acknowledgement timed out.

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

* * *

### code?

> `optional` **code?**: `string`

Defined in: [packages/protocol/src/lib/agent-wire.ts:493](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L493)

Optional machine-readable failure kind with no closed taxonomy.

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

* * *

### error

> **error**: `string`

Defined in: [packages/protocol/src/lib/agent-wire.ts:491](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L491)

Human-readable failure description.

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

* * *

### inputId?

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

Defined in: [packages/protocol/src/lib/agent-wire.ts:477](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L477)

The offending input, when there is one.

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

* * *

### runId?

> `optional` **runId?**: [`RunId`](https://docs.maelstrom-ai.co/dev/reference/protocol/type-aliases/runid/)

Defined in: [packages/protocol/src/lib/agent-wire.ts:489](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L489)

The run whose loop-driven UI change failed. The event can arrive after that run’s `finished`, and its `changeId` may name a change that no `ui_change` carried, because a change is named before it is planned.

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

* * *

### type

> **type**: `"error"`

Defined in: [packages/protocol/src/lib/agent-wire.ts:473](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L473)

Member discriminator.

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

* * *

### version

> **version**: `1`

Defined in: [packages/protocol/src/lib/agent-wire.ts:475](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/protocol/src/lib/agent-wire.ts#L475)

Agent wire version, always [AGENT\_WIRE\_VERSION](https://docs.maelstrom-ai.co/dev/reference/protocol/variables/agent_wire_version/).

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