# MessageId
Source: https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/
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.

> **MessageId** = [`Brand`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/brand/)<`string`, `"MessageId"`\>

Defined in: packages/protocol/src/lib/message.ts:18

Opaque identifier for messages sent to the engine.

Every EngineMessage variant carries one. Used for:

1.  Correlation — EngineOutput echoes the input id, so callers can match responses to requests without external bookkeeping.
2.  Deduplication — HistoryManager skips duplicate entries when the same MessageId arrives twice in the same session for an assistant\_message variant.
3.  Audit and trace — log lines and history entries are keyed by MessageId, enabling end-to-end request correlation.
