> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> Momentic seeds AI decisions with traces from past successful runs so the agent stays consistent across executions.

Natural language is ambiguous. Does "the selected tab" mean the currently active
tab, or a tab literally labeled "Selected"? Memory removes that ambiguity by
feeding the agent its own past decisions from your successful runs.

## When memory is used

Memory is used whenever a step relies on AI, including locator resolution
(**Click**, **Type**) and assertions (**AI check**, **Element check**). It is
treated as a form of caching and is skipped when caching is explicitly disabled.

## Storage and expiration

* Stored per organization, only accessible during authenticated runs.
* Expires after 30 days of inactivity.
* Supported for the locator and assertion agents.

Momentic automatically prunes to the most relevant traces so memory stays
bounded.

## Failed steps

Memory is written on every AI-assisted step, including failed ones. This keeps
tests failing consistently when there's a legitimate bug.

## Enabling memory

Toggle per test in the editor's AI options. Set the default via
[`ai.useMemory`](/configuration/ai#ai-usememory) in your config.
