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

# Type Alias: MemoryMutateFn

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

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

Updates an existing memory in the persistence layer.

## Parameters

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

## Returns

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