Home / Companies / SurrealDB / Blog / Post Details
Content Deep Dive

Agent memory in one SurrealQL query: vectors, graph, text

Blog post from SurrealDB

Post Details
Company
Date Published
Author
Tobie Morgan Hitchcock
Word Count
2,633
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

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.

Trends Found in this Post
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 Data

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.