Memory & RAG
~8 min readUpdated: December 2026

DUNE: Incremental Evidence-Graph Propagation for Derived Agent Memories

DUNE evidence graph propagating derived memory updates in AI agents for Smoke Monkey

DUNE (arXiv:2612.03740) solves derived memory staleness in long-term AI agents: when a primary fact changes, downstream plans, summaries, and conclusions built from it silently become invalid. Modeling memory like database incremental view maintenance over an evidence dependency graph, DUNE reaches 84.8% source update and 73.6% derived update accuracy on the 3,200-scenario DRM-Bench, beating Mem0, LangMem, and RAG baselines by over 22 points.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

DUNE: Incremental Evidence-Graph Propagation for Derived Agent Memories: DUNE (arXiv:2612.03740) solves derived memory staleness in long-term AI agents: when a primary fact changes, downstream plans, summaries, and conclusions built from it silently become invalid. Modeling memory like database incremental view maintenance over an evidence dependency graph, DUNE reaches 84.8% source update and 73.6% derived update accuracy on the 3,200-scenario DRM-Bench, beating Mem0, LangMem, and RAG baselines by over 22 points. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Exampledune-memory-consistency-agent.ts
dune-memory-consistency-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Multi-session agent enforcing evidence-graph invalidation when source constraints change
const agent = createAgent({
agentId: 'dune-consistent-memory-agent',
provider: 'openai-compatible',
baseUrl: 'http://127.0.0.1:8000/v1',
model: 'Qwen/Qwen3.8-27B',
workspacePath: process.cwd(),
permissions: {
read_file: 'allow',
write_file: 'allow',
run_command: 'ask',
},
});
async function main() {
const result = await agent.run(
'Update the deployment budget constraint in memory/facts.json and propagate revisions to all dependent runbooks in memory/derived/.'
);
console.log('Memory Graph Sync:', result.summary);
}
main().catch(console.error);
Video Guides

Watch: Related Video Guides

The Four Types of Memory Every AI Agent Needs

The Complete Guide to AI Agent Memory

What Is DUNE and Why Do Standard Agent Memories Go Stale?

DUNE (Derived memory Updating through Networked Evidence, Ma et al., arXiv:2612.03740) is an agent memory maintenance framework modeled on database incremental view maintenance. Standard vector stores and memory plugins (Mem0, LangMem, A-MEM) overwrite a single obsolete fact when corrected, leaving downstream summaries, budgets, or multi-step tool plans—termed derived memories—pointing to stale conclusions.

Evaluated on DRM-Bench (3,200 two-session scenarios spanning 2,400 semantic, 400 episodic, and 400 procedural tool scenarios with 6,400 QA pairs), DUNE achieves 84.8% source update and 73.6% derived update accuracy, outperforming all tested RAG and agent-memory baselines.

Memory SystemAvg F1Avg Judge (J)SourceUpdate AccDerivedUpdate AccBelief Revision Judge Acc
Mem039.518.455.7%27.0%29.53%
BM25 RAG47.364.669.1%58.0%36.75%
Dense RAG47.464.470.7%58.0%36.93%
Hash RAG47.766.470.1%60.7%36.75%
LangMem / A-MEM / LightMem————37.04%
DUNE (Evidence Graph)+9.6 over best baseline+14.8 over best baseline84.8%73.6%56.77%

Evidence Graph Construction, Propagation, and Latency Profile

DUNE formalizes memory state as (S_t, D_t, R_t), where S_t are primary source facts, R_t are dependency edges, and D_t is the closure of derived memories:

  1. Networked Dependency Tracking: Every derived conclusion or tool plan links back to the exact source evidence nodes that justified it. When a delta Delta_t mutates a source node, DUNE walks outgoing edges rather than relying on vector similarity (which fails when the derived conclusion no longer shares keywords with the changed fact).
  2. Full-Graph Propagation vs Simple Invalidation: On 200 DRM-SE scenarios, simple invalidation hits 50.50% derived update accuracy and single-hop activity hits 45.50%, whereas full-graph DUNE propagation lifts SourceUpdate to 81.50% and overall accuracy to 66.25%.
  3. Minimal Local Overhead: Profiling 50 DRM-SE scenarios with Qwen-Flash shows local graph construction and solve takes 15.6 ms per scenario (with 0.7 ms retrieval across both rounds), trading roughly 3x more input tokens (11,150 vs 3,525 for BM25) for a >22-point jump in consistency.

Track Explicit Provenance Edges on Derived Plans

Whenever your Smoke Monkey agent writes a summary, deployment checklist, or cached tool plan, store its parent source-fact IDs as directed edges so future spec edits automatically trigger recomputation.

Reproducible Derived Memory Consistency Verification

Run a two-session dependency-propagation check comparing flat vector retrieval against graph-tracked derived memory invalidation:

bash
# 1. Inspect baseline agent memory stores (LangMem / PowerContext) for comparison
git clone https://github.com/langchain-ai/langmem.git

# 2. Verify dependency-closure invalidation on a local JSON evidence graph
python3 -c '
graph = {
  "source:api_rate_limit": {"value": "100 req/min", "deps": ["derived:worker_pool"]},
  "derived:worker_pool": {"value": "spawn 10 concurrent pollers", "deps": ["derived:retry_cron"]},
  "derived:retry_cron": {"value": "every 10s", "deps": []}
}
def invalidate(node, g, visited=None):
  visited = visited or []
  for child in g[node]["deps"]:
    visited.append(child)
    invalidate(child, g, visited)
  return visited
print("Nodes requiring recomputation on rate_limit change:", invalidate("source:api_rate_limit", graph))
'
Google Search Questions & Answers

Frequently Asked Questions

Q:What is a derived memory in an AI agent?

A derived memory is any stored conclusion, plan, answer, or procedural rule computed from earlier source facts—like a materialized view in a database—that becomes stale when an underlying source fact changes.

Q:Why do vector RAG and Mem0 fail on derived memory updates?

They typically update only the single matching fact chunk and leave downstream conclusions untouched, causing agents to retrieve contradictory derived answers in later sessions.

Q:How accurate is DUNE on DRM-Bench?

Across DRM-Bench’s 3,200 scenarios, DUNE achieves 84.8% SourceUpdate accuracy and 73.6% DerivedUpdate accuracy, and scores 56.77% on belief-revision judge accuracy compared to 29.53% for Mem0.

Q:How fast is DUNE’s local evidence-graph propagation?

Local graph construction and update propagation take 15.6 ms per scenario, with 0.7 ms retrieval latency across both conversation rounds.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness