---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/relevance/interfaces/HistoryTurn.md
description: >-
  One grouped conversation turn: the messages from a user message through the
  next assistant message (inclusive), plus any tool calls that occurred during
  it, and `qa` — the turn's full combined text (every message's content plus
  every tool call's `name args` fragment) used for relevance scoring.
---

# Interface: HistoryTurn\<M, TC>

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

One grouped conversation turn: the messages from a user message through the next assistant message
(inclusive), plus any tool calls that occurred during it, and `qa` — the turn's full combined text
(every message's content plus every tool call's `name args` fragment) used for relevance scoring.

## Type Parameters

| Type Parameter                                             | Default type                                |
| ---------------------------------------------------------- | ------------------------------------------- |
| `M` *extends* [`RelevanceMessage`](RelevanceMessage.md)    | [`RelevanceMessage`](RelevanceMessage.md)   |
| `TC` *extends* [`RelevanceToolCall`](RelevanceToolCall.md) | [`RelevanceToolCall`](RelevanceToolCall.md) |

## Properties

| Property                                    | Type     | Description                                                                                                                                                      | Defined in                                                                                                                                          |
| ------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `createdAt` | `string` | The turn's timestamp, updated to the latest message folded into it — used for `selectNaiveTurns`' recency ordering.                                              | [src/batteries/context/thrift/relevance.ts:194](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L194) |
|  `messages`   | `M`\[]    | The messages belonging to this turn, in order.                                                                                                                   | [src/batteries/context/thrift/relevance.ts:196](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L196) |
|  `qa`               | `string` | The turn's combined text (all message content + `tool argText(args)` fragments), the string [relevanceToQuery](../functions/relevanceToQuery.md) scores against. | [src/batteries/context/thrift/relevance.ts:191](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L191) |
|  `toolCalls` | `TC`\[]   | The tool calls attributed to this turn (by timestamp — see [groupHistoryIntoTurns](../functions/groupHistoryIntoTurns.md)).                                      | [src/batteries/context/thrift/relevance.ts:198](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/relevance.ts#L198) |
