The LibraryField notes on AI agent memory
Evidence-first deep-dives on evaluation, context engineering, and the science of how AI agents remember.
Evidence-first deep-dives on evaluation, context engineering, and the science of how AI agents remember.
Topics
Tools
All 123 articles
A 38-line SQLite agent memory you can run, where it stops being enough, and what Mem0 and Zep document for a changed fact, deletion and user scoping.
ReadA 38-line SQLite agent memory you can run, where it stops being enough, and what Mem0 and Zep document for a changed fact, deletion and user scoping.
Claude Code persistent context: what CLAUDE.md, auto memory and --continue keep between sessions, where each stops, and when to add a memory server.
Write corrections as replacements, key memories by subject and predicate, and test the three places where a correction can get lost.
Yes, through any read path the check misses: the lexical branch of a hybrid search, a cache in front of retrieval, and fetches by ID, name or pointer.
Agent state is four things: run state, the plan, side effects in flight, and what the agent learned. Each needs a different durable home.
Three kinds answer it: shared memory stores a team writes to, code and company context served over MCP, and team rules rendered into each tool's files.
Letting a coding agent commit: a shared git worktree exposes hooks, config and refs; use a clone per task or an outside commit that runs no hooks.
Shared memory poisoning can expose many agents to one bad write. Use a three-trust matrix and consumer-side hygiene to limit the risk.
A2A and MCP hand identity to OAuth, OIDC and mTLS. A signed Agent Card proves origin, not trust; RFC 8693 scopes delegation; prompt injection stays open.
Least privilege bounds what a tricked AI agent can do — not whether it's tricked: authz policy, JIT tokens, and the confused-deputy ceiling it can't cross.
Prompt injection is a 3-stage credential kill chain: injection lands, the agent reads a secret, it leaves via an allowed channel. Three defenses matter.
Six rungs of protecting an AI agent's secret, weakest to strongest—each defeats a different threat, but none stops a tricked agent misusing what it unlocks.
Continual learning algorithms explained: what EWC, GEM, A-GEM and iCaRL actually fixed about catastrophic forgetting, and what transfers to AI agent memory.
AI coding agents repeat corrected mistakes because nothing records whether past suggestions worked. Outcome memory attaches results to recalled facts.
Vector stores return deprecated APIs and dead conventions forever. Closing, decay, and suppression keep agent memory current without destroying history.
Transformer attention is equivalent to one update step of a modern Hopfield network under specific query, key, value substitutions.
Types of memory in computing, mapped from DRAM and virtual memory to KV caches, model weights, context windows, and persistent agent memory.
Transactive memory divides the labor of remembering across a group — a directory of who knows what — mapped, with its limits, to multi-agent AI memory.
AI code review benchmarks explained: answer keys, LLM judges, counting rules and live leaderboards, and what to ask before trusting a #1 claim.
RAGAS metrics explained: faithfulness, response relevancy, context precision and recall. Two of the six text RAG metrics need no reference; none spans sessions.
BLEU, ROUGE, F1, accuracy, and SARI explained by metric question, Evaluate I/O shape, failure mode, and routing.
LLM-as-judge reliability explained: assess position bias, verbosity, self-preference, rubrics, retrieval recall, and benchmark comparability.
A map of how AI-agent memory is actually measured — LoCoMo, LongMemEval, BEAM, long-context tests — what each checks, what it misses, and which to trust.
Swap only the grading prompt on the same answers and an AI-memory benchmark score moves ~40 points — you can't trust a leaderboard without the recipe.
There is no standard set of memory tools. MCP standardises what a client reads: tool definitions, annotations, server instructions and list changes.
Duplicate results in vector search have three causes: look-alikes, one document's chunks, one fact stored twice. The setting that fixes each, store by store.
The canonical Cursor Memory Bank ships fifty five rule files. Exactly one of them is guaranteed to reach a session, and it tells the agent where to write, not what to read. Checked against the repository, the vendor's own pages and the forum threads where it fails.
MCP defines no ordering, conflict detection or merge semantics for memory. Coherence is a property each server chooses, and shipped servers choose differently.
The format has no required fields and one sentence about precedence. Seven tools that list themselves as supporting it describe seven different mechanisms, and one of them says outright that a closer file overrides an earlier one because it comes later in the combined prompt.
A rules file is text placed in a context window. All three vendors say so on their own pages, in their own words. What delivers a rule, what the wrapper around it says, and what does enforce, because something does.
Six agent-memory systems, read at pinned commits: hardcoded similarity thresholds, no published error rate, and no way to undo a merge.
Is memory hyperbolic? Cognitive maps are real, but one narrow CA1 result and indirect odor evidence do not establish a universal memory geometry.
AI agent consensus can be weak evidence when agents share models, sources, prompts, or memory. Count independent provenance chains instead.
When voting, reputation, and consensus can fail for multi-agent memory — and the published alternatives: outcomes, meta-knowledge, independence, reasons.
Bitemporal memory tracks valid time and transaction time — settled engineering. One reviewed agent system ships it; none of seven benchmarks tests it.
Two agents wrote conflicting facts: a timestamp shows which came last, not whose claim should win. Record writer, evidence and derivation, and keep both.
State of AI Agent Memory 2026: memory layers compared on outcome feedback, cross-client memory, self-hosting, price, vendor benchmarks and standards.
What is the best AI agent memory in 2026? A decision map across Mem0, Zep, Letta, Cognee, Supermemory, LangMem, EverOS, and Mnemoverse, with the vendor position flagged up front.
Mem0, Zep, Letta, Cognee and Supermemory compared with Mnemoverse, the publisher of this page: integration posture, self-host reality, temporal handling, and what benchmark scores hide.
Ontology vs schema vs topology: one shared commitment, five different contracts, and what missing data means — false, unknown, or forbidden.
OpenAI's Record & Replay for Codex and Anthropic's composable skills are two stacks, one shift: encoding how work is done and making the procedure callable. The ownership question follows.
Cursor's valuation, Anthropic's dreaming preview, Google's Memory Bank: different architectures, same shift. Persistent memory has stopped being a research conversation and become a choice builders can no longer defer.