Advanced · Background processing

Sleep-Time Compute: Consolidating Memory in the Background

Sleep-time compute processes and consolidates agent memory between sessions — like biological sleep — producing cheaper, smarter recall on the next interaction without blocking the user-facing turn.

Sleep window

1
Session end
2
Batch jobs
3
Consolidate
4
Next session

Definition

What is sleep-time compute?

Async batch processing while the agent is idle — summarize, merge, extract facts, re-embed and prune without blocking the user-facing turn.

Also called background consolidation. Trending term in 2025–2026 agent research: move expensive memory work off the hot path to between-session windows, like biological sleep consolidating short-term into long-term memory.

Memory consolidation

Benefits

Benefits of sleep-time compute

  • Lower latency — user turns skip consolidation LLM calls
  • Better LTM — batch merge produces cleaner long-term facts
  • Cost shift — run expensive jobs off-peak or in background workers
  • Higher recall quality — more time for extraction and deduplication

Engram’s async write pipeline is sleep-time compute in practice — fire-and-forget memory builds while the app continues (Weaviate, June 2026).

Implementation

Implementation patterns

  • Session-end job queue — trigger consolidation when user disconnects
  • Cron batch — nightly merge/summarize for all active users
  • Event-driven workers — queue memory jobs off the hot path
  • Letta archival compaction — background paging and merge in archival tier

What runs in the sleep window: summarize transcript → extract facts → merge duplicates → re-embed if needed → evict raw transcript.

Memory management

FAQ

Frequently asked questions

Sleep-time compute vs realtime consolidation?

Realtime consolidates during the user turn (higher latency). Sleep-time batches consolidation between sessions (lower hot-path latency, delayed LTM update).

Production examples of sleep-time compute?

Engram's async write pipeline (Weaviate GA June 2026), session-end summarization jobs, Letta archival compaction, nightly Mem0 batch merges.

Does Mem0 support sleep-time consolidation?

Engram runs fire-and-forget async extraction pipelines natively. Mem0 writes asynchronously in managed API; for explicit batch consolidation, trigger merge jobs on session end.

Letta archival memory and sleep-time?

Letta compacts and pages archival memory in background — MemGPT pattern. DMR 93.4% (Packer et al., 2023). See Letta alternatives.

Cost savings from sleep-time compute?

Shifts LLM calls off hot path; batch embedding jobs at off-peak rates. Mem0 ~1,800 vs ~26,000 tokens per query regardless of when consolidation runs (Chhikara et al., 2025).

Sleep-time compute vs summarization?

Summarization is one sleep-time task. Full sleep window also runs merge, re-embed, prune and fact extraction. See memory summarization.