RushDB vs SurrealDB: two different bets on one engine.
SurrealDB and RushDB both promise one engine for structured, connected, and semantically searchable data instead of stitching together separate stores. The difference is architecture and query surface: SurrealDB is a from-scratch multi-model engine queried with SurrealQL and can run embedded in-process; RushDB is a JSON-in, schema-inferred API layer over graph storage, queried through REST/SDK/MCP.
0
New query languages to learn
SurrealQL blends SQL, NoSQL, and graph syntax your team has to learn; RushDB is a JSON-shaped REST/SDK/MCP surface it already knows.
1
Write for records + edges
Nested JSON replaces per-edge RELATE statements — structure already in the payload becomes relationships automatically.
Managed
Embeddings on write
SurrealDB indexes vectors you compute elsewhere; RushDB can generate them server-side for any indexed text property.
Side by side
The same task in both: connect a customer to orders and traverse them.
Both snippets create connected records and read them back through the relationship. The difference is whether the connection comes from statements or from the shape of the data.
-- Create records, then wire edges by hand
CREATE customer:cust1 SET name = 'Acme';
CREATE order:ord1 SET summary = 'Annual plan upgrade';
CREATE order:ord2 SET summary = 'Added 40 seats';
RELATE customer:cust1->placed->order:ord1;
RELATE customer:cust1->placed->order:ord2;
-- Traverse with arrow syntax
SELECT ->placed->order.* FROM customer:cust1;
-- Vector search: define an HNSW index and bring
-- your own embeddings (no built-in generation)A dedicated query language, per-edge RELATE statements, and bring-your-own vectors.
import RushDB from '@rushdb/javascript-sdk'
const db = new RushDB('RUSHDB_API_KEY')
// The payload shape IS the relationship
await db.records.importJson({
label: 'CUSTOMER',
data: {
name: 'Acme',
ORDER: [
{ summary: 'Annual plan upgrade' },
{ summary: 'Added 40 seats' },
],
},
})
// Traverse through the same JSON contract
const orders = await db.records.find({
labels: ['ORDER'],
where: { CUSTOMER: { name: 'Acme' } },
})No new language — nesting creates the edges, and the same JSON contract reads them back.
Switching
Moving from SurrealDB: the same one-engine promise, without the new language.
Both products bet on one engine for documents, graphs, and vectors. The tax in SurrealDB is SurrealQL fluency and hand-wired RELATE edges. Migration is mechanical: SurrealDB records export as JSON, which is exactly what RushDB ingests — edges become nested structure or explicit relationship writes.
01
Export tables as JSON
SurrealDB records are JSON-native, so exports map directly to RushDB records with property types inferred on import.
02
Turn edges into structure
RELATE edges become nested payload structure where the hierarchy is natural, explicit relationship writes where it isn’t — and suggested patterns propose links for flat exports.
03
Re-point applications
Swap SurrealQL calls for the SDK or REST API. The surface stays identical across managed cloud, BYOC, and self-hosted.
Who this is for
Pick the right tool for the job.
Choose RushDB if
- You want to push JSON as-is and have property types and parent-child links inferred, without learning a new query language.
- You want managed embedding indexes and an MCP server built specifically for agent tool access.
- You want the same REST/SDK API whether you run managed cloud, BYOC, or self-hosted.
Choose SurrealDB if
- You need the engine to run embedded in-process (desktop apps, edge, local dev) with no server at all — SurrealDB documents this as a first-class deployment mode.
- You want one query language (SurrealQL) that spans documents, graph edges, time-series, and vector search natively.
- You want fine-grained control over SCHEMAFULL vs SCHEMALESS per table.
If you need one engine that also runs embedded on the edge or in a desktop app, and your team is comfortable learning SurrealQL, SurrealDB’s single-engine bet is compelling. If you want a server-side API that infers schema from JSON as it arrives, ships managed embeddings, and exposes a live schema and MCP tools built specifically for agents, RushDB is the closer fit.
Comparison table
Data model, graph traversal, and deployment
SurrealDB rows below are sourced from SurrealDB’s own docs and pricing page, checked on the date shown. One caveat carried over from research: SurrealDB’s own pages disagree on the exact license short-name (BSL-1.1 in the LICENSE file vs. "BSL-1.0" on the open-source page), and the implicit default for SCHEMAFULL/SCHEMALESS when neither is specified isn’t documented — both are flagged rather than asserted.
Records with typed properties and graph relationships (LMPG), queried through a JSON-shaped REST/SDK API.
Multi-model in one Rust engine: document, graph, time-series, relational, geospatial, and key-value, queried via SurrealQL, a SQL/NoSQL/graph hybrid language.
Source· checked 2026-07-01Relationships traversed through SearchQuery; nested-JSON parent-child links are automatic, cross-source links are reviewable suggestions.
RELATE statements create edge tables (with in/out fields); traversal uses directional arrow syntax, including recursive multi-hop paths, instead of joins.
Source· checked 2026-07-01Managed embedding indexes (server-side generation) or bring-your-own vectors, combined with exact filters in one query.
Native vector indexing via HNSW (in-memory) and, since v3.1.0, DISKANN (on-disk); no built-in embedding generation found — bring your own vectors via an external provider.
Source· checked 2026-07-01Infers property types and structure from JSON as it arrives; optional Model classes add validation when needed.
Tables can be declared SCHEMALESS (free-form fields) or SCHEMAFULL (fields predefined via DEFINE FIELD); SurrealDB’s docs do not state which applies by default when neither is specified.
Source· checked 2026-07-01Managed cloud, BYOC on your own Neo4j/Aura instance, or self-hosted with Docker Compose — always server-based, same API surface.
Self-hosted/embedded (in-memory, RocksDB/SurrealKV, or distributed cluster) or managed SurrealDB Cloud; can run embedded in-process with no server at all, which RushDB does not offer.
Source· checked 2026-07-01Positioned as a graph memory layer for AI agents with a native MCP server and Schema API for agent tool access.
Homepage headline: "The context layer for AI agents." Companion product Spectron is positioned as "persistent, queryable, autonomous memory for AI agents."
Source· checked 2026-07-01Free plan includes 100K Knowledge Units per month, no credit card required.
"Start" tier: 1 free instance, 1GB storage, free forever (0.25 vCPU / 1GB RAM).
Source· checked 2026-07-01SurrealDB facts sourced from surrealdb.com/docs, surrealdb.com/pricing, and SurrealDB’s GitHub LICENSE file as of the dates shown above; the SurrealQL snippet follows documented CREATE/RELATE/SELECT syntax. Two items are explicitly flagged as unconfirmed in the table above rather than asserted. RushDB facts are drawn from RushDB’s own docs and feature pages linked throughout this site. Report a stale claim to hi@rushdb.com.
Implementation example
Store and recall agent memory over a JSON-shaped API
No new query language to learn — write JSON, index the field you want recalled by meaning, then search.
from rushdb import RushDB
db = RushDB("RUSHDB_API_KEY")
db.ai.indexes.create({
"label": "MEMORY",
"propertyName": "output",
})
db.records.create(
label="MEMORY",
data={
"agent_id": "agent-42",
"kind": "decision",
"output": "Keep the free plan, but increase Pro onboarding limits after launch feedback.",
"status": "approved",
},
)
recall = db.ai.search({
"labels": ["MEMORY"],
"propertyName": "output",
"query": "What did we decide about Pro onboarding?",
"where": {"agent_id": "agent-42", "status": "approved"},
"limit": 5,
})
print(recall.data)Questions developers ask.
Related
Go deeper on the workflow.
Use case
AI Agent Memory Database
Store agent state, decisions, and tool output across sessions. Recall context by meaning and agent ID without a separate vector store or sync pipeline.
Open use caseUse case
Database for AI-Powered Apps
Store evolving product data, search by meaning, and query relationships from one backend. Add AI features without another sync pipeline.
Open use caseGuide
Knowledge Graph Memory
Learn how graph memory keeps documents, entities, citations, users, and decisions connected for AI agents and GraphRAG workflows.
Read guideGuide
Vector Database vs Memory Layer
Compare vector databases and memory layers for AI agents. Learn when semantic search is enough and when records, relationships, and schema are needed.
Read guideNext step