---
url: 'https://adk.nht.io/api/@nhtio/adk/common/interfaces/RawMessage.md'
description: 'Plain input object supplied to [`Message`](https://adk.nht.io/api/@nhtio/adk/common/classes/Message) at construction time.'
---

# Interface: RawMessage

Defined in: [lib/classes/message.ts:31](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L31)

Plain input object supplied to [Message](../classes/Message.md) at construction time.

## Remarks

Validated against `rawMessageSchema` before the `Message` instance is created.
Temporal fields accept any value that Luxon can parse — ISO strings, Unix timestamps,
`Date` objects, or existing `DateTime` instances.

At least one of `content` or `attachments` (non-empty) must be present — a message with
neither throws [@nhtio/adk!E\_INVALID\_INITIAL\_MESSAGE\_VALUE](../../exceptions/variables/E_INVALID_INITIAL_MESSAGE_VALUE.md).

## Properties

| Property                                         | Type                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Defined in                                                                                                  |
| ------------------------------------------------ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|  `attachments?` | [`Media`](../classes/Media.md)\[]                                                       | Media attachments carried by this message — images, audio, video, documents. **Remarks** Optional and symmetric across roles: both `user` and `assistant` messages may carry attachments. Each attachment carries its own `trustTier` and `modalityHazard`, which the renderer uses to wrap the asset in its own trust envelope independent of the message envelope. How a renderer orders text vs attachments in the on-the-wire content array is a renderer-policy concern, not a contract of [Message](../classes/Message.md).                  | [lib/classes/message.ts:54](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L54) |
|  `content?`         | `string` | [`Tokenizable`](../classes/Tokenizable.md)                                 | The message content as a plain string or an existing [@nhtio/adk!Tokenizable](../classes/Tokenizable.md) instance. **Remarks** Optional — but required when `attachments` is absent or empty. The cross-field rule on `rawMessageSchema` enforces that at least one of `content` or `attachments` is present.                                                                                                                                                                                                                                      | [lib/classes/message.ts:43](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L43) |
|  `createdAt`      | `string` | `number` | `Date` | `DateTime`<`boolean`>                              | When this message was created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | [lib/classes/message.ts:67](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L67) |
|  `id`                    | `string`                                                                               | Stable unique identifier for this message.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | [lib/classes/message.ts:33](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L33) |
|  `identity?`       | | `string` | [`Identity`](../classes/Identity.md) | [`RawIdentity`](RawIdentity.md) | The identity of the participant who authored this message. **Remarks** Optional. When omitted, the `role` value is used as both the system-facing `identifier` and the model-facing `representation`. Three accepted forms when provided: - A plain `string` — used as both `identifier` and `representation`. - A [@nhtio/adk!RawIdentity](RawIdentity.md) object — validated and wrapped into an [@nhtio/adk!Identity](../classes/Identity.md). - An existing [@nhtio/adk!Identity](../classes/Identity.md) instance — passed through unchanged. | [lib/classes/message.ts:65](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L65) |
|  `role`                | [`MessageRole`](../type-aliases/MessageRole.md)                                        | Whether this message is from the human participant or the model.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | [lib/classes/message.ts:35](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L35) |
|  `updatedAt`      | `string` | `number` | `Date` | `DateTime`<`boolean`>                              | When this message was last modified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | [lib/classes/message.ts:69](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/message.ts#L69) |
