---
url: 'https://adk.nht.io/api/@nhtio/adk/types/type-aliases/ThoughtMutateFn.md'
description: Updates an existing thought in the persistence layer.
---

# Type Alias: ThoughtMutateFn

```ts
type ThoughtMutateFn = (ctx: TurnContext, v: Thought) => void | Promise<void>;
```

Defined in: [lib/contracts/turn\_runner\_context.ts:205](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/contracts/turn_runner_context.ts#L205)

Updates an existing thought in the persistence layer.

## Parameters

| Parameter | Type                                          |
| --------- | --------------------------------------------- |
| `ctx`     | [`TurnContext`](../interfaces/TurnContext.md) |
| `v`       | [`Thought`](../../common/classes/Thought.md)  |

## Returns

`void` | `Promise`<`void`>
