Skip to content
NEW

Introducing SurrealDB Studio, the new official app of SurrealDB

Learn more

1/5

Agent memory
you can trust

AI agents forget everything when a session ends. Agent memory is the memory layer that gives them durable, long-term memory and recall you can trust - so every agent you build remembers what happened, and can prove where each answer came from.

Works with · +29 more

Claude Desktop and Claude CodeCursorOpenAI CodexOpenClawHermesVS CodeWindsurfZedLangChainVercel AI SDKCloudflaren8nZapier
const memory = new AgentMemory({
context: "acme-prod",
});

await memory.remember(
"I work at Acme as CTO",
);

const hits = await memory.recall(
"what do I do at Acme",
);

hits

Works at Acme as CTO

Session 4 · turn 12

· confidence 0.94

Prefers squash merges on this repo

Session 9 · turn 3

· confidence 0.88

WHY AGENTS FORGET

Agents fail because of context, not models.

An agent's only built-in memory is the context window, and it is wiped when the session ends. Everything it worked out, it works out again - the same files re-read, the same dead ends re-tried, the same corrections re-typed by whoever is supervising it.

Session 1 · what it learned
Token-refresh race
Squash-merges, tabs
Cache rewrite: ruled out
Session ends
context window cleared
Without memory
Starts over
Re-reads every file
Re-tries the discarded approach
Asks the same questions again
With Agent memory
Picks up instantly
Token-refresh raceSession 1 · turn 8
Squash-merges, tabsSession 1 · turn 14
Cache rewrite: ruled outSession 1 · turn 31

Same model, same prompt, same tools. The only difference is whether the last session survived - and, because every recalled fact cites the turn it came from, whether the agent can show you why it believes it.

THE SUITE

One memory layer, six moving parts.

Memory, a knowledge graph, hybrid recall, tiered queries, provenance, and background understanding - not six products to integrate, but one system you buy, secure, and audit once.

HOW IT WORKS

Every turn: read → think → write

Agents operate in a continuous cycle: read context, reason over it, and write results back. Agent memory keeps the entire loop inside one engine and one transaction boundary.

Read

SurrealQL

Multi-model query

Graph

Vector

Temporal

Unified result set

Pull the whole context in one round trip

Graph traversal, vector search, and temporal facts resolve in a single SurrealQL statement. No fan-out across a vector store, a graph store, and a row store, and no application-side join to reconcile them.

One statement, one round trip

Eight retrieval signals fused in one ranker

Per-verb grants applied at the engine, deny by default

Think

Result set

Multi-model query output

Documents

Relations

Vectors

History

Complete context

The agent reasons over complete context

Documents, relationships, embeddings, and history arrive together rather than as separate results the agent has to stitch. What comes back is the slice that matters for this turn, with the sources attached.

Documents, relations, and embeddings in one payload

Superseded facts marked, not silently dropped

Every answer carries the exact sources behind it

Write

BEGIN TRANSACTION

ACID transaction boundary

Update

Create

Trigger

COMMITTED

Persist the turn in one ACID transaction

Decisions, entity updates, and events commit together or not at all. There is no window where the vector index has the embedding but the graph has not yet learned the fact.

One ACID transaction per fact

No partial writes, no cross-store drift

Tri-temporal history recorded on every change

FOR DEVELOPERS

Drop it in beneath your agent.

Agent memory doesn't replace your agent framework or manage the context window - it's the memory layer you add underneath. Connect over MCP from any client, the TypeScript SDK, the CLI, or the REST API, with adapters for LangChain, OpenAI Agents, the Vercel AI SDK, and n8n. Then it's two calls: remember and recall.

Applications
Agent memory
Agent memory
Entity extraction
Knowledge graph
Temporal facts
Hybrid retrieval
SurrealDB
Database
Documents
Graphs
Vectors
Time-series
Auth
APIs
Distributed write nodes
Node A
Node B
Node C
Object storage (S3 / GCS / Azure Blob)
// npm install @surrealdb/agent-memory
import { AgentMemory } from "@surrealdb/agent-memory";

const memory = new AgentMemory({ context: "acme-prod" });

await memory.remember("I work at Acme as CTO");
const hits = await memory.recall("what do I do at Acme");

One Rust binary with MCP built in - seven tools: remember, recall, context, reflect, forget, upload, and inspect. No Python runtime, no sidecars.

ONE SUBSTRATE

One engine, not a pile of stores.

Most memory layers stitch a vector store, a graph store, and a row store together with glue code, and inherit every seam - no cross-store transactions, drift, separate scaling. Agent memory is one SurrealDB engine: graph, vector, document, and time in a single ACID transaction, no plumbing to run.

Before - Multiple stores

Client
0ms
Your application
6 SDKs · 6 drivers · 6 connection pools

Vector
database

Proprietary API

Full-text search
database

Search DSL

Time-series
database

InfluxQL / Flux

Document
database

SQL / MQL

Graph
database

Cypher / Gremlin

Relational
database

SQL

Eventual consistency only

After - Agent memory on SurrealDB

Client
0ms
Your application
1 SDK · 1 driver · 1 connection pool
SurrealDB
Database

SurrealQL

Vectors
Full-text
Time-series
Documents
Graphs
Relational
Single ACID transactionStrong consistency

The architecture, row by row

Agent memory

Memory middleware

Vector databases

Storage model
One multi-model database
Two or three stitched stores
Vector index only
Write consistency
One ACID transaction per fact
Eventual across stores
Provenance
Stored field on every row
Bolt-on metadata
Time model
Tri-temporal: system, known, valid
Timestamps
Audit trail
Queryable trace graph
External logging
Retrieval signals
Eight, fused in one ranker
Vector plus rerank
Similarity only
Access control
Per-verb grants, deny by default
Application-level
Application-level
Extra infrastructure
None - scales to zero
A service plus its stores
Plus a database for state

PRICING

Pick a plan, start in a week's free trial.

Three self-serve plans priced on the tokens your agents actually use, and an enterprise package for larger allowances and single-tenant isolation. SurrealDB, the engine underneath, is open source and free to self-host.

One-week free trial

Full memory layer, no feature gates

MCP, SDK, CLI, and REST

Scales to zero between sessions

Agent memory Lite

$29

/mo

The entry rung of the ladder - the full memory layer, sized for getting started.

What you get

1 million tokens per month included

One-week free trial

Knowledge graph, provenance, and tri-temporal memory

Hybrid retrieval (vector + BM25 + graph)

MCP server, TypeScript SDK, and CLI

Plus

Community support

Agent memory

$299

/mo

For production agent workloads with real usage.

What you get

10 million tokens per month included

One-week free trial

Everything in Agent memory Lite

Plus

Community support

Agent memory+

$1,099

/mo

For scaling agent fleets and heavier ingestion.

What you get

40 million tokens per month included

One-week free trial

Everything in Agent memory

Plus

Community support

Enterprise

Custom

For larger token needs and enterprise controls.

What you get

Larger token allowances

Single-tenant on SurrealDB Cloud

Self-hosted and air-gapped deployments for qualifying engagements

Custom SLAs

Plus

Enterprise support

Usage beyond the included tokens is charged at the published overage rate for your plan. Enterprise allowances, single-tenant deployments, and custom SLAs are agreed with sales.

Agent memory Lite

Agent memory

Agent memory+

Enterprise

Monthly price
$29
$299
$1,099
Custom
Included tokens per month
1 million
10 million
40 million
Custom
One-week free trial
Usage beyond included tokens
Overage rates apply
Overage rates apply
Overage rates apply
Custom

Agent memory Lite

Agent memory

Agent memory+

Enterprise

Knowledge graph with entity extraction
Conversational memory
Tri-temporal versioning and supersession
Provenance on every fact
Hybrid retrieval (vector + BM25 + graph)
Retrieval, decision, and response traces
Multi-modal document pipeline
MCP server, TypeScript SDK, and CLI

Agent memory Lite

Agent memory

Agent memory+

Enterprise

Context isolation (own namespace and database)
Scoped permissions and API-key attenuation
Prompt-injection scanning
First-class forget verb (GDPR erasure)
Single-tenant deployment
Self-hosted / air-gapped deployment
Qualifying engagements

Agent memory Lite

Agent memory

Agent memory+

Enterprise

Community support
Enterprise support with SLAs

INTEGRATIONS

Connects to everything you already use

MCP clients, the TypeScript SDK, the CLI and REST API, agent frameworks and automation platforms - the same wall as the product's own connect surface.

SDKs & API

Talk to a Context directly from your own code.

Agent memory CLI

Connect via CLI

JavaScript

Connect via SDK

Python

Connect via SDK

Go

Connect via SDK

Swift

Connect via SDK

Kotlin

Connect via SDK

Haskell

Connect via SDK

Elixir

Connect via SDK

Dart

Connect via SDK

REST API

Connect via API

Agents & coding tools

Connect your AI agents and coding assistants for persistent memory.

Claude Code

Connect via MCP

Claude Desktop

Connect via MCP

Cursor

Connect via MCP

OpenAI Codex

Connect via MCP

OpenClaw

Connect via MCP

Hermes

Connect via MCP

VS Code

Connect via MCP

Windsurf

Connect via MCP

Zed

Connect via MCP

Any MCP client

Connect via MCP

Frameworks

Wire a Context into your agent framework of choice.

LangChain

Connect via package

OpenAI Agents

Connect via package

Vercel AI SDK

Connect via package

EveJS

Connect via package

Cloudflare

Connect via MCP

TanStack AI

Connect via MCP

Mastra

Connect via MCP

Automation platforms

Give your automation workflows access to a Context's memory.

n8n

Connect via node

Zapier

Connect via MCP

Messaging

Bring a Context's memory to the channels you already message on.

WhatsApp

Coming soon

Telegram

Coming soon

Facebook Messenger

Coming soon

SMS / RCS

Coming soon

Connectors

Sync memory to and from the tools and data platforms your team uses.

SurrealDB

Coming soon

Slack

Coming soon

Notion

Coming soon

Google Drive

Coming soon

GitHub

Coming soon

Linear

Coming soon

Confluence

Coming soon

Databricks

Coming soon

Snowflake

Coming soon

GET STARTED

Give your agents a memory that lasts

Durable memory, trustworthy recall, and a knowledge graph - one system you buy, secure, and audit once. Built on SurrealDB.

SamsungNVIDIAAppleVerizonTencent

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Every plan starts with a one-week free trial · self-serve from $29 a month.

FREQUENTLY ASKED QUESTIONS

Agent memory FAQ

SurrealDB

The database and
memory 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