详细内容
Multi-model RAG with SurrealDB & LangChain

The multi-model database for AI agents
Unify data. Unlock intelligence. Scale anywhere.

The multi-model database for AI agents
Unify data. Unlock intelligence. Scale anywhere.



















See why companies choose SurrealDB
Unify your data infrastructure with a single platform
Unified multi-model database\
Combines document, graph, time-series, relational, geospatial and key-value data models natively, without workarounds or added complexity. \
\
\
Document \
\
Vectors \
\
Graph \
\
Time-series \
\
Geospatial \
\
Relational [AI native data layer\
Purpose-built for AI and context-aware applications with integrated search and retrieval (vector, full-text, hybrid) that blend semantic, graph, and relational intelligence. \
\
SELECT \\
supplier.{ name, address }, \\
vector::similarity::cosine(embedding, $ideal_spec) AS score\\
FROM manufacturer\\
WHERE geo::distance(location, $site) < 10000\\
ORDER BY score DESC\\
FETCH contacts;\\
```](https://surrealdb.com/solutions/agentic-and-gen-ai) [**Lower cost**\\
Reduce total cost of ownership by eliminating the complexity of maintaining separate vector, graph, and document databases. \\
](https://surrealdb.com/cloud) [**Unmatched scalability**\\
Scale from a single node to a horizontally-scalable cluster with petabytes of data, without sharding. \\
](https://surrealdb.com/cloud) [**Deploy anywhere**\\
From in-memory and edge devices to self-hosted or global cloud infrastructure. \\
](https://surrealdb.com/cloud) [**Real-time and event-driven**\\
Built-in real-time subscriptions, event triggers, and streaming updates to power reactive, real-time experiences. \\
\\
```surql\\
LIVE SELECT\\
vector::similarity::cosine(details, $search)\\
array::distinct(\\
->order->product, -- products they bought\\
<-order<-person, -- other people who bought those\\
->order->product.{id,name} -- products those people bought\\
) AS recommend_products\\
FROM $user\\
WHERE details <|3|> $search;\\
```](https://surrealdb.com/features) [**Secure by Design**\\
Built-in security with RBAC, record-level permissions, fine-grained access controls, JWT authentication, multi-tenant isolation and built-in compliance (SOC 2, ISO 27001) keep data protected by default. \\
](https://surrealdb.com/docs/surrealdb/security)
[Explore all features](https://surrealdb.com/features)
## Deploy modern AI, at scale
[**Agentic and Gen AI**\\
Build generative AI apps and multi-step agents on SurrealDB, unifying memory and action layers. \\
\\
Learn more](https://surrealdb.com/solutions/agentic-and-gen-ai) [**GraphRAG**\\
Supercharge retrieval-augmented generation with graph data models, for richer context and relevance. \\
\\
Learn more](https://surrealdb.com/solutions/graph-rag) [**Knowledge Graphs**\\
Combine vectors, events and user graphs for instant recommendations, personalisation and analytics. \\
\\
Learn more](https://surrealdb.com/solutions/knowledge-graphs)
[View all solutions](https://surrealdb.com/solutions) [Start your project](https://app.surrealdb.com/signin/explore)
## Too good to be true?
Don’t take our word for it.
[**Performance and benchmarks**\\
\\
\\
As a multi-model database, SurrealDB is fast and\\
scalable. See how it compares with other databases in\\
our benchmarks.](https://surrealdb.com/blog/beginning-our-benchmarking-journey) [**Stars given to SurrealDB on GitHub**](https://github.com/surrealdb/surrealdb)
## Join the community
Discover what our community has to say about their Surreal
experience
[Join our Discord](https://discord.gg/surrealdb) [View us on GitHub](https://github.com/surrealdb/surrealdb)
[I initially explored a more traditional stack: Neo4j for the graph database, RabbitMQ for a task queue, and Postgres with extensions for vector search. However, I realised SurrealDB could cover all of these needs, allowing me to consolidate the backend into a single dependency.](https://www.reddit.com/r/rust/comments/1l9ik5w/showcase_minne_a_graphpowered_personal_knowledge/) [I can never go back to Postgres lmao.](https://www.producthunt.com/products/surrealdb/reviews)
SurrealDB fast tracked our progress with all its features. Graph links + Record links + Full text search + Vector embeddings and Vector search + Surreal WASM for offline-ability... just name it!!!! Thanks Surreal team for making it happen!!!!
We replaced 5 backend tools with SurrealDB and scaled to 700,000 users in 8 hours.
[Fantastic! Graphrag, etc handles it all. Solid and fast](https://www.producthunt.com/products/surrealdb/reviews) [I know people love Supabase and Convex is blowing up. But I think SurrealDB is gonna be the real killer. More modern apps really should be using more graph databases as applications need to provide for more and more complex relationships.](https://x.com/jgeofil/status/1935524555541381290)
[So much easier to write advanced queries compared to SQL. Queries are actually readable! Community on Slack is also very helpful and includes SurrealDB developers.](https://www.producthunt.com/products/surrealdb/reviews) [Surrealist’s way of exploring complex data feels simple as its intuitive, fast, and removes the need for complex queries.](https://www.producthunt.com/products/surrealdb/reviews) [Great product, highly recommend](https://www.producthunt.com/products/surrealdb/reviews)
I'm certainly enjoying that I can replace hundreds of lines of Postgres trigger and function code with a dozen characters in a DEFINE statement in SurrealDB.
[The best next-gen multi-modal database that's out there.](https://discord.com/channels/902568124350599239/902568124350599242/1384923187653116145)
SurrealDB has allowed our team to focus more on product and iteration without worrying about database constraints. We can do literally everything we need in SurrealDB.
## Works with your tech stack
Seamless integration with your favorite platforms, SDKs, and
tools.
[**Language SDKs**\\
Official SDKs for Python, JavaScript, Rust, Go, Java, and more. Build with your preferred language using type-safe, async-first APIs. \\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
](https://surrealdb.com/integrations) [**Models**\\
Integrate with OpenAI, Mistral, Together AI, and other leading AI models for embeddings, vector search, and intelligent applications. \\
\\
\\
\\
\\
\\
\\
\\
](https://surrealdb.com/integrations) [**Deployment**\\
Deploy anywhere with SurrealDB Cloud or self-host with any cloud provider. Scale from development to production with enterprise-grade infrastructure. \\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
](https://surrealdb.com/integrations) [**Developer platforms**\\
Build with LangChain, CrewAI, LlamaIndex, and other AI frameworks. Create intelligent applications with ready-made integrations and workflows. \\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
](https://surrealdb.com/integrations)
[View all integrations](https://surrealdb.com/integrations) [Start your project](https://app.surrealdb.com/signin/explore)
###  Start building with SurrealDB
The multi-model database for AI agents. Unify data. Unlock intelligence. Scale anywhere.
[Start for free](https://app.surrealdb.com/signin/explore) [Learn more](https://surrealdb.com/docs/surrealdb)
Trusted & Certified for Enterprise Security
[Learn more](https://trust.surrealdb.com/)
SOC 2 Type 2
GDPR
Cyber Essentials Plus
ISO 27001



