Skip to content
NEW

Introducing SurrealDB Studio, the new official app of SurrealDB

Learn more

1/6

Agent Memory vs. memory middleware

Mem0, Zep, Letta, and other memory middleware add another layer between your agent and storage. The fragmented memory tax is why memory should live in the database.

THE LANDSCAPE

A growing category with a shared limitation

A growing number of agent memory middleware products have emerged. Each solves a real developer pain point, but they all share the same architectural limitation: memory lives outside the database, not inside it.

Mem0

LLM-driven memory extraction and consolidation with optional graph storage. Excellent developer experience, but built on fragmented infrastructure underneath.

Zep

Long-term memory for assistants with temporal knowledge graphs and entity extraction. Adds structure, but as a separate service with its own consistency model.

Letta (MemGPT)

Self-editing memory framework where agents manage their own context window and long-term storage. Innovative, but memory lives outside the transactional boundary.

THE FRAGMENTED MEMORY TAX

Middleware hides the problem. It doesn't solve it.

Memory middleware sits between the agent and the database, introducing consistency gaps, added latency, separate permissions, and operational burden.

App state

User session

Vector DB

Embeddings

Graph DB

Relations

Doc store

Documents

Auth

Identity

Data fragments at every system boundary

Agent

Vector DB

Graph DB

Doc store

Auth

Total

Cumulative latency

Consistency gaps

Writes to memory and writes to state can diverge - no atomicity across systems.

Latency

Every memory operation is a round trip through middleware. Two hops instead of one.

Operational burden

Another service to deploy, monitor, and secure. Another failure mode to manage.

Separate permissions

Memory middleware has its own auth. Your database has its own. Two permission models to keep in sync.

THE ALTERNATIVE

ACID transactions across every data model

Agent Memory eliminates the middleware layer entirely. Memory lives in SurrealDB with ACID guarantees, unified permissions, and zero extra infrastructure.

ACID memory

Agent Memory lives in SurrealDB. Agent Memory and application state commit in one transaction - no divergence.

One permission model

RBAC and record-level permissions apply to memory and data alike. One auth, one policy.

No middleware

Agents write directly to the database. One round trip. No extra latency, no extra failure modes.

TRUSTED BY

Enterprise teams building on SurrealDB

From knowledge graphs to AI assistants - how enterprise teams are building on SurrealDB.

SamsungDATABASE

Unlocking insights with knowledge graphs

Samsung Ads uses SurrealDB to build dynamic, real-time knowledge graphs for smarter campaign execution - collapsing three legacy data stores into one.

VerizonDATABASE

AI assistant empowering 10,000 technicians

Verizon uses SurrealDB to power a generative AI assistant for 10,000 field technicians, delivering instant access to documentation, outage updates, and workflows.

TencentDATABASE

Unified infrastructure monitoring

Tencent consolidated nine backend tools into one real-time monitoring platform powered by SurrealDB's multi-model context graph.

PolyAIDATABASE

High-performance customer service AI powered by RAG

PolyAI connects SurrealDB to Agent Studio for low-latency, customer-controlled RAG across voice AI experiences.

Saks Fifth AvenueDATABASE

AI-powered personalisation at massive scale

Saks Fifth Avenue uses SurrealDB's vector search and graph capabilities to deliver real-time, AI-powered personalisation across 5 million luxury customers and 45 million monthly product-recommendation queries.

FREQUENTLY ASKED QUESTIONS

Memory middleware

GET STARTED

Memory without the memory tax

Agent Memory eliminates the fragmented memory tax entirely. No middleware, no consistency gaps, no extra infrastructure.

SamsungNVIDIAAppleVerizonTencent

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

SurrealDB

The unified data layer for AI

Graph, vector, document, and relational in one engine.
Agent Memory that connects and retrieves context wherever your data lives.

Explore with AI

Stay in the loop

Tutorials, AI agent recipes, and product updates, every two weeks.

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom