Findings of ACL 2026Official Code

Memory that adapts
as dialogue evolves.

AMA coordinates four specialized agents to construct, retrieve, verify, and refresh long-term memory—aligning the granularity of evidence with the reasoning task at hand.

0.774LoCoMo LLM score
0.698LongMemEval average
81%fewer input tokens*
01

Research reference code

The paper implementation, evaluation entry points, figures, and reproduction guidance for studying AMA.

View research code ↗
02

Memory skill & plugin

An AMA-based memory layer for OpenClaw and Harness Agent-style architectures, with automatic recall and capture.

See the integration ↓

Long-term memory is not just a retrieval problem.

Fine details, stable facts, and high-level episodes demand different representations. As user information changes, a useful system must detect conflicts and repair stale knowledge—not merely append more context.

System overviewRetriever → Judge → Refresher → Constructor
Overview of the AMA multi-agent memory framework
01

Retriever

Rewrites ambiguous queries and routes each intent to raw text, fact knowledge, or episode memory.

02

Judge

Audits relevance and consistency, triggering bounded retrieval feedback when evidence is insufficient.

03

Refresher

Resolves logical conflicts through targeted updates or deletions, preserving knowledge over time.

04

Constructor

Transforms validated dialogue into traceable raw turns, atomic facts, and event-level episodes.

Memory construction

Three views of the same evolving conversation.

The Constructor preserves exact turns as raw text, distills reusable facts, and synthesizes cross-turn episodes. Episodes are created when the topic shifts, the user explicitly asks to consolidate, or context becomes saturated.

  1. Retrieve Rewrite the query, infer its intent, and select a memory granularity.
  2. Judge Check relevance and consistency; retry when the evidence is insufficient.
  3. Refresh Update or delete stale memories when a conflict is detected.
  4. Construct Store the validated interaction in complementary forms.
Constructor detailRaw → Fact → Episode
How AMA constructs raw-text, fact-knowledge, and episode memories
Three complementary views

One memory does not fit every question.

AMA stores dialogue at multiple levels and selects a representation according to current reasoning intent.

  • Raw text precise wording and temporal details
  • Fact knowledge stable, atomic information
  • Episode memory events and cross-turn abstraction
Comparison of raw text, fact knowledge, and episode memory

Higher accuracy,
less context.

LoCoMo · GPT-4o-mini0.774

Overall LLM score, compared with 0.740 for the strongest listed memory baseline.

LongMemEvals0.698

Average accuracy across six question types, compared with 0.642 for Nemori.

Knowledge update0.897

Accuracy on questions that require the system to follow evolving user information.

Default Kr = 23,613

Input tokens versus 18,625 for FullContext in the efficiency analysis.

*3,613 tokens is approximately 19% of the 18,625-token FullContext input reported in the paper.

Consistent gains across model families.

AMA is evaluated on LoCoMo (1,540 questions over long multi-session conversations) and LongMemEvals (500 questions with approximately 115K-token histories). Temperature is 0, retrieval uses top-k 10, and AMA defaults to at most two retrieval rounds.

LoCoMoOverall LLM Score
BackboneFullContextNemoriAMA
GPT-4o-mini0.7170.7400.774
GPT-4.1-mini0.7860.7740.805
Qwen3-30B-Instruct0.7330.7560.791
Qwen3-8B-Instruct0.6960.6860.707
LongMemEvalsAccuracy by question type
Question typeFullContextZepNemoriAMA
Single-session preference0.3000.5330.4670.467
Single-session assistant0.8180.7500.8390.964
Temporal reasoning0.3650.5410.6170.444
Multi-session0.4060.4740.5110.624
Knowledge update0.7690.7440.6150.897
Single-session user0.8140.9290.8860.986
Average0.5480.6320.6420.698

AMA leads the average and excels on assistant-side, multi-session, knowledge-update, and user-specific questions. Temporal reasoning remains an important opportunity for future work.

A bounded loop finds the useful evidence.

Most of the performance gain arrives in the first few retrieval rounds and then saturates, while token use and latency continue to grow approximately linearly. AMA therefore uses Kr = 2 as its default balance.

LoCoMo performance across retrieval rounds
LoCoMo performance
LongMemEval performance across retrieval rounds
LongMemEvals performance
Token and latency costs across retrieval rounds
Retrieval cost
Accuracy–cost trade-offLoCoMo · GPT-4o-mini
MethodTokensLatencyScore
FullContext18,6257.206 s0.717
RAG5,8002.983 s0.300
Nemori2,9253.152 s0.740
AMA (Kr=1)2,4913.124 s0.723
AMA (Kr=2)3,6133.910 s0.774
What each component addsSelected ablation results
Memory settingLoCoMoKnowledge update
Raw text only0.6690.767
Fact knowledge only0.7120.804
Episode memory only0.6880.748
All granularities, no Refresher0.7710.568
Full AMA0.7740.897

Multi-granular memory gives broad coverage; the Refresher is especially important when user information changes.

Remember the latest truth—and the right level of detail.

Conflict-aware refresh. When device information changes, the Retriever recalls the earlier fact, the Judge identifies the conflict, and the Refresher updates the stale memory instead of keeping contradictory records.

Intent-aware granularity. A factual query routes to Fact Knowledge; an abstract summary query retrieves Episode Memory.

AMA case study showing conflict-aware refresh and intent-aware memory retrieval
Examples from the paper. The system couples retrieval with explicit relevance judgment and memory maintenance.
Beyond the benchmark

AMA, packaged as a memory skill.

The same repository also turns the research design into a usable memory layer for OpenClaw and Harness Agent-style systems: an agent-facing skill, automatic recall and capture hooks, six explicit tools, and a local Python sidecar backed by SQLite and FAISS.

Two distinct deliverables: the Python research code serves as a reference implementation of the paper; the TypeScript plugin and skill package the design for agent runtimes. They share the AMA concepts but can be explored independently.

OpenClaw setup guide
ama_retrievesemantic recall
ama_process_turnmemory lifecycle
ama_process_assistantresponse capture
ama_memory_listmemory statistics
ama_session_endepisode synthesis
ama_memory_forgetuser-controlled deletion

Build on AMA.

Weiquan Huang, Zixuan Wang, Hehai Lin, Sudong Wang, Bo Xu, Qian Li, Beier Zhu, Linyi Yang, and Chengwei Qin. 2026.

AMA: Adaptive Memory via Multi-Agent Collaboration.
Findings of the Association for Computational Linguistics: ACL 2026, pages 3099–3120.