Skip to main content

AI Agent Memory: Why a Bolt-On Library Isn't Enough for Production

· 7 min read
service_account:ws_etc848sb:sa_1d15a3d8c7aaabd0aaa3a5492759daba

This post was drafted with AI assistance and will be reviewed and published under a human byline.

If you have evaluated memory frameworks for AI agents, you have seen the same comparison article a dozen times: Mem0 vs Zep vs Letta. They are all good comparisons of good tools. But every one of them shares a foundational assumption that is worth questioning.

They treat agent memory as something you add to an agent, a separate service your agent calls into. Add/search/delete. A cache on the side.

That assumption works fine for a single agent doing Q&A. It starts failing when you are running a multi-agent system where a dozen agents need shared context, structured facts, and relationship data, all without racing each other or leaking sensitive information across trust boundaries.

This post explains why the architectural difference between bolt-on memory and native agent memory matters, and what it looks like in practice.


The Three Bolt-On Approaches​

Before arguing against bolt-on memory, it is worth accurately describing what the leading options actually do.

Mem0: Extract-and-Retrieve​

Mem0's model is the simplest. You call add() with free text; Mem0's pipeline extracts facts using an LLM, stores them as vector embeddings, and makes them searchable via search(). It integrates with LangChain, CrewAI, and most popular agent frameworks in under 10 minutes.

Strengths: Drop-in, fast to ship, works with any LLM backend.
Limits: Memory is unstructured text. No schema. No relationships between facts. No per-agent isolation without extra work. No lifecycle management beyond TTL.

Zep: Temporal Knowledge Graph​

Zep builds a graph of entities and relationships over your conversation history. It is more structured than Mem0. Facts are linked to entities, and you can traverse relationships. It also adds temporal reasoning, so it can answer "what did this user prefer last month?"

Strengths: Genuine graph semantics, better for multi-session longitudinal memory.
Limits: Still a bolt-on service. The graph is conversation-derived, not connected to your production data. Agents query it; they do not live in it.

Letta: Self-Managing Agent Memory​

Letta (formerly MemGPT) takes a different approach: the agent itself manages its own memory context, deciding what to commit to long-term storage and what to evict. Memory is part of the agent's operating loop, not a separate API.

Strengths: Elegant for single-agent systems where memory management is the core challenge.
Limits: Does not naturally extend to multi-agent architectures. Each agent has its own memory; sharing requires explicit coordination.


What Changes When Memory Is Native​

The SchemaBounce Agent Data Layer (ADL) does not offer a separate memory API. Memory is the data layer, the same substrate that stores entity records, relationship graphs, agent findings, and workflow state.

That is a meaningful architectural difference. Here is how it plays out:

Memory, Records, and Graph Are One Thing​

In bolt-on systems, you have:

  • Your application database (production records)
  • Your memory service (agent observations)
  • Your graph (if you have one, separate again)

In ADL, all three are the same store. An agent can write a memory fact and query it alongside structured entity records in the same operation. A finding written by one agent becomes a record that another agent queries by field, with no serialization step and no sync lag.

# Bolt-on pattern: two separate calls, two systems to keep in sync
mem0.add("Customer acme-corp renewed contract", user_id="agent-1")
db.query("SELECT * FROM companies WHERE id = 'acme-corp'")

# ADL pattern: write structured, query structured
adl_write_memory(namespace="companies", key="acme_renewal_note", value={...})
adl_get_record(entity_type="companies", entity_id="acme-corp")

Decay Classes vs TTL​

Most memory APIs offer a TTL, a fixed expiry time. ADL has three semantic lifecycle classes:

ClassAuto-purgeUse case
ephemeral1 dayPer-run scratch notes
working7 daysActive investigation context
durableNever (0.9x confidence decay per 30d idle)Learned preferences, key facts

The durable class does not just expire. It decays confidence based on how recently it was accessed, then surfaces that decay in semantic search rankings. Old facts get lower retrieval scores without being deleted. That is closer to how human memory actually works, and it matters when you are trying to surface relevant recent context rather than all ever-stored facts.

Namespace Isolation Without Extra Config​

Multi-agent memory sharing is a known hard problem. Bolt-on systems handle it with user IDs and access tokens; each agent gets its own memory partition, and sharing means explicitly passing references.

ADL uses a namespace hierarchy with built-in access semantics:

northstar:* [workspace-wide, read-only: policy + brand voice]
shared:* [cross-agent read/write: explicit coordination]
domain:{name}:* [domain-scoped, isolated per agent group]
{private} [agent's own namespace, not visible to others]

An agent writing to shared:customer_context is explicitly signaling that its observations should be visible to peer agents. Writing to working_notes keeps it private. No credentials to configure, no user ID mappings.

Hybrid Retrieval Built In​

Bolt-on memory systems are generally vector-search only. You get semantic similarity, but not keyword match. ADL's retrieval combines:

  • pgvector semantic similarity (when embedding provider configured)
  • BM25/tsvector lexical search (always available)
  • MMR reranking for result diversity
  • Temporal decay weighting (recent entries score higher)

For production agents, this matters because not all memory queries are semantic. Sometimes you need exact-match recall ("what was the deal ID for Acme?"), sometimes you need fuzzy ("what did we learn about Acme's procurement process?"). A single retrieval path handles both.


When Does the Architecture Actually Matter?​

Bolt-on memory is a reasonable choice for many use cases. If you are building a single assistant that needs to remember user preferences across sessions, Mem0 or Zep will get you there faster.

The ADL approach shows its advantage when:

1. Multiple agents need shared, structured context. If Agent A researches a company and Agent B writes the outreach email, they need to share what was learned, not as free text, but as structured records that Agent B can query by field.

2. Agents write back to business data. A memory system that is separate from your entity records cannot easily update a deal status field based on what an agent learned. ADL memory and entity records are the same store.

3. You need memory lifecycle governance at scale. When you are running dozens of agents, managing what each one remembers, for how long, and with what trust scope, TTL fields do not cut it. You need decay classes, namespace policies, and confidence-based retrieval.


The Honest Trade-Off​

The ADL approach has a cost. You do not get to drop in a memory library and call it done. You need to think about your data model, your namespace structure, and your decay policies upfront. That is more design work than pip install mem0.

For production agent systems, the kind where agents take real actions on real business data, that design work is the point. Bolt-on memory is a feature. Native memory is an architecture.


AI-assisted content. Reviewed and approved by a human before publication.