We’re excited to introduce the new SurrealDB and Encore integration, making it easier to build AI applications and agents that combine rich context with production-ready backend infrastructure.
SurrealDB gives developers a single database for storing and retrieving context across documents, graph relationships and vectors. Encore provides the application and infrastructure layer around it, helping teams build APIs, background jobs and event-driven workflows that can run locally and deploy into their own AWS or GCP environments.
Together, they provide a powerful foundation for building stateful AI applications that need to remember, retrieve and reason over information.
Build durable memory for AI agents
AI agents increasingly need more than a simple vector store. They need to remember information over time, understand how people, projects and other entities are connected, and retrieve the right context for the task at hand.
With SurrealDB, developers can combine:
Vector search for retrieving information by semantic similarity.
Graph relationships for navigating connections between memories and entities.
Structured data and filtering for controlling which context is relevant to a particular agent, user or workflow.
Unstructured data to store documents, files and entities.
Because these capabilities live in one database, applications don’t need to maintain separate vector, graph and operational data stores or keep them in sync.
Encore adds the backend infrastructure around this memory layer. Developers can expose typed APIs, process memory asynchronously using pub/sub, run scheduled retention workflows and test the complete application locally before deploying it.
From local development to production
The integration is designed to make the development loop straightforward for both developers and coding agents.
Applications can be built and tested against SurrealDB locally, including APIs, event-driven ingestion and retrieval workflows. Encore then uses the same application model to provision and deploy the required infrastructure into AWS or GCP.
This means developers can test more than just individual database queries. They can verify how the entire application behaves end-to-end, from storing a memory through to retrieving it by semantic similarity or following its relationships through the graph.
Coding agents can also interact with the running application through Encore's MCP server, allowing them to build features, call APIs, inspect traces and validate their own work against real infrastructure.
A foundation for context-aware applications
Agent memory is one example of what developers can build with Encore and SurrealDB.
The same architecture can support applications such as knowledge assistants, context layers, GraphRAG systems and multi-agent applications where information needs to be stored once and retrieved in different ways depending on the task.
By combining Encore's backend development platform with SurrealDB's multi-model database, developers can move from prototyping AI features to building durable, testable systems without introducing unnecessary infrastructure complexity.
Try it today
Check out the Encore integration in the SurrealDB Docs. Encore has published a complete example showing how to build a durable agent memory service with SurrealDB, including semantic recall, graph relationships, agent-level isolation and memory retention.
Explore the integration, run the example locally, or use it as the starting point for your next AI application.