Retrieval that understands relationships.
Traverse, not just match
Typed edges are records, so retrieval walks from a document to the entities around it.
Hybrid ranking built in
HNSW vectors, BM25 full-text and reciprocal rank fusion, natively in SurrealQL.
One round trip
One engine, one query and one consistent snapshot on every agent turn.
HOW IT WORKS
Three retrieval modes, one query. Embed, recall, rank, then walk the graph.
Embed the question, fuse vector recall with keyword relevance, then walk from the winning passages to the entities that ground the answer.
1-- Embed the question once
2LET $q = "why did the deployment fail on Tuesday?";
3LET $vec = fn::embed($q);
4
5-- Hybrid recall: vector similarity fused with BM25
6LET $passages = search::rrf([
7 (SELECT id, title,
8 (1 - vector::distance::knn()) AS vec_score
9 FROM document
10 WHERE embedding <|10,40|> $vec),
11 (SELECT id, title,
12 search::score(1) AS bm25_score
13 FROM document
14 WHERE content @1@ $q
15 ORDER BY bm25_score DESC)
16], 10);
17
18-- Ground the winners: walk to the entities around them
19SELECT id, title,
20 ->mentions->entity.* AS entities,
21 ->mentions->entity->relates_to->entity.* AS related
22FROM $passages;
MANAGED OR HAND-BUILT
Build it yourself, or let Agent Memory build it. The same pipeline, hand-built or managed.
Everything on this page is in the database today: you design the schema, own the graph and compose the queries. Agent Memory runs the same pipeline for you, extracting entities, building the knowledge graph and serving hybrid retrieval.
Your questions,answered
THE PLATFORM
Everything an application and its agents know. Five surfaces, one engine.
Database
Document, graph, vector, time-series and relational in one engine.

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

Cloud
Dedicated clusters by region, or serverless on SurrealDB Earth.

Studio
Query, explore and design the schema from the browser.

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

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.
VP of Engineering, Later
GET STARTED