---
title: "What is memory consolidation in AI agents?"
description: "Memory consolidation defined: the background reprocessing that merges duplicates, resolves entities, and updates structure after ingestion."
canonical: https://past.dev/glossary/memory-consolidation
last-updated: 2026-09-02
---
# What is memory consolidation in AI agents?

Source: https://past.dev/glossary/memory-consolidation

Memory consolidation is background reprocessing of stored memory: merging duplicates, resolving entities, and updating structures after ingestion. Raw input is stored quickly; consolidation then runs behind the write to link new facts to existing entities, detect duplicates, and close the validity windows of facts the new input supersedes. Recall quality depends on it: until consolidation completes, new information may exist in storage without being connected to anything.

## What consolidation does

Accepting a write is fast. Turning the write into usable memory costs more, and consolidation is that second step: the system reprocesses each accepted record into structure. It is also when contradictions get noticed, because a new fact only conflicts with an old one after both are linked to the same entity.

- **[Fact extraction](/glossary/fact-extraction)**: raw text becomes structured facts with subjects, values, and times.
- **[Entity resolution](/glossary/entity-resolution)**: new references link to the entities memory already knows.
- **Duplicate merging**: repeated statements collapse into one fact instead of inflating the store; the [duplicate profile guide](/guides/merge-duplicate-profiles) covers the hardest case.
- **[Supersession](/glossary/fact-supersession)**: when the new input changes a known fact, the old fact's [validity window](/glossary/validity-window) closes and the new fact links to it.

## Why it runs in the background

Doing all of this inline would make every write as slow as its analysis. Systems therefore acknowledge the write immediately and consolidate asynchronously. The tradeoff is a settlement gap: for a period after acceptance, recall may answer from the state before the new input. How long the gap lasts varies by system and load; it matters most to tests and to workflows that read immediately after writing.

Callers should treat ingestion as settled only when the system reports it, and poll before testing recall. In past.dev, ingestion settles asynchronously and `GET /api/v1/ingest/{ingestionId}` reports `settled: true` once recall reflects the ingested text; see the [quickstart](/docs/memory-api/quickstart).

## Consolidation in practice

An agent ingests a June 4 email: the renewal moved from September 30 to December 15, and Priya Shah now owns the account. The write is acknowledged at once. Consolidation then links "Priya Shah" to the Priya entity created by earlier records, stores the December 15 renewal fact, and closes the validity window on the September 30 fact, with a supersession link between the two.

A recall issued before consolidation completes can still return September 30 as current. A recall issued after settlement returns December 15, with the June 4 email as evidence and the superseded date preserved as history.

## Related concepts

- **[Knowledge update](/glossary/knowledge-update)**: the single-fact case of what consolidation does at scale.
- **[Memory decay](/glossary/memory-decay)**: policies that down-rank or expire old memory, a separate process from consolidation.
- **[Session memory](/glossary/session-memory)**: the raw conversation state that consolidation processes into long-term memory.
- **[Memory API](/glossary/memory-api)**: the interface category where settlement polling appears.

## Frequently asked questions

### What is memory consolidation in an AI agent?

It is the background work a memory system does after accepting new input: extracting facts, linking them to known entities, merging duplicates, and superseding values the input replaces.

### Why is memory consolidation asynchronous?

Extraction and entity linking cost more than a raw write. Running them in the background keeps ingestion fast and lets the system process each record with full context.

### How do I know when new memory is ready to recall?

Systems that consolidate asynchronously expose a settlement signal per ingestion. Poll it after writing; once it reports settled, recall reflects the new input.

## Related

- [What is fact extraction?](https://past.dev/glossary/fact-extraction)
- [What is entity resolution?](https://past.dev/glossary/entity-resolution)
- [What is a knowledge update?](https://past.dev/glossary/knowledge-update)
- [Merging duplicate profiles](https://past.dev/guides/merge-duplicate-profiles)
- [Benchmark methodology](https://past.dev/benchmarks/methodology)