---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/memory/variables/storeMemoryTool.md
description: >-
  Create a new {@link @nhtio/adk!Memory} record and persist it via the context's
  `storeMemory` callback.
---

# Variable: storeMemoryTool

```ts
const storeMemoryTool: Tool<SpooledJsonArtifact<unknown>>;
```

Defined in: [batteries/tools/memory/index.ts:76](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/memory/index.ts#L76)

Create a new [@nhtio/adk!Memory](../../../../common/classes/Memory.md) record and persist it via the context's `storeMemory` callback.

## Remarks

When `id` is omitted, a UUID v6 is generated. When `createdAt` / `updatedAt` are omitted,
the current time is used. The model authors `content`, `confidence`, and `importance`
directly. The resulting record is added to `ctx.turnMemories` and flushed to the consumer's
persistence layer.
