Skip to content

feat: Auto-Dreamer v2 paper-based memory consolidation (NeurIPS 2026)#132

Open
CMander02 wants to merge 2 commits into
Mirix-AI:mainfrom
CMander02:feat/auto-dream
Open

feat: Auto-Dreamer v2 paper-based memory consolidation (NeurIPS 2026)#132
CMander02 wants to merge 2 commits into
Mirix-AI:mainfrom
CMander02:feat/auto-dream

Conversation

@CMander02
Copy link
Copy Markdown
Collaborator

Summary

Implements the full Auto-Dreamer two-timescale memory architecture from the NeurIPS 2026 paper.

What's included

v1 (simple AutoDream) — same as feat/auto-dream-simple PR:

  • AutoDreamAgent + AutoDreamManager + POST /memory/auto_dream

v2 (paper-faithful region rewriting):

  • AutoDreamV2Agent — consolidation agent driven by a 3-phase prompt (Survey → Synthesize → Retire)
  • AutoDreamV2Manager — builds working region R = {newly written ∪ recently retrieved}, formats as read-only evidence, drives the agent autonomously
  • MemoryAccessLogManager — logs which entries were retrieved by the task agent (for working region construction); uses fire-and-forget asyncio.create_task so retrieval tracking never blocks search
  • memory_access_log ORM table — tracks retrievals with 90-day retention pruning
  • check_memory tool — batch ID-based entry inspection (mirrors paper's navigation tool)
  • AUTO_DREAM_V2_READ_TOOLS / AUTO_DREAM_V2_WRITE_TOOLS constants
  • Memory-agent truncation fix in agent.py: executes only the first tool call per turn to prevent duplicate state mutations

Architecture (paper §4.2)

Working region R = {newly written in [t0,t1]} ∪ {retrieved by task agent in [t0,t1]}
B* = (B \ R) ∪ S     (retire source entries, insert synthesized replacements)

New files

File Purpose
mirix/agent/auto_dream_agent.py v1 agent class
mirix/agent/auto_dream_v2_agent.py v2 agent class
mirix/services/auto_dream_manager.py v1 manager
mirix/services/auto_dream_v2_manager.py v2 manager (paper §4)
mirix/services/memory_access_log_manager.py Retrieval access logging
mirix/orm/memory_access_log.py ORM table for access log
mirix/schemas/auto_dream.py v1 schemas
mirix/schemas/auto_dream_v2.py v2 schemas
mirix/prompts/system/base/auto_dream_agent.txt v1 system prompt
mirix/prompts/system/base/auto_dream_v2_agent.txt v2 system prompt (3-phase workflow)
mirix/prompts/system/screen_monitor/auto_dream_agent.txt v1 screen-monitor variant

Modified files

mirix/schemas/agent.py · mirix/agent/agent_configs.py · mirix/agent/__init__.py · mirix/agent/meta_agent.py · mirix/agent/agent.py · mirix/server/server.py · mirix/server/rest_api.py · mirix/client/remote_client.py · mirix/constants.py · mirix/functions/function_sets/base.py · mirix/functions/function_sets/memory_tools.py · mirix/orm/__init__.py

Test plan

  • POST /memory/auto_dream_v2 with dry_run: true — verify working region stats returned
  • Full run — verify agent creates synthesized entries, retires sources, writes v2 checkpoint
  • Check memory_access_log table is populated after search calls
  • Verify working region correctly includes both newly written AND recently retrieved entries
  • Memory-agent truncation: confirm no duplicate mutations when LLM returns multiple tool calls

🤖 Generated with Claude Code

…026)

Implements the full Auto-Dreamer two-timescale architecture:

New agents:
- AutoDreamAgent (v1 simple): remove redundancies, resolve conflicts
- AutoDreamV2Agent (v2 paper): survey working region, synthesize replacements, retire sources

New services:
- AutoDreamManager (v1): time-window fetch + agent step + episodic checkpoint
- AutoDreamV2Manager (v2): builds working region R = {newly written} ∪ {recently retrieved},
  formats as read-only evidence, drives consolidation agent autonomously
- MemoryAccessLogManager: logs which entries were retrieved (for working region construction)

New schema/ORM:
- memory_access_log table tracks retrieval events for working region construction
- AutoDreamRequest / AutoDreamResponse schemas (v1)
- AutoDreamV2Request / AutoDreamV2Response / WorkingRegionStats schemas (v2)

Wiring:
- AgentType.auto_dream_agent + auto_dream_v2_agent registered everywhere
- POST /memory/auto_dream and POST /memory/auto_dream_v2 endpoints
- client.auto_dream() and client.auto_dream_v2() methods
- Memory agent truncation fix: execute only first tool call per turn to prevent duplicate mutations
- search_in_memory logs access via fire-and-forget asyncio.create_task
- check_memory tool for direct ID-based entry inspection (paper tool interface)
- AUTO_DREAM_V2_READ_TOOLS / AUTO_DREAM_V2_WRITE_TOOLS constants
- Separate system prompts for each agent variant (base + screen_monitor)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zychen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants