Agent memory in one SurrealQL query: vectors, graph, text
Blog post from SurrealDB
SurrealDB can support AI agent memory by combining vector similarity search, full-text search, document-field filtering, and graph traversal in a single SurrealQL query and transaction. The example models memories with text, embeddings, speakers, timestamps, and types; entities such as people, systems, and projects; and relationship edges connecting memories to entities and entities to one another. HNSW indexes retrieve semantically similar memories, BM25 full-text indexes find exact or stemmed word matches, and graph queries reveal related systems, projects, and owners, while transactions provide consistent reads and make newly written memories immediately searchable. The post also demonstrates that uniqueness constraints can roll back an entire memory write when duplicate entity links are detected, preserving data consistency. It concludes that while developers can build custom agent-memory systems with these primitives, SurrealDB Agent Memory provides managed ingestion, entity and relationship extraction, fact reconciliation and history, tri-temporal tracking, hybrid ranking, and user or team scoping.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Vector Search | 22 | 228 | 74 | 43 | -88% |
| AI Agents | 2 | 2,668 | 495 | 155 | -62% |
| LLM | 1 | 1,192 | 304 | 123 | -82% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.