Skip to content
FossShelf
Home / Categories / For Data Engineers

Surrealdb

Multi-model database and AI agent memory layer

Replaces —

33.31K starsBUSL-1.1 (Change Date: 2030-01-01, Change License: Apache-2.0)last commit 9 Nov 2026
Screenshot of Surrealdb

Who it's for

AI agent developers

Teams building agents that need persistent, queryable memory with source attribution, temporal history, and hybrid graph-plus-vector retrieval in a single query, without maintaining a separate memory store alongside their application database.

The application has no AI agent component and requires only a conventional relational or document store.

Knowledge graph and GraphRAG teams

Engineers building retrieval systems that combine graph traversal with vector search for grounded, connected context, such as enterprise knowledge bases, recommendation engines, or fraud detection graphs that also need semantic similarity.

The workload is purely vector similarity search with no graph structure.

Teams collapsing a multi-database stack

Engineering organizations running separate relational, document, and search databases that want to reduce infrastructure overhead, eliminate cross-store consistency issues, and consolidate queries into one transactional engine.

The team is already committed to managed specialist services (e.g. Postgres + Pinecone + Neo4j) and the integration cost of migration outweighs the consolidation benefit.

Real-time application builders

Developers building collaborative tools, live dashboards, or event-driven applications who need live queries and change streams that push writes to clients the moment they commit, without a separate pub/sub layer.

The problem

Modern applications and AI agents typically need several specialized databases running in parallel: a relational store for structured data, a graph database for relationships, a vector store for semantic search, and a separate memory system for agents. Coordinating queries, transactions, and access control across these systems adds infrastructure complexity, increases latency from multiple network hops, and makes it harder to reason about consistency. SurrealDB addresses this by providing a single engine that natively handles all these data models in one ACID transaction, with permissions and retrieval built in.

How it works

Multi-model in one transaction

Documents, graphs, relational tables, vectors, time-series, and key-value records are native primitives that can be queried together in a single ACID transaction using SurrealQL, eliminating the need to coordinate across separate stores.

SurrealQL: one query language

SurrealQL unifies SQL, knowledge graph traversal, vector and full-text search, temporal queries, and key-value access in one language, so developers do not need to learn separate query dialects for each data model.

Agent Memory layer

SurrealDB stores AI agent facts with their source document, page, and timestamps attached as a single record. Graph traversal, vector search, filtering, and permissions can be expressed in one retrieval query, reducing context-retrieval hops.

Built-in access control

Permissions are defined at the role, record, and field level directly in the data layer, so every user, service, or agent only sees and modifies exactly what it is authorized to access, without a separate authorization service.

Real-time live queries

Live queries and change streams push writes to subscribed clients the moment they commit, making SurrealDB suitable for collaborative tools, recommendation engines, and fraud detection systems.

Flexible deployment targets

SurrealDB ships as a single Rust binary that runs embedded in an application, in the browser via WebAssembly, at the edge, as a self-hosted single node, or as a distributed cluster. A managed cloud option is also available.

Features

  • Multi-model in one transaction
  • SurrealQL: one query language
  • Agent Memory layer
  • Built-in access control
  • Real-time live queries
  • Flexible deployment targets

How to install

# Linux / macOS (single binary) curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh # macOS with Homebrew brew install surrealdb/tap/surreal # Docker (in-memory dev server) docker run --rm --pull always --name surrealdb -p 8000:8000 surrealdb/surrealdb:latest start --log info --user root --pass root memory

Recommended for this setup

Strengths

  • Eliminates multi-database sprawl: Teams at Cobrainer reported standing up graph, vector, and full-text search from one engine, and engineers at Later described collapsing responsibility into SurrealDB as their default engineering posture, removing the need to stitch together multiple specialized systems.
  • Single retrieval query for agents: Graph traversal, vector similarity, filtering, and permissions resolve in one retrieval query rather than requiring multiple round-trips across separate systems, which reduces latency and avoids wasting LLM tokens on unnecessary data.
  • MCP integration for AI agents: SurrealDB ships a Model Context Protocol server, so any LLM or AI agent that speaks MCP can reach the database and the agent memory layer directly without a custom integration layer.
  • Temporal fact tracking: Facts in Agent Memory carry their source and timestamps and can supersede one another while keeping history, so an agent can query what was true at a given point in time, not just the current state.

Trade-offs

  • BSL 1.1 license, not OSI-approved open source: SurrealDB is licensed under the Business Source License 1.1. BSL is source-available but restricts production use for competing database services; it is not an OSI-approved open source license. Teams with strict open source procurement requirements should evaluate this carefully.
  • Breadth means maturity trade-offs: Covering documents, graphs, vectors, time-series, relational, and full-text search in one engine means each individual model may lack the depth or ecosystem of a dedicated specialist database. Teams with very advanced requirements in one specific area may find a purpose-built tool more complete.
  • Operational familiarity required: SurrealQL is a new query language. Teams migrating from SQL-only or graph-only systems will need time to learn its combined syntax and mental model, especially for complex graph and temporal queries.

Tech stack

Languages
Rust, SurrealQL, TypeScript, PLpgSQL, Shell, Python, JavaScript, Nix, Dockerfile, HTML, DTrace, Makefile, RenderScript
Frameworks
—
Databases
NoSQL
Tooling
—

FAQ

Can SurrealDB replace both my application database and my vector store?

Yes. SurrealDB stores documents, relational tables, graph edges, vectors, and time-series data natively and can query them together in one transaction. Teams have reported collapsing three separate data stores into SurrealDB in production.

Can I self-host SurrealDB?

Yes. SurrealDB ships as a single Rust binary installable via Homebrew on macOS, a shell script on Linux, a PowerShell command on Windows, or Docker. It runs as an embedded library, a single server node, or a distributed cluster. A managed cloud option is also available.

What is the difference between the database and Agent Memory?

The database is the full multi-model engine for your application's data. Agent Memory is a layer on top that stores what an agent learns, with its source and timestamp attached, enabling temporal reasoning and hybrid retrieval. Both run on the same engine and can be queried together.

What license does SurrealDB use?

SurrealDB is licensed under the Business Source License 1.1 (BSL 1.1). The source code is publicly available, but BSL restricts production use for competing database services and is not an OSI-approved open source license.

Which programming languages does SurrealDB support?

SurrealDB provides official SDKs for Rust, JavaScript and TypeScript (Node.js, Deno, browser, WebAssembly), Python, Go, .NET, PHP, and Java. It also supports GraphQL and WebSocket connections.

Similar tools

More in Data Engineers