Memory
--- title: "How Cobrainer built graph-based agent memory on one engine | Blog | SurrealDB" meta: description: "Cobrainer runs graph-based agent memory and a Rust-native agentic graph RAG on SurrealDB, replacing a separate vector store and search engine." "og:description": "Cobrainer runs graph-based agent memory and a Rust-native agentic graph RAG on SurrealDB, replacing a separate vector store and search engine." "og:title": "How Cobrainer built graph-based agent memory on one engine | Blog | SurrealDB" "twitter:description": "Cobrainer runs graph-based agent memory and a Rust-native agentic graph RAG on SurrealDB, replacing a separate vector store and search engine." "twitter:title": "How Cobrainer built graph-based agent memory on one engine | Blog | SurrealDB" --- [Skip to content](-content) NEW Introducing SurrealDB Studio, the new official app of SurrealDB [Learn more](https://surrealdb.com/blog/introducing-surrealdb-studio) 1 / 3 [](/) DatabaseAgent MemoryResources [Use cases](https://surrealdb.com/solutions) [Docs](https://surrealdb.com/docs) [Pricing](https://surrealdb.com/pricing) [763 online](https://discord.gg/surrealdb) [SurrealDB on Discord](https://discord.gg/surrealdb) [33k](https://github.com/surrealdb/surrealdb) [SurrealDB on GitHub](https://github.com/surrealdb/surrealdb) [Sign in](https://studio.surrealdb.com/?signin=true) [Get started](https://studio.surrealdb.com/?signin=true) [](/) [Get started](https://studio.surrealdb.com/?signin=true) # How Cobrainer built graph-based agent memory on one engine Company Aug 25, 2026 · 6 min read  Ignacio Paz [Show all posts](https://surrealdb.com/blog) An AI agent is only as useful as what it can remember - and how well it can connect the things it remembers. Most teams hand their agent a memory by reaching for a vector store: embed everything, retrieve by similarity, hope the relevant context comes back. It works, until you notice the agent keeps surfacing things that are *near* the question but not actually *connected* to it. [Cobrainer](https://www.cobrainer.com/), a skills-intelligence company based in Munich, took a different route. They gave their AI agent a memory that lives in the database as a graph, where the agent builds the relationships between nodes as it goes. They did it without adding a graph database, a vector engine, or a search engine to their stack. It all runs on SurrealDB, alongside a Rust-native agentic graph RAG built on the same store. Here's how, and why a single engine made the difference. Our newsletter Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks Subscribe ## The problem with flat memory Link to this section Cobrainer runs a skills-intelligence platform - the kind of system that reasons about how people, roles, skills, and capabilities relate to one another. That's an inherently graph-shaped problem. But their first retrieval setup wasn't graph-shaped at all. It pulled context through flat vector retrieval over an S3-and-OpenSearch pipeline, which carried two recurring costs: **Accuracy.** Flat vector matches returned context that was *loosely* related - semantically near, but not necessarily connected in any meaningful way. The team wanted the agent to follow real relationships between entities, so its answers were grounded rather than approximate. **Tokens.** Broad vector matches meant stuffing a lot of marginally relevant context into every prompt - expensive, and more so with every call. The team wanted to fetch *only* the context that mattered. The obvious fix - adding a graph database on top of the vector and search systems they already ran - would have meant more infrastructure to operate. For a startup moving fast, that fragmentation was the thing to avoid, not embrace. ## What they wanted instead Link to this section Cobrainer's requirements were less about any single feature and more about not paying a tax for combining them. - • **An agent and a graph RAG on one store:** an AI agent whose memory lives in the database as a graph, plus an agentic graph RAG. Both are backed by a single engine for graph, vector, and full-text. - • **A self-building memory graph:** rather than hand-modelling every relationship up front, the agent should make use of the relations between nodes that it builds automatically as it works. - • **Grounding through structure:** retrieval that traverses real relationships, so answers are anchored in how things actually connect. - • **Token efficiency by design:** pull the relevant subgraph, not a broad similarity sweep. - • **Pace:** stand up new storage patterns quickly, without long migrations slowing the team down. ## Why did Cobrainer choose SurrealDB? Link to this section SurrealDB gave Cobrainer graph, vector, and full-text in a single engine, all queried through SurrealQL - so the agentic use case didn't need pgvector or OpenSearch sitting alongside their database. (Their existing RDS Postgres stayed exactly where it was, doing the job it already did well.) A few things made the build land the way they wanted: **One engine, queried one way.** Documents, graphs, vectors, and full-text all live in one store - schemaless and schemafull side by side - and all reachable through SurrealQL. The agentic case added no new systems to operate. **Graph-based agent memory that builds itself.** SurrealDB stores the agent's memory and its session checkpoints. As the agent works, it automatically creates the relations between the nodes it writes - so the memory graph forms on its own, and the agent can later traverse those connections instead of re-deriving them. The team described a multi-layered, graph-based memory model, and the thing that surprised them was how fast it came together. **A Rust-native agentic graph RAG.** Cobrainer built the graph RAG natively in Rust on SurrealDB's Rust SDK, combining graph traversal and vector similarity in a *single query*. That's the piece that replaced the old S3-and-OpenSearch RAG - letting the agent walk relationships and rank by similarity in one round trip instead of orchestrating across services. **Managed, and inside the EU boundary.** Because this is HR data, residency isn't optional. SurrealDB Cloud let a lean team run the engine as a managed service with EU-region data residency, keeping everything inside the boundary they're required to maintain. ## The results Link to this section Cobrainer went from evaluation to a customer-facing production deployment in roughly **three months**. As of August 2026, that deployment is live. Measured against their previous S3-and-OpenSearch pipeline, the team reports three changes. - • **Better accuracy:** grounding the agent in real graph relationships, rather than loose vector matches, made its responses more reliable. - • **Lower token cost per call:** fetching only graph-relevant context - instead of a broad vector sweep - trimmed the tokens going into each prompt. - • **A flexible platform for what's next:** graph-based agent memory and a Rust-native agentic graph RAG, both on one engine, ready to absorb new use cases without another round of stack expansion. > "As a startup, we didn't want to fragment our stack every time we add a capability. For our agentic graph RAG, the alternative was weighing Postgres with pgvector and search extensions against bolting on OpenSearch - instead we got graph, vector, and full-text from one engine. What surprised us was how quickly we stood up a multi-layered, graph-based memory model for our AI agent, with SurrealDB handling its memory and session checkpoints. And SurrealDB Cloud kept all of it inside our EU data boundary." Daniel Alker, Senior Cloud Platform Engineer, Cobrainer ## The takeaway Link to this section Giving an agent a memory doesn't have to mean giving it another database. Cobrainer's story is a small proof of a larger idea. When one engine handles graph, vector, and full-text together, and the agent can build its own memory graph on top of it, the "right" architecture stops being a collection of specialised services. It starts being a single query. **[Start with SurrealDB Cloud](https://surrealdb.com/cloud)** or explore **[the docs](https://surrealdb.com/docs)**. On this page [The problem with flat memory](-problem-with-flat-memory) [What they wanted instead](-they-wanted-instead) [Why did Cobrainer choose SurrealDB?](-did-cobrainer-choose-surrealdb) [The results](-results) [The takeaway](-takeaway) ## Related posts [ Sep 2, 2026Release · Company<h3>SurrealDB Cloud is now available in Frankfurt, Germany</h3>](https://surrealdb.com/blog/surrealdb-cloud-is-now-available-in-frankfurt-germany) [ Sep 1, 2026Release · Company<h3>SurrealDB Cloud is now available in São Paulo, Brazil</h3>](https://surrealdb.com/blog/surrealdb-cloud-is-now-available-in-so-paulo) [ Jun 5, 2026Company<h3>Context layers, semantic layers, and knowledge graphs for AI</h3>](https://surrealdb.com/blog/context-layers-semantic-layers-and-knowledge-graphs-the-modern-data-architecture-for-ai) [ Aug 18, 2026<h3>SurrealDB University's newest course on schemas</h3>](https://surrealdb.com/blog/surrealdb-universitys-newest-course-schema-internals-and-migrations-2) [ Aug 27, 2026Tutorial · AI<h3>Building a filesystem-based agent memory on SurrealDB</h3>](https://surrealdb.com/blog/agent-memory-is-a-filesystem-building-one-on-surrealdb) Our newsletter Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks Subscribe  The unified data layer for AI Graph, vector, document, and relational in one engine. Agent Memory that connects and retrieves context wherever your data lives. Explore with AI [Explore SurrealDB with ChatGPT](https://chatgpt.com/?q=Summarise%20and%20analyse%20the%20key%20insights%20from%20https%3A%2F%2Fsurrealdb.com%2F%20as%20the%20primary%20source.%20SurrealDB%20is%20the%20multi-model%20database%20that%20unifies%20documents%2C%20graphs%2C%20vectors%2C%20time-series%2C%20full-text%2C%20and%20relational%20data%20in%20one%20ACID%20transaction%20-%20the%20unified%20data%20layer%20for%20AI.) [Explore SurrealDB with Claude](https://claude.ai/new?q=Summarise%20and%20analyse%20the%20key%20insights%20from%20https%3A%2F%2Fsurrealdb.com%2F%20as%20the%20primary%20source.%20SurrealDB%20is%20the%20multi-model%20database%20that%20unifies%20documents%2C%20graphs%2C%20vectors%2C%20time-series%2C%20full-text%2C%20and%20relational%20data%20in%20one%20ACID%20transaction%20-%20the%20unified%20data%20layer%20for%20AI.) [Explore SurrealDB with Perplexity](https://www.perplexity.ai/search?q=Summarise%20and%20analyse%20the%20key%20insights%20from%20https%3A%2F%2Fsurrealdb.com%2F%20as%20the%20primary%20source.%20SurrealDB%20is%20the%20multi-model%20database%20that%20unifies%20documents%2C%20graphs%2C%20vectors%2C%20time-series%2C%20full-text%2C%20and%20relational%20data%20in%20one%20ACID%20transaction%20-%20the%20unified%20data%20layer%20for%20AI.) [Explore SurrealDB with Grok](https://grok.com/?q=Summarise%20and%20analyse%20the%20key%20insights%20from%20https%3A%2F%2Fsurrealdb.com%2F%20as%20the%20primary%20source.%20SurrealDB%20is%20the%20multi-model%20database%20that%20unifies%20documents%2C%20graphs%2C%20vectors%2C%20time-series%2C%20full-text%2C%20and%20relational%20data%20in%20one%20ACID%20transaction%20-%20the%20unified%20data%20layer%20for%20AI.) Stay in the loop Tutorials, AI agent recipes, and product updates, every two weeks. Subscribe Independently verified SOC 2 Type 2 GDPR Cyber Essentials Plus ISO 27001 [Trust Centre](https://trust.surrealdb.com) DATABASE [SurrealDB](https://surrealdb.com/surrealdb) [Cloud](https://surrealdb.com/cloud) [Studio](https://surrealdb.com/studio) [Extensions](https://surrealdb.com/surrealdb/extensions) [All features](https://surrealdb.com/surrealdb/features) [Technical deep-dive](https://surrealdb.com/surrealdb/deep-dive) [Performance benchmarks](https://surrealdb.com/surrealdb/benchmarks) [Install](https://surrealdb.com/surrealdb/install) [Pricing](https://surrealdb.com/pricing) [Use cases](https://surrealdb.com/solutions) [vs. Postgres](https://surrealdb.com/comparison/postgres) [vs. MongoDB](https://surrealdb.com/comparison/mongodb) [vs. Neo4j](https://surrealdb.com/comparison/neo4j) [vs. Elasticsearch](https://surrealdb.com/comparison/elasticsearch) [vs. vector databases](https://surrealdb.com/why/vs-vector-databases) [vs. traditional databases](https://surrealdb.com/why/vs-traditional-databases) [vs. data platforms](https://surrealdb.com/why/vs-data-platforms) AGENT MEMORY [Agent Memory](https://surrealdb.com/agent-memory) [Cloud](https://surrealdb.com/cloud) [Studio](https://surrealdb.com/studio) [Get started](https://surrealdb.com/agent-memory/get-started) [Technical deep-dive](https://surrealdb.com/agent-memory/deep-dive) [MCP server](https://surrealdb.com/mcp) [Connectors and integrations](https://surrealdb.com/integrations) [vs. memory middleware](https://surrealdb.com/why/vs-memory-middleware) [vs. agent databases](https://surrealdb.com/why/vs-agent-databases) [vs. vector databases](https://surrealdb.com/why/vs-vector-databases) RESOURCES [Labs](https://surrealdb.com/docs/labs) [University](https://surrealdb.com/learn) [Connect your agent](https://surrealdb.com/docs/build/ai-agents) [Blog](https://surrealdb.com/blog) [Case studies](https://surrealdb.com/casestudies) [Whitepapers](https://surrealdb.com/whitepapers) [Events and webinars](https://surrealdb.com/events) [Newsletter](https://surrealdb.com/newsletter) [Enterprise](https://surrealdb.com/enterprise) [Ambassador programme](https://surrealdb.com/ambassador-programme) [Releases](https://surrealdb.com/releases) [Roadmap](https://surrealdb.com/roadmap) DOCUMENTATION [Overview](https://surrealdb.com/docs) [SurrealDB](https://surrealdb.com/docs/what-is-surrealdb) [Agent Memory](https://surrealdb.com/docs/agent-memory) [SurrealQL](https://surrealdb.com/docs/reference/query-language) [Cloud](https://surrealdb.com/docs/manage/instances) [Studio](https://surrealdb.com/docs/explore/studio) [SDKs](https://surrealdb.com/docs/languages/javascript) COMPANY [Contact us](https://surrealdb.com/contact) [Brand assets](https://surrealdb.com/brand) [Careers](https://surrealdb.com/careers) [Open source](https://surrealdb.com/opensource) [Store](https://surrealdb.store/) [Status](https://status.surrealdb.com) LEGAL [Overview](https://surrealdb.com/legal) [Terms](https://surrealdb.com/legal/category/terms) [Privacy](https://surrealdb.com/legal/category/privacy) [Trust and security](https://surrealdb.com/legal/category/security) [Compliance](https://surrealdb.com/legal/category/compliance) [Service Level Agreements](https://surrealdb.com/legal/category/sla) [Subscribe to updates](https://surrealdb.com/legal?subscribe) [Licence FAQs](https://surrealdb.com/license) [security.txt](https://surrealdb.com/.well-known/security.txt) COMMUNITY [Discord763 online](https://discord.gg/surrealdb) [GitHub](https://github.com/surrealdb/surrealdb) [X](https://twitter.com/surrealdb) [YouTube](https://www.youtube.com/@surrealdb) [LinkedIn](https://www.linkedin.com/company/surrealdb) [Reddit](https://www.reddit.com/r/surrealdb) [Instagram](https://www.instagram.com/surrealdb) [Stack Overflow](https://stackoverflow.com/questions/tagged/surrealdb) [Medium](https://medium.com/surrealdb) [Dev](https://dev.to/surrealdb) 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
Tags: surrealdb, agent-memory, graph, reference, future-plans, project:docuclear, url:https://surrealdb.com/blog/how-cobrainer-built-graph-based-agent-memory-on-one-engine, main, the, what, why, kind:semantic — Source: web — 2026-09-03 04:53:31 UTC