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

# Interface: RawThought

Defined in: [lib/classes/thought.ts:18](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L18)

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

## Remarks

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

## Properties

| Property                                                         | Type                                                                                   | Default value | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Defined in                                                                                                  |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|  `content`                          | `string` | [`Tokenizable`](../classes/Tokenizable.md)                                 | `undefined`   | The reasoning content as a plain string or an existing [@nhtio/adk!Tokenizable](../classes/Tokenizable.md) instance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [lib/classes/thought.ts:22](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L22) |
|  `createdAt`                      | `string` | `number` | `Date` | `DateTime`<`boolean`>                              | `undefined`   | When this thought was recorded.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | [lib/classes/thought.ts:88](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L88) |
|  `id`                                    | `string`                                                                               | `undefined`   | Stable unique identifier for this thought.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | [lib/classes/thought.ts:20](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L20) |
|  `identity?`                       | | `string` | [`Identity`](../classes/Identity.md) | [`RawIdentity`](RawIdentity.md) | `undefined`   | The identity of the agent who produced this thought. **Remarks** Required in multi-agent conversations to attribute reasoning traces to a specific agent. 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. When omitted, defaults to `'assistant'` (both `identifier` and `representation`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | [lib/classes/thought.ts:35](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L35) |
|  `payload?`                         | `unknown`                                                                              | `undefined`   | Optional vendor-opaque payload that round-trips back to a matching model wire. **Remarks** Carries anything the ADK cannot interpret but a specific provider can — for example, an Anthropic Messages thinking-block `signature`, an OpenAI Responses `ResponseReasoningItem.encrypted_content` blob, a DeepSeek server-side reasoning handle, or an MCP-mediated reasoning item. When present, an LLM battery MUST treat the thought as **opaque-mode**: do NOT inline `content` through the plain `<thought>` envelope; serialise `payload` back to the wire in whichever shape the matching [RawThought.replayCompatibility](#property-replaycompatibility) identifier specifies. The plain-text `content` is kept alongside for token-accounting and human/observer inspection — it is not the thing the model sees. Cross-field invariant: a present `payload` REQUIRES a present [RawThought.replayCompatibility](#property-replaycompatibility). A `payload` without `replayCompatibility` is malformed (the ADK has no way to know which adapter can consume it) and [Thought.schema](../classes/Thought.md#property-schema) rejects with [@nhtio/adk!E\_INVALID\_INITIAL\_THOUGHT\_VALUE](../../exceptions/variables/E_INVALID_INITIAL_THOUGHT_VALUE.md). | [lib/classes/thought.ts:58](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L58) |
|  `replayCompatibility?` | `string`                                                                               | `undefined`   | Optional free-form identifier describing which adapter wire-shape this thought can be safely replayed into. **Remarks** Examples (none of these are reserved by the ADK — they are consumer conventions): - `'plain-text'` — replayable into every LLM battery - `'anthropic-messages-thinking-v1'` - `'openai-responses-reasoning-item-v1'` - `'deepseek-reasoning-handle-v1'` LLM batteries declare via constructor option which tags they can safely replay; matching opaque thoughts are routed to the wire's typed reasoning channel where it exists, or to a documented side-channel key on the request body where the wire has none. Non-matching opaque thoughts are elided from the current dispatch but NOT removed from `ctx.turnThoughts` — they remain in context so a subsequent dispatch to a different adapter that DOES declare the matching tag can pick them up. Plain-text thoughts (`payload === undefined` AND `replayCompatibility === undefined`, or explicit `replayCompatibility: 'plain-text'`) are always replayable. A `replayCompatibility` without a `payload` is allowed — it documents intent ("this plain-text thought is only meaningful to a specific fine-tuned variant") without requiring an opaque blob.               | [lib/classes/thought.ts:86](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L86) |
|  `updatedAt`                      | `string` | `number` | `Date` | `DateTime`<`boolean`>                              | `undefined`   | When this thought was last modified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | [lib/classes/thought.ts:90](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/thought.ts#L90) |
