---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/relevance/interfaces/RelevanceMessage.md
description: >-
  The minimal structural shape of a conversation message this module groups into
  turns. `createdAt` is a lexicographically-sortable timestamp string (e.g.
  ISO-8601) — turns and tool calls are ordered by string comparison
  (`localeCompare`), not parsed into a `Date`, so any consistently-formatted
  sortable string works.
---

# Interface: RelevanceMessage

Defined in: [src/batteries/context/thrift/relevance.ts:156](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L156)

The minimal structural shape of a conversation message this module groups into turns. `createdAt`
is a lexicographically-sortable timestamp string (e.g. ISO-8601) — turns and tool calls are ordered
by string comparison (`localeCompare`), not parsed into a `Date`, so any consistently-formatted
sortable string works.

## Remarks

This is intentionally a DIFFERENT (simpler) shape than
[@nhtio/adk/batteries/context/thrift/contracts!WorkingMessage](../../contracts/interfaces/WorkingMessage.md) — turn grouping runs UPSTREAM
of the subtractive pass, over raw conversation history, before it becomes working-set items. A
caller's real message type will usually carry more fields than this; because every function here
accepts a generic `M extends RelevanceMessage`, extra fields pass through untouched.

## Properties

| Property                                    | Type     | Description                                                                                                                                                                    | Defined in                                                                                                                                          |
| ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `content`     | `string` | The message's rendered text, folded into the turn's combined relevance text.                                                                                                   | [src/batteries/context/thrift/relevance.ts:161](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L161) |
|  `createdAt` | `string` | Sortable creation timestamp (e.g. ISO-8601).                                                                                                                                   | [src/batteries/context/thrift/relevance.ts:163](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L163) |
|  `role`           | `string` | `'user'`, `'assistant'`, or any other role identifier — an `'assistant'` message closes the current turn (see [groupHistoryIntoTurns](../functions/groupHistoryIntoTurns.md)). | [src/batteries/context/thrift/relevance.ts:159](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L159) |
