Stop Dumping Garbage Into Vector Databases: The Right Way to Handle AI Memory
The A-MEM framework developed by the Rutgers team transforms AI memory from a fixed-slot database into a self-evolving network of notes. It delivers significant performance improvements and cuts token costs by a staggering 93%. More importantly, research from four leading labs reveals a counterintuitive truth: the core problem with AI memory isn't that it forgets—it's that it never actively forgets.
Researchers at Rutgers have developed a new approach to AI memory called A-MEM. Instead of confining memory to a fixed-slot database, they reimagined it as a interconnected, self-evolving network of notes that operates similar to the human brain.
Every new experience is broken down into atomic notes, each containing content, keywords, tags, and an embedding. An LLM identifies neighboring related notes, creates connections between them, and rewrites existing notes to integrate new information. When retrieving memory, it pulls out the full cluster of associated memories instead of just one isolated chunk.
Performance results:
> Multi-hop F1 score of 27, compared to 9–12 for MemGPT and ReadAgent
> ~1,200 tokens per operation, compared to 16,900 for baseline methods, a 93% maximum reduction
> Scales linearly, remains fast even with 1 million stored memories
Stop dumping random text chunks into vector databases. This memory system reorganizes itself continuously as it learns.
## Memory Engineering: Four Labs, One New Role
NO1ennn references a long-form article that outlines how four labs—Stanford, Microsoft, Anthropic, and Nvidia—define the emerging role of "memory engineer". The core insight: your AI agent's memory problem isn't that it forgets, it's that it never actively forgets.

You tune retrieval and test accuracy, but you never put a cost on your memory write path. Your storage remembers everything, no matter how irrelevant.
## Stanford: Cost First, Build Second
Stanford conducted the first systematic study of agent memory systems and found that costs don't come from query time—they come from construction time. The compute burned during the memory construction process is more than the cost of 300 subsequent queries combined.
```text
Memory System Costs
Construction LLM prefill + embedding, one-time cost, invisible to users
Query Retrieval + generation, cost per query, the part you monitor
Maintenance Deduplication, compression, forgetting, almost always missing
Key Finding: In LLM-mediated systems, construction consumes more
compute than 300 post-construction queries
```
Furthermore, when normalizing energy cost per correct answer, two systems with identical accuracy can differ in cost by a factor of 47.
## Microsoft: Store Facts and Skills, Not Logs
The conclusion from PlugMem experiments: giving agents more raw raw memory actually makes performance worse. Historical clutter piles up, retrieval gets swamped, and attention is exhausted.
Human memory doesn't replay full event logs—it only retains distilled facts and skills.
```text
Don't store this: "May 12, user said: I always deploy with GitHub Actions, never manually. What I learned from that production outage was..."
Store this instead:
Fact: User deploys with GitHub Actions, never manually
Skill: When a deployment fails, check Actions run logs first before touching production
```
## Anthropic: Memory Must Be Stored in Editable Files
Store memory as regular files on a filesystem. It should be exportable, inspectable, and programmable. A storage system you can't open and edit is an uncontrolled system.
```text
/memory
/org read-only conventions.md, past-incidents.md
/user-4821 read-write preferences.md, skills/
audit.log Which agent, which session, what changed, when
-> Export, roll back, delete any memory entry
```
Using this approach, the team cut first-pass errors by 97% and improved validation speed by one-third.
## Nvidia: Memory Is Built on KV Cache at its Core
All memory decisions ultimately land on the GPU. Stuffing the full history into the context window has quadratic cost, and prefix caching across sessions breaks.
```text
Full context Cost grows quadratically with length, KV cache overwhelms HBM,
gets evicted between sessions, you have to re-compute it next time
MEMENTO on vLLM After finishing inference on a block, clear KV entries,
release them back to the memory pool
Results (B200) 4,290 tok/s vs 2,447 for vanilla vLLM, 693s vs 1,096s per batch
```
Memory construction is almost all prefill, it's a long read, short write task just like background indexing. Use rate limiting, batching, and deferral—don't let it block user queries.
## How to Get Started: 15 Steps, Manual First, Automation Later
1. Build the write path first, store facts and skills, run for a few weeks to collect real data
2. Manually check for contradictions, confirm it works after a few cycles before scheduling automated jobs
3. Add forgetting policies early, before your storage grows out of control
4. Tune the hardware layer last: batch construction, limit retrieval volume, monitor KV cache
Don't go fully automated on day one. Get it working manually first, wrap it in code, then automate.
## One Final Thought
Your agent doesn't struggle to remember—it doesn't know how to forget on purpose.
Storage engineers optimize what the system remembers; memory engineers optimize what the system forgets.
It's that simple.
Sources: Stanford (Agent Memory: Characterization and System Implications), Microsoft Research (PlugMem, Memento), Anthropic (Built-in Memory for Claude Managed Agents), hardware framework based on H100, vLLM, B200 configurations.
发布时间: 2026-08-10 09:51