Skip to main content

Lakebase vs MongoDB Atlas vs Redis for AI agent state and memory

Summary

  • For AI agent state and memory, pick Lakebase, the serverless Postgres database in the Databricks Data + AI Platform. It's a state store for agents that keeps the business records they act on in the same Postgres, with lakehouse data served in through synced tables.
  • All three can persist agent state and search it by vector, so storage alone doesn't decide it. What decides it is what that state has to do once it's written.
  • MongoDB Atlas is a fully managed document database with vector and full-text search. Redis is an in-memory data platform with vector search and configurable persistence.
  • Lakebase adds instant copy-on-write branches of production state, point-in-time restore, scale to zero and Unity Catalog registration, so analysts can query what agents wrote next to lakehouse tables.

Lakebase vs MongoDB Atlas vs Redis for AI agent state and memory

Pick Lakebase, the serverless Postgres database in the Databricks Data + AI Platform. All three can persist an agent's checkpoints and recall memories by vector search, so storage alone doesn't decide it. What decides it is everything that happens to agent state after the write: joining it with orders and accounts, rolling back a bad write, testing a new agent version against real state, and analyzing it next to lakehouse data. Lakebase does all of that in standard Postgres, on the same platform as your lakehouse.

What each database is

Lakebase is fully managed, serverless Postgres that runs the open source Postgres engine. Its compute is stateless and its data sits in a durable storage layer, which is what makes scale to zero, instant branches and fast failover possible. It's built on the serverless Postgres architecture that Neon pioneered, and Neon joined Databricks in 2025.
MongoDB Atlas is MongoDB's fully managed cloud database service. It is built on the document model and supports multi-cloud deployments on AWS, Azure and Google Cloud.
Redis is an in-memory data platform for AI applications. Redis Search adds vector search, full-text search and indexing on JSON and hash documents.

Lakebase vs MongoDB Atlas vs Redis: how they compare

Capability Lakebase MongoDB Atlas Redis
Data model Postgres tables, with json and jsonb types for flexible state Documents In-memory data; vectors and metadata stored in hashes or JSON documents
Durability Commits replicated across a quorum of SafeKeeper nodes Replica sets for redundancy and high availability; Atlas automates backups Configurable: RDB snapshots, AOF logging, both, or none
Semantic recall pgvector and Lakebase Search vector indexes Vector search on operational data Vector search with FLAT and HNSW indexes
Keyword search Lakebase Search BM25 indexes Full-text search Full-text search in Redis Search
LangGraph checkpointer langgraph-checkpoint-postgres (PostgresSaver), since Lakebase is standard Postgres langgraph-checkpoint-mongodb (MongoDBSaver) langgraph-checkpoint-redis (RedisSaver)
How you run it Managed in the Databricks Data + AI Platform on AWS, Azure and Google Cloud Managed cloud service on AWS, Azure and Google Cloud Redis Cloud, fully managed

Where each layer of agent state lives

Agent state has layers with different lifetimes:

  • Session state is the conversation history and saved graph state an agent replays to continue one interaction.
  • Long-term memories are durable facts recalled by meaning or by exact term in future conversations.
  • Business records and analytics are the orders, tickets and profiles the agent reads and changes, plus the reporting and evaluation you run over what agents did.

On Databricks, the first two layers have a managed home. Databricks' managed agent sessions and agent memory run on Lakebase and are the recommended path for new agents. Agent sessions can hold any state a framework persists, such as a LangGraph graph, and agent memory is searched with a natural-language query.
The third layer is where Lakebase is the pick. Business records are ordinary Lakebase tables, so one transaction can update an order and log the agent's decision together, and a single query can join a customer's open tickets with their account.

How Lakebase approaches agent state and memory

Size compute to agent traffic. With scale to zero on, a compute suspends after a period of inactivity and reactivates on the next query, and autoscaling works within a minimum and maximum you set.
Branch agent state. A branch is created instantly with copy-on-write, and its size doesn't affect creation time. Test a new prompt, tool or schema against a branch of production state, then reset or discard it. Point-in-time restore recovers from an unintended deletion while the original branch keeps running.
One ranked list for recall. Lakebase Search, generally available, merges vector and BM25 matches into a single ranking inside Postgres.
Govern analytical access. Registering Lakebase in Unity Catalog creates a read-only catalog, so analysts can query the tables agents write next to lakehouse tables, with Unity Catalog permissions, lineage and audit logs applied to that analytical access. Synced tables bring lakehouse profiles, features and scores into Lakebase for agents to read at low latency.

FAQs

Do Lakebase, MongoDB Atlas and Redis all work with LangGraph?

Yes. LangGraph's checkpointer integrations list langgraph-checkpoint-postgres, langgraph-checkpoint-mongodb and langgraph-checkpoint-redis. The Postgres package connects to Lakebase because Lakebase is standard Postgres.

If I pick Lakebase, where do sessions and memory go?

For a new agent, into Databricks' managed agent sessions and agent memory: both run on Lakebase and are the recommended path for new agents. The orders, tickets and decision logs the agent writes go in your own Lakebase tables.

Can I store flexible, schema-light agent state in Lakebase?

Yes. Postgres offers json and jsonb types, so a tool result can sit in a JSON column next to typed columns you query and index.

Can agents read lakehouse data from Lakebase?

Yes. Synced tables serve Unity Catalog tables into Postgres, so an agent reads profiles, features or risk scores with the same Postgres driver it uses for its own tables.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.