ReMe: Dynamic Procedural Memory Framework — Deep Research Report
Overview
ReMe is a dynamic procedural memory (dynamic procedural memory) framework jointly developed by Shanghai Jiao Tong University and Alibaba's Tongyi Lab, officially released in December 2025 as an official extension of the open-source AgentScope multi-agent framework. Its name carries four progressive meanings: "Remember Everyone, Recreate Everything," "Remember Me, Reshape Me," "Remember Me, Refine Me," and "Remember Me, Reinvent Me."
The problem it solves
LLM-driven agents typically start every interaction from scratch, unable to accumulate and reuse experience. Existing solutions fall into two extremes:
- Full retraining — costly and slow parameter updates
- Passive accumulation — memory treated as a static, append-only archive, causing "memory corruption": stale or irrelevant experiences dilute key signals and add retrieval noise
- Interface layer — Python SDK and RESTful API; core operations:
record,retrieve,reflect,consolidate - Core layer — experience acquisition, reuse, and refinement; algorithms implemented as plugins
- Storage layer — abstract interface with pluggable backends (ChromaDB now; MongoDB in development)
- Working memory — intelligent context compression with attention-management-style reorganization
- Long-term memory — hierarchical indexing, online dynamic clustering, activity-based archiving
- Memory fusion — conflict detection and strategy synthesis across multiple experiences ("template filling + parameter interpolation + conditional branching")
- Memory reflection — metacognitive self-evaluation triggering correction, merging, archiving, and retrieval-parameter tuning
- Deep AgentScope integration via a Memory-Aware Agent base class; config-driven behavior via YAML/env vars
- Async I/O everywhere: buffered writes, async prefetch, background reflection; multi-level caching (query, embedding, index)
- Install:
pip install reme-ai(options:[full],[dev]); minimal config requires only LLM and embedding API keys in a.envfile - Project templates (Cookiecutter) and a pre-built experience library (
reme.library) for cold starts - Qwen3-8B + ReMe (dynamic) > Qwen3-14B + no memory
- Qwen3-14B + ReMe (dynamic) > Qwen3-32B + no memory
- K < 5: success rate rises monotonically with K (insufficient coverage)
- K = 5–7: performance plateau — optimal (echoing cognitive science's 7±2 working-memory capacity)
- K > 7: no further gains, occasional degradation; latency keeps rising
- Dialogue systems — context persistence beyond window limits, user preference learning, evolving conversation strategies (e.g., "acknowledge emotion before solving the problem")
- Tool use — API call-pattern learning, error-recovery knowledge, multi-tool planning templates (e.g., travel planning)
- Embodied AI / robotics — physical-interaction experience accumulation, cross-scene skill transfer, adaptive decisions in changing environments
- Emerging areas — autonomous driving scene handling, AR/VR interaction optimization, scientific research automation
- GitHub: https://github.com/agentscope-ai/ReMe — latest version v0.2.0.6 (Beta, status "4 - Beta"), semantic versioning
- Team: SJTU × Alibaba Tongyi Lab joint team; contributions welcome via PRs, docs, case sharing, and plugin development
- Roadmap: MongoDB support (short term, 2025), Elasticsearch/Milvus evaluation (mid term, 2025–2026), cloud-native vector DB integration (long term, 2026+); deepened multimodal memory (video, vision encoders) is a mid-term core direction
- Enterprise needs — high availability, security isolation, compliance auditing, performance monitoring — are on the product roadmap
ReMe's core paradigm shift is from passive recording to active evolution, built on three pillars:
1. Multi-dimensional distillation — extracting fine-grained, structured reusable experience from noisy raw execution traces 2. Context-adaptive reuse — scene-aware indexing tailoring historical insights to new tasks 3. Utility-based refinement — autonomously adding validated memories and pruning outdated ones
Core definition
Each experience is formalized as a five-tuple E = ⟨ω, e, κ, c, τ⟩: trigger condition, core content, keyword set, confidence score (0–1), and tools used. Memory focuses on procedural knowledge ("how to do") rather than declarative knowledge ("what is").
Key differences vs. static memory systems:
| Dimension | Static systems | ReMe | |---|---|---| | Update | Append-only | Selective add + active pruning | | Quality control | None | Distillation + utility validation | | Context fit | Raw retrieval | Scene-aware indexing + dynamic rewriting | | Failure handling | Ignored | Analyze–retry–verify before inclusion | | Long-term cost | Unbounded growth | Compact, quality-controlled |
Architecture
Three-layer design
Memory lifecycle
1. Acquisition — minimally invasive hooks/decorators capture task descriptions, observations, tool calls, reasoning, and results; hybrid trigger-based + periodic collection 2. Storage — hierarchical working / short-term / long-term memory; JSON backend by default; three-level "core summary – key details – full trace" representation 3. Retrieval — multi-dimensional (semantic + structural + temporal + value) framework; two-stage coarse recall (50–100 candidates) then fine ranking, outputting 5–7 optimal experiences 4. Refinement — selective addition, failure-aware reflection (only verified failure lessons are kept), and utility-based deletion when retrieval count f(E) ≥ α and utility ratio u(E)/f(E) ≤ β
Key modules
Engineering
Benchmark results
Tested with Qwen3-8B (thinking mode for BFCL-V3, non-thinking for AppWorld):
BFCL-V3 (function calling)
| Config | Avg@4 | Pass@4 | |---|---|---| | No memory | 0.4033 | 0.5955 | | A-Mem | 0.4125 | 0.6123 | | LangMem | 0.4217 | 0.6289 | | ReMe (fixed) | 0.4377 | 0.6494 | | ReMe (dynamic) | 0.4450 (+10.3%) | 0.6577 (+10.4%) |
AppWorld (complex multi-app tasks)
| Config | Avg@4 | Pass@4 | |---|---|---| | No memory | 0.1497 | 0.3285 | | LangMem | 0.1356 (−9.4%) | — | | ReMe (dynamic) | 0.1706 (+13.9%) | 0.3631 (+10.5%) |
FrozenLake (100 random maps)
Pass rate improved from 0.66 to 0.72 (+9.1% relative), leveraging both success-path memory and verified failure avoidance.
Tool memory benchmark (Qwen3-30B-Instruct)
With three simulated search tools, score rose from 0.672 to 0.772 (+14.88%), far exceeding simple history logging (+2.3%). Tool selection accuracy improved most (+18.5%).
Memory scaling effect
The most striking finding: a smaller model with ReMe can outperform a larger memory-less model.
This is equivalent to a ~75% (8B→14B) and ~129% (14B→32B) parameter-scale gain, at a retrieval overhead of only ~5–10% of LLM inference cost. This challenges the "scale decides performance" assumption and enables cost-efficient tiered deployment.
Retrieval count sensitivity
Default is K = 5.
Applications
Ecosystem and roadmap
Key takeaways
1. ReMe turns agent memory from a static "storage device" into a self-refining "cognitive organ" 2. The memory scaling effect offers a compute-efficient alternative to brute-force model scaling 3. 5–7 retrieved experiences is a robust, task-agnostic sweet spot 4. Rigorous failure validation (analyze → retry → verify) keeps the experience pool clean and reliable 5. As an AgentScope-native extension, it integrates with minimal code intrusion and is production-trackable via PyPI