---
title: "The context and memory layer for AI agents | SurrealDB"
description: "SurrealDB is a multi-model database and an Agent Memory layer: one engine for your application's data and durable, provable memory for your AI agents."
url: https://surrealdb.com
---

# The context and memory layer for AI agents

[Explore the database](https://surrealdb.com/surrealdb) [Explore Agent Memory](https://surrealdb.com/agent-memory)

**Database.** Graphs, vectors, documents and relational data in one engine, in a single ACID transaction.

**Agent Memory.** Connects and retrieves context wherever your data lives, every fact carrying its source.

**Cloud.** Fully managed, in the cloud provider and region you choose.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

HOW IT FITS TOGETHER

## Memory on top. Database at the core. One connected view of everything your application and agents know.

Your application

Entity extraction

Knowledge Graph

Temporal facts

Hybrid retrieval

Documents

Graphs

Vectors

Relations

Time-series

Live queries

Object storageS3 / S3-compatible

WHAT SETS IT APART

## What makes it different

Database

Agent Memory

### [One database.Every data model.](https://surrealdb.com/surrealdb)

SurrealQL unifies SQL, knowledge graphs, vector and full-text search, temporal and key-value queries in one language - on one database, backed by object storage.

### [Better context.Less overhead.](https://surrealdb.com/surrealdb)

Retrieve more relevant context with fewer calls - helping improve accuracy, reduce latency and avoid wasting LLM tokens on unnecessary data.

### [One retrieval query.Fewer system hops.](https://surrealdb.com/surrealdb)

Search, graph traversal, filtering and permissions in one retrieval query, so the context stack has fewer systems to cross.

### [Access control.Built into the data layer.](https://surrealdb.com/surrealdb)

Define permissions at the role, record and field level, so every user, service or agent only sees and changes exactly what it should.

USE CASES

## What teams build on one engine. With the data model each workload needs.

### [GraphRAG](https://surrealdb.com/solutions/graph-rag)

Database

Retrieval that combines graph traversal with vector search for grounded, connected context.

Explore the database

### [Agent Memory](https://surrealdb.com/agent-memory)

Agent Memory

Persistent, queryable memory for agents - relationships, semantics, and recency in one store.

Explore Agent Memory

### [Knowledge graphs](https://surrealdb.com/use-cases/knowledge-graphs)

Database

Model entities and relationships natively - query structure and meaning together.

Explore the database

### [Temporal facts](https://surrealdb.com/agent-memory/temporal)

Agent Memory

Facts that supersede one another with the history kept, so an agent knows what changed and when.

Explore Agent Memory

### [Digital twins](https://surrealdb.com/use-cases/digital-twins)

Database

Assets, dependencies, telemetry and the agents that reason over them, in one transactional engine.

Explore the database

### [Real-time applications](https://surrealdb.com/use-cases/real-time)

Database

Live queries and change streams, so every client sees a write as it commits.

Explore the database

Documents, graphs, vectors, time-series and relational data are native primitives here. Query them together, in one transaction, in one language.

CUSTOMER STORIES

## Proven in production

[See more case studies](https://surrealdb.com/casestudies)

### [Three data stores collapsed into one](https://surrealdb.com/customer/samsung)

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)

### [An AI assistant for 10,000 technicians](https://surrealdb.com/customer/verizon)

![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)

### [Nine backend tools consolidated into one](https://surrealdb.com/customer/tencent)

![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

### [Low-latency RAG, under the customer's control](https://surrealdb.com/customer/polyai)

![PolyAI](https://surrealdb.com/assets/static/c5fa07c66cd05131.BnC7wHcc.svg)

### [45 million recommendation queries a month](https://surrealdb.com/customer/saks)

![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue-white.pDJ9HGmf.svg)

## Your questions, answered

What is SurrealDB?

SurrealDB is a multi-model database. Relational, document, graph, vector and time-series data are native primitives you can query together in one ACID transaction, using one query language, SurrealQL. Authentication, row-level permissions and live queries are built in.

How is Agent Memory related to the database?

Can I use SurrealDB without Agent Memory?

Why use SurrealDB instead of combining multiple databases?

Can I self-host SurrealDB?

How is SurrealDB licensed?

Can I get started without speaking to sales?

THE PLATFORM

## Everything an application and its agents know. Five surfaces, one engine.

Database

Document, graph, vector, time-series and relational in one engine.

![Five data models as dotted tiles: documents, graph, vector, time-series and relational](https://surrealdb.com/assets/static/platform-database.DUdumYDz.avif)

Read more

[Database](https://surrealdb.com/surrealdb)

Agent Memory

What an agent learns, with its source and its time, in the same engine.

![A timeline of remembered facts, each with its source](https://surrealdb.com/assets/static/platform-agent-memory.Cvv8D5Wl.avif)

Read more

[Agent Memory](https://surrealdb.com/agent-memory)

Cloud

Managed clusters in the regions you choose, scaled on demand.

![Clusters in three regions on a world map, each running or scaling](https://surrealdb.com/assets/static/platform-cloud.--QZnaVi.avif)

Read more

[Cloud](https://surrealdb.com/cloud)

Studio

Query, explore and design the schema from the browser.

![A SurrealQL query in Studio and the schema graph under it](https://surrealdb.com/assets/static/platform-studio.7ykBFNLq.avif)

Read more

[Studio](https://surrealdb.com/studio)

MCP

Every model that speaks MCP reaches the database and the memory directly.

![Three models connected through MCP to the database and Agent Memory](https://surrealdb.com/assets/static/platform-mcp.D_oH0_wm.avif)

Read more

[MCP](https://surrealdb.com/mcp)

IN PRODUCTION

## Trusted at scale. Samsung, Nvidia, Verizon, Tencent, and Walmart run on SurrealDB.

14,000+

Developers building on SurrealDB Cloud

4M+

Developers building on SurrealDB worldwide

FROM THE TEAMS

> SurrealDB gives us a foundation where we can unify semantic search, knowledge graphs, and AI-driven decision making without stitching together multiple systems. Collapsing responsibility into SurrealDB has become our default engineering posture.

*Justin Foley*

VP of Engineering, Later

GET STARTED

## Start with the database, or start with Agent Memory. Both run on one engine. The database is a free account away. Agent Memory is a context in Studio away.

[Explore the database](https://surrealdb.com/surrealdb) [Explore Agent Memory](https://surrealdb.com/agent-memory)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"WebSite","name":"SurrealDB","url":"https://surrealdb.com","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://surrealdb.com/docs?search={search_term_string}"},"query-input":"required name=search_term_string"}}
```

```json
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","url":"https://surrealdb.com/surrealdb","description":"The context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is SurrealDB?","acceptedAnswer":{"@type":"Answer","text":"SurrealDB is a multi-model database. Relational, document, graph, vector and time-series data are native primitives you can query together in one ACID transaction, using one query language, SurrealQL. Authentication, row-level permissions and live queries are built in."}},{"@type":"Question","name":"How is Agent Memory related to the database?","acceptedAnswer":{"@type":"Answer","text":"Agent Memory is a separate SurrealDB product built on the database. It turns conversations, documents and business events into a knowledge graph with provenance, using the database's own relationships and permissions rather than a second store alongside it."}},{"@type":"Question","name":"Can I use SurrealDB without Agent Memory?","acceptedAnswer":{"@type":"Answer","text":"Yes. SurrealDB, the database, is a complete product on its own, and is in production at Samsung, Verizon, Tencent and Saks Fifth Avenue. Agent Memory is an addition for teams building agents that need persistent, governed context."}},{"@type":"Question","name":"Why use SurrealDB instead of combining multiple databases?","acceptedAnswer":{"@type":"Answer","text":"Because retrieval often needs several shapes at once. SurrealDB can traverse a relationship, rank by vector similarity and match full text in a single statement, against one copy of the data, with no synchronisation between separate systems to maintain."}},{"@type":"Question","name":"Can I self-host SurrealDB?","acceptedAnswer":{"@type":"Answer","text":"Yes. Run it on your own infrastructure, embed it inside your application, or use SurrealDB Cloud, managed for you in the provider and region you choose. The same queries work across all three."}},{"@type":"Question","name":"How is SurrealDB licensed?","acceptedAnswer":{"@type":"Answer","text":"The SurrealDB engine is free to use, modify and self-host, including in production. The one thing its licence (BSL 1.1) reserves is running SurrealDB as a database service for third parties, where they create and manage their own schemas or tables. Each version becomes Apache 2.0 no later than four years after its release, and the SDKs and tools are open source under Apache 2.0 or MIT from day one."}},{"@type":"Question","name":"Can I get started without speaking to sales?","acceptedAnswer":{"@type":"Answer","text":"Yes for the database: create a free account and start building. Agent Memory is live too: create a context in Studio and start on the free Sandbox. Enterprise support, security review and procurement are there when you need them."}}]}
```
