SurrealDB
A multi-model database that unifies documents, graphs, vectors, time-series, and relational data in one ACID transaction — the context layer for AI agents.
At a Glance
About SurrealDB
SurrealDB is a multi-model database built in Rust that combines document, graph, relational, time-series, geospatial, and vector data models into a single engine with one query language (SurrealQL). It is developed by SurrealDB Ltd., registered in England and Wales, and is available as a managed cloud service, self-hosted binary, embedded library, or WebAssembly module running in the browser.
What It Is
SurrealDB positions itself as the "context layer for AI agents" — a unified database infrastructure where storage, context, and memory live in a single ACID transaction. Rather than stitching together a vector database, a graph database, a document store, and a separate memory middleware, SurrealDB provides all of these as native primitives in one engine. Its query language, SurrealQL, extends SQL with graph traversals, record links, vector operations, full-text search, and built-in authentication, so developers can express complex multi-model queries in a single round trip.
Core Architecture
The platform is organized into three layers:
- Spectron — persistent agent memory with entity extraction, knowledge graphs, temporal facts, and hybrid retrieval, built into SurrealDB rather than bolted on top.
- SurrealDB — the multi-model context engine supporting documents, graphs, vectors, time-series, full-text, and relational data in one ACID transaction with built-in auth, permissions, live queries, event triggers, and custom API endpoints.
- SurrealDS — a distributed storage layer with quorum consensus, compute-storage separation, and support for object storage backends (S3, GCS, Azure Blob), enabling horizontal scale and high availability.
Key Capabilities
- Multi-model queries: Graph traversal, vector similarity (HNSW with cosine, euclidean, manhattan), full-text search (BM25), and hybrid search (reciprocal rank fusion) can all be combined in a single SurrealQL statement.
- ACID transactions: Multi-row, multi-table transactions across all data models with no partial writes.
- Built-in auth and permissions: Record-level access control, table-level permissions, field-level security, and third-party JWT/OAuth support are defined directly in the schema — no sidecar auth service required.
- Live queries: Real-time push notifications to connected clients as data commits, with no polling or message broker needed.
- Extensibility: Custom functions in SurrealQL or JavaScript, and WebAssembly plugins compiled from Rust for near-native performance in a sandboxed environment.
- Deployment flexibility: Runs as a single binary on macOS, Linux, and Windows; as a Docker container; embedded in Python and JavaScript runtimes; via WebAssembly in the browser; or as a distributed cluster with a Kubernetes operator and Helm charts.
- SDKs: Official SDKs for Rust, JavaScript/TypeScript, Python, Go, Java, .NET, PHP, and C, with client-side support for React, Next.js, Vue, Svelte, Angular, and SolidJS.
Deployment and Licensing
The core SurrealDB database is released under the Business Source License 1.1 (BSL 1.1), which permits non-production use freely and converts to Apache License 2.0 on 2030-01-01. SDKs and client libraries are released under Apache 2.0 or MIT. The BSL license means the core engine is source-available but not OSI-approved open source. SurrealDB Cloud runs on AWS and offers a managed "Start" tier with usage-based compute pricing, a "Scale" tier for fault-tolerant production workloads (waitlist), and an "Enterprise" tier for self-hosted or private cloud deployments with custom pricing.
Update: SurrealDB 3.x
The latest stable release series is 3.x, with v3.0.5 published on 2026-03-27. The SurrealDB site publishes benchmark results comparing 3.x against 2.x across CRUD operations, batch writes, full-table scans, and indexed queries, measured using the open-source crud-bench harness. The 3.x series introduced the SurrealDS distributed storage engine, Spectron agent memory, WebAssembly plugin support, and the Model Context Protocol (MCP) integration for connecting AI tools like Cursor, VS Code, and Claude directly to the database. The GitHub repository shows 32,300+ stars and active development with the main branch receiving regular pushes.
Compliance and Security
SurrealDB holds SOC 2 Type II, ISO 27001, GDPR, CCPA, and Cyber Essentials Plus certifications. Enterprise features include FIPS-compliant cryptography, encryption at rest, security audit logging with streaming to S3/CloudWatch/Datadog/Splunk, trusted execution environments, and priority security patching ahead of the open-source release cycle.
Community Discussions
Be the first to start a conversation about SurrealDB
Share your experience with SurrealDB, ask questions, or help others learn from your insights.
Pricing
Start
Best for prototypes, testing, and development. Only pay for what you use beyond the free tier.
- 1GB storage free, forever
- Scale vertically to terabytes
- Automatic burst scaling
- Daily automated backups
- Cloud RBAC and ABAC
Start (Usage-Based)
Pay-as-you-go compute and storage beyond the free tier for the Start plan.
- Usage-based compute at $0.021/hr beyond free tier
- Scale vertically to terabytes
- Automatic burst scaling
- Daily automated backups
- Cloud RBAC and ABAC
- Multi-model queries
Scale
For production workloads requiring fault-tolerance and high availability. Pricing coming soon.
- Highly-available and fault-tolerant
- Multiple availability-zone deployment
- Scale horizontally to Petabytes
- Multi-region disaster recovery
- Object-storage backed data (coming soon)
- Database branching and forking (coming soon)
Enterprise
On-premises or in your own private cloud. Full control, your infrastructure.
- Self-hosted deployments
- Audit logging and compliance
- SSO and advanced access controls
- Gen-3 distributed storage engine
- Database branching and forking
- SLA-backed uptime guarantees
- FIPS-compliant cryptography
- Object file storage backends
- Distributed live queries
- Priority security patching
- Trusted execution environments
Standard Support
Professional support for development teams with business hours coverage and email support.
- 09:00 to 17:00 coverage
- Severity 1: 8 business hours
- Severity 2: 12 business hours
- Severity 3: 24 business hours
- Severity 4: 24 business hours
- Email and ticketing support channels
- Community support
- Surreal Sidekick AI copilot
Business Critical Support
Priority support for production applications with 24x7 coverage and faster response times.
- 24x7 support coverage
- Severity 1: 2 hours
- Severity 2: 4 hours
- Severity 3: 8 business hours
- Severity 4: 24 business hours
- Email and ticketing support channels
- Community support
- Surreal Sidekick AI copilot
Premium Support
Premium support for mission-critical applications with the fastest response times and dedicated resources.
- 24x7 support coverage
- Severity 1: 30 minutes
- Severity 2: 1 hour
- Severity 3: 4 business hours
- Severity 4: 24 business hours
- Email and ticketing support channels
- Dedicated Slack channel
- Technical account manager
- Community support
- Surreal Sidekick AI copilot
Capabilities
Key Features
- Multi-model database: documents, graphs, vectors, time-series, relational in one engine
- SurrealQL query language with graph traversal, vector search, and full-text search
- ACID transactions across multiple rows and tables
- HNSW vector indexing with cosine, euclidean, and manhattan distance metrics
- Hybrid search combining BM25 full-text and vector similarity via reciprocal rank fusion
- Live queries with real-time push notifications to connected clients
- Built-in authentication and row-level permissions defined in schema
- Spectron agent memory with entity extraction, knowledge graphs, and temporal facts
- WebAssembly plugin support for custom extensions compiled from Rust
- Custom JavaScript functions embedded in queries
- GraphQL schema auto-generation and querying
- REST API and WebSocket protocol support
- Custom HTTP API endpoints defined in SurrealQL
- Table events and asynchronous event triggers
- Aggregate indexed views for pre-computed analytics
- Geospatial data types and operators (GeoJSON)
- Versioned temporal tables (experimental)
- SurrealML: import and run PyTorch, TensorFlow, and Sklearn models inside the database
- File storage buckets with S3, GCS, and Azure Blob backends
- Model Context Protocol (MCP) integration for AI tools
- LangChain integration
- Embedded deployment in Python, JavaScript, WebAssembly, and browser
- Single binary with no external runtime dependencies
- Kubernetes operator and Helm charts
- Docker container support
- SOC 2 Type II, ISO 27001, GDPR, Cyber Essentials Plus compliance
- FIPS-compliant cryptography (Enterprise)
- Distributed live queries across multi-node clusters (Enterprise)
- Surrealist visual UI for data exploration and graph visualization