Two Patterns for Preventing AI Agent Memory Rot: AutoDream and Skeptical Retrieval

OpenClaw's Approach to Memory Management
OpenClaw has released two MIT-licensed patterns to tackle the slow rot problem in file-based AI memory systems, where facts go stale without proper marking, causing agents to act on outdated context. While currently OpenClaw-specific, the concepts apply to any file-based memory system.
AutoDream: Nightly Memory Consolidation
AutoDream is a cron agent that runs at 3am to perform memory maintenance. It reads session transcripts, mines daily logs before they fade, updates structured memory files, and prunes stale entries. The key insight is that daily logs are the richest raw material but decay fastest, so the job extracts everything worth keeping before they go cold. Memory gets continuously rewritten rather than just appended.
Skeptical Retrieval: Decay-Weighted Memory Scoring
Skeptical Retrieval replaces standard semantic search's flat top-N retrieval with a composite score: semantic × recency_decay × recall_boost. Standard semantic search treats a 6-week-old fact the same as one from yesterday, while this approach applies different decay rates to different file types (stable facts at λ=0.02 vs operational todos at λ=0.08). Snippets recalled frequently get a logarithmic boost, and low-confidence results are suppressed rather than injected.
How They Work Together
The two patterns form a self-improving memory loop: AutoDream tracks which snippets were cited, recall counts feed into composite scoring, and AutoDream prunes snippets that never get recalled. Implementation starts with Phase 0 (reasoning discipline only) which costs nothing, followed by Phase 1 (recall tracking) which needs one cron update.
The developer notes that decay rate choices required iteration to get right and is open to discussion about them. Both patterns are available on GitHub:
- https://github.com/LeoStehlik/openclaw-skeptical-retrieval
- https://github.com/LeoStehlik/openclaw-autodream
📖 Read the full source: r/LocalLLaMA
👀 See Also

OpenClaw Integration for Indian Stock Markets: Multi-Agent Analysis and Trading Terminal
An open source trading terminal for Indian markets has been wired up as an OpenClaw skill server, allowing any OpenClaw agent to pull Indian stock market data and run full analysis over HTTP without local installation. The system uses seven specialist agents working in parallel to generate structured analysis with trade plans.

JavaClaw Beta: Java-Based AI Assistant Built on Spring AI and JobRunr
JobRunr team released JavaClaw beta, a Java version of OpenClaw that runs locally with multi-channel support, LLM choice, and background job processing via JobRunr. Built with Spring Boot 4, Spring AI, and Spring Modulith.

Signet: An Open-Source Local-First Memory Substrate for AI Agents
Signet is an open-source memory substrate for AI agents that moves memory handling outside the agent loop. It preserves transcripts, distills sessions into structured memory, links entities into a graph, and injects context before prompts start.

Khael AI Agent Shares Production Architecture Decisions for OpenClaw
Khael, an AI autonomous agent running on OpenClaw, details specific architectural decisions that have worked in production for months, including separate LAWS.md files, mode files, self-audit cron jobs, and specialized bot types.