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.
Shared memory poisoning can expose many agents to one bad write. Use a three-trust matrix and consumer-side hygiene to limit the risk.
ReadAgent memory interoperability needs rules for identity, schema, provenance, consistency, and permissions. A2A and MCP do not define them.
AI introspection is real but unreliable. Chain-of-thought and self-reports cannot replace durable audit records outside the model.
Anthropic's global workspace research reveals Claude's transient working memory, and why AI agent memory must persist outside the model.
Knowledge-graph memory reframes agent memory from transcript to navigable substrate — GraphRAG, temporal graphs, PPR, and why it shouldn't rewrite itself.
AI agent memory explained: what it is, how it works, the approach families, how it is evaluated, and how to choose a real memory layer.
What an A2A Agent Card is: the JSON at a well-known URL describing an agent's skills, endpoint, and auth — the primitive agents fetch to discover and call each other.
A2A tutorial for Python: install the SDK, publish an Agent Card, run a server, delegate a task, stream artifacts, and add domain-scoped memory.
A2A protocol explained: Agent2Agent primitives, transports, how it complements MCP, and why shared agent memory stays a separate layer.
A2A vs MCP compared: MCP connects agents to tools; A2A connects agents to agents. They compose as complementary layers, not rivals — and leave memory open.
Hebbian memory for AI agents: how learned associations, automatic query expansion, and outcome feedback differ from static vector database similarity retrieval.
Is Mnemoverse a vector database? No. A vector DB does static similarity retrieval; Mnemoverse adds learning, recency, and consolidation on top.
Rescorla-Wagner for agent memory: how prediction-error outcome feedback updates valence and improves recall in Mnemoverse.
Shared memory for AI agents needs explicit domains, isolation, and hierarchical reads. Protocols coordinate work; memory preserves context.
Shared memory poisoning can expose many agents to one bad write. Use a three-trust matrix and consumer-side hygiene to limit the risk.
Agent-to-agent trust is a 4-layer stack borrowed from web auth (signed cards, OAuth/mTLS, token exchange) — and the injection gap none of it closes.
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.
Credential the LLM never sees: resolve secrets below the model, inject them on the wire, and account for MCP, logs, and confused deputies.
A poisoned AI agent memory can wait weeks, then leak an API key. Persistence and key-theft are each demonstrated; chaining them isn't—yet. Here's the fix.
AI agents warn about API keys because the risk is real. But warning after a secret enters context is not protection.
Agent memory consolidation turns raw writes into reusable structure between uses — what works, what ships, and what remains unproven.
Multimodal memory binds text, image, and audio into one representation; a sourced guide to the binding problem, TPR, VSA/HDC, SDM, and modern Hopfield networks.
Self-organizing memory systems explained: Adaptive Resonance Theory, Self-Organizing Maps, and Growing Neural Gas, including GNG-U utility-based pruning.
Tulving's episodic vs semantic split is a design decision for AI agents: an event log beside a fact store, plus a step deciding when episodes become facts.
Memory has dozens of named kinds because no one has drawn its boundary. A guided tour of the list, the reasons it grew, and why the seams never close.
Schema theory explains how memory turns episodes into reusable structure. For AI agent memory, it clarifies why episodes and consolidation should stay separate.
Working memory is the bounded active workspace of cognition; its capacity debate (Miller's 7 vs Cowan's 4) and models map onto AI context-window design.
Bernard Widrow's 1960 LMS delta rule taught machines to learn and still runs in adaptive filtering; late in life he turned to content-addressable memory.
Geoffrey Hinton's 1985 Boltzmann machine made memory generative: a stochastic, energy-based network with hidden units that learns a distribution and samples it.
Jeff Hawkins argues the brain is a memory system for prediction; Hierarchical Temporal Memory uses sparse representations, sequences, and continual learning.
John Hopfield's 1982 associative memory — basis of his 2024 Nobel — stores patterns in an energy landscape; Transformer attention is one read from it.
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 and the long-context tests — what each one checks, what it misses, and which to trust.
Swap only the grading prompt on the same fixed answers and an AI-memory benchmark score moves ~40 points. Why you can't trust a memory leaderboard without the judge's recipe.
DeepEval is a pytest-style LLM evaluation framework that turns evals into CI tests; most metrics are LLM-as-a-judge, so G-Eval has variance and DAG adds rigor.
Hugging Face evaluate library: evaluate.load and compute(predictions, references), the list-of-lists shape people get wrong for BLEU, and where it fits in 2026.
How to evaluate AI agent memory: the framework, the dimensions, a benchmark map (LoCoMo, LongMemEval, BEAM), and why latency and cost are co-equal axes.
LLM-as-a-judge leniency and bias explained: how a "be generous" grader, MT-Bench failures, and the LoCoMo judge shape the memory-benchmark numbers vendors cite
LangChain/LangSmith evaluation explained: datasets, LLM-as-judge biases, the eval tool landscape, and the blind spot none cover — whether your agent remembers.
Context budgeting allocates finite agent tokens across system, tools, retrieval, history, outputs, and response buffer.
Context optimization for AI agents unifies KV-cache hit rate, prefix stability, token budget, latency, cost, and placement into one runtime decision.
Where flow control ends and window assembly begins: the boundary between orchestrator and context compiler in LLM agent systems.
Deterministic context assembly improves cacheability and auditability; LLM-directed assembly adds adaptivity. Most agent systems need both.
Context engineering is the discipline. The context compiler is the per-turn runtime layer that ranks, budgets, secures, and assembles each model call.
Memory MCP servers explained: what they are, how to choose one by where data lives and what it does, and how to install so an agent remembers across sessions.
MCP federation in 2026: what gateways and the June 2025 spec solved for running multiple MCP servers, and which problems, like auth propagation, remain open.
KV-cache hit rate is the top AI-agent metric: every major provider discounts a cache read 50–90% off fresh input, so context engineering is memory engineering.
Graph memory MCP comparison of Graphiti, Cognee, Neo4j, and server-memory across traversal, temporal support, provenance, and STOP gaps.
GraphRAG vs RAG decision guide: when a knowledge graph's build, query, and latency cost pays off for multi-hop retrieval — and when it doesn't.
AI agent knowledge graph traversal depends on navigation policy, read-side tools, resolution, provenance, and stopping budget — not just graph size.
Hypergraph vs hyperbolic graph for AI memory: one grows the edge to many vertices (n-ary); the other curves the space for hierarchy. Where Mnemoverse bets.
Building memory that scales: a memory engine from 0.116 to 0.862 on LoCoMo over seven versions, quality held at 14x growth, with a 3D graph to watch it grow.
Ontology vs schema vs topology: one shared commitment, five different contracts, and what missing data means — false, unknown, or forbidden.
AI agent memory fails three ways: statelessness, context rot, and lost-in-the-middle. Bigger context windows trade one failure for another and add token spend.
AI memory landscape 2026: how persistent memory became a production discipline — platform features, funded startups, the LoCoMo benchmark, and open problems.
When AI cites what does not exist: a case study of a recombination hallucination that passed four of five checks, and why persistent memory needs verification.
AI memory market 2025-2026: platform memory from OpenAI, Anthropic, Google, Microsoft, xAI, plus startups, funding rounds, and context-management trends.