Skip to content

GraphRAG, in one engine

Traversal. Retrieval grounded in the relationships between entities.
Vector search. Semantic similarity beside the graph, in the same engine.
One query. Traversal, vectors and ranking together, in SurrealQL.

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.

-- Embed the question once
LET $q = "why did the deployment fail on Tuesday?";
LET $vec = fn::embed($q);

-- Hybrid recall: vector similarity fused with BM25
LET $passages = search::rrf([
(SELECT id, title,
(1 - vector::distance::knn()) AS vec_score
FROM document
WHERE embedding <|10,40|> $vec),
(SELECT id, title,
search::score(1) AS bm25_score
FROM document
WHERE content @1@ $q
ORDER BY bm25_score DESC)
], 10);

-- Ground the winners: walk to the entities around them
SELECT id, title,
->mentions->entity.* AS entities,
->mentions->entity->relates_to->entity.* AS related
FROM $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

Retrieval-augmented generation grounded in a knowledge graph. Retrieval follows the relationships between entities, so the model receives connected context: who did what, when, and how it relates to the question.

THE PLATFORM

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

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

Ground your retrieval. Graph traversal, vector search and full-text ranking in one engine.

ISO 27001
AICPA SOC 2 Type 2
Cyber Essentials
GDPR
Cyber Essentials Plus
SurrealDB

The context and memory layer for AI agents

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.

Explore with AI

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom