# createInMemoryStore
Source: https://docs.maelstrom-ai.co/0.2/reference/engine/functions/createinmemorystore/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **createInMemoryStore**<`TMeta`\>(): [`HistoryStore`](https://docs.maelstrom-ai.co/0.2/reference/engine/interfaces/historystore/)<`TMeta`\>

Defined in: packages/engine/src/lib/history/in-memory-store.ts:14

Reference implementation of [HistoryStore](https://docs.maelstrom-ai.co/0.2/reference/engine/interfaces/historystore/) backed by a nested map.

The check-and-insert inside `append` is a single synchronous block, which is atomic in single-process JavaScript — no await separates the `has` check from the `set`, so no other caller can observe the half-state. This is enough for the in-process reference engine; distributed deployments must provide a store that delegates atomicity to the backend.

## Type Parameters

### TMeta

`TMeta` = `unknown`

## Returns

[`HistoryStore`](https://docs.maelstrom-ai.co/0.2/reference/engine/interfaces/historystore/)<`TMeta`\>
