Deep dive
The Vector Database Built for AI Agents
Storing embeddings and serving an agent are not the same job. An index that only does nearest-neighbor search is missing most of what an agent actually needs.
A generic vector store can tell you which rows look similar. It can’t tell you which memories belong to this user, which ones are safe to forget, or how to combine a similarity score with a hard filter on time, session, or importance. Agent workloads need all of that as table stakes, not an upgrade path.
What agent workloads actually require
Six requirements, not one
Each one below is backed by a real, verified ZeroDB capability — the service method, request field, or measured benchmark it maps to, not a feature we’d like to have.
Memory that outlives the session
A context window resets. An agent that only "remembers" what fits in its prompt forgets every user preference and prior decision the moment a new session starts.
ZeroMemory writes outlast the request that created them. A memory stored today is still recallable by meaning next week, scoped to whichever namespace you wrote it into.
POST /api/v1/public/memory/v2/remember persists a row with a memory_type (working, episodic, semantic, or procedural) and an importance score — verified in zeromemory.py.
Retrieval fast enough to stay in the loop
An agent calling memory mid-reasoning can’t wait on a slow lookup — every extra hundred milliseconds compounds across a multi-step tool-calling loop.
Vector search runs on a tiered index: FLAT for small namespaces, HNSW once a namespace crosses roughly 10K vectors — the configuration our own benchmarks were measured against.
Measured on production infrastructure: HNSW search at 10K vectors runs p50 15ms / p95 25ms; at 100K vectors p50 28ms / p95 45ms; at 1M vectors p50 65ms / p95 120ms — docs/backend/ZERODB_PERFORMANCE_BENCHMARKS.md.
Filtering scoped to user, session, or time
A raw similarity match can’t tell one user’s memories from another’s, or last week’s context from a year-old one — you need to filter before or alongside the vector math.
Vector search takes a filter object evaluated against stored metadata, and ZeroMemory recall is namespace-scoped by default — cross-namespace search is an explicit opt-in, not the default behavior.
VectorSearchRequest.filter (src/backend/app/schemas/vector_db.py) and RecallRequest.namespace / allow_cross_namespace (zeromemory.py, Refs #2884).
Search that isn’t vectors alone
Pure similarity search surfaces things that read like the query, not things that are actually true — "who does Alice work with" needs relationship traversal a dense vector can’t encode.
Recall takes a use_graph flag that augments vector similarity with graph traversal over the subject/predicate/object edges ZeroDB already maintains — one call instead of two stores and a manual merge.
RecallRequest.use_graph (zeromemory.py, Refs #3426), documented in full on /graphrag.
Pricing that scales with agents, not line items
A per-vector or per-read-unit bill is easy to model for a static index and hard to model for an agent fleet that reads and writes memory constantly, at a volume nobody sized in advance.
ZeroDB bills by plan tier rather than metering every vector and every read/write unit — see current plans on /pricing.
Plan structure documented on this site at /pricing.
One API for everything an agent is made of
Agent state is rarely just vectors — it’s memories, files, structured rows, and events too. Stitching four separate services together to cover that is its own project before the agent does anything useful.
The same project surfaces vector search, ZeroMemory (remember/recall/reflect), a knowledge graph (relate/graph/entities), managed Postgres tables, and file storage — one API key, not four vendors.
vectors.py, zeromemory.py, and the Postgres/file endpoints already documented on /zeromemory, /graphrag, and the API reference.
The real API
Remember, recall, reflect
Three calls cover the lifecycle of an agent memory — store an experience, retrieve it by meaning, then periodically consolidate it into something more durable. This is the actual ZeroMemory API, the same one documented on /zeromemory.
Remember
Store an observation with a namespace, a memory type, and an importance score. The write returns immediately; the embedding is generated asynchronously so it never blocks the agent’s turn.
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/remember \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark mode and replies tersely",
"memory_type": "episodic",
"importance": 0.6,
"namespace": "session:abc123"
}'Recall
Query by intent, scoped to a namespace by default. Add use_graph to blend in graph traversal, or as_of for historical recall — see /graphrag for the hybrid case.
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/recall \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"query": "how does this user like responses formatted?",
"namespace": "session:abc123",
"limit": 5
}'Reflect
Consolidate an entity’s recent episodic memories into a durable semantic memory — turning a pile of individual events into one reusable fact, instead of keeping every turn around forever.
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/reflect \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"entity_id": "user_42",
"namespace": "session:abc123"
}'Namespacing is required on every write — there is no silent global fallback — so one agent’s session memories don’t leak into another’s. Forgetting a memory, by id or by bulk namespace clear, is the same /forget endpoint.
Honest comparison
ZeroDB vs a generic vector store
Scoped to differences we can point at a real endpoint, field, or doc for — not a feature-complete audit of every vector database on the market.
| Dimension | ZeroDB | Generic vector store |
|---|---|---|
| Per-user / per-session isolation | Every write and read is namespace-scoped (global, project:<id>, session:<id>) by default — cross-namespace search is an explicit opt-in. | Typically a single flat index or a manually-managed metadata field — isolation is the integrator’s responsibility, not the default. |
| Native memory semantics | remember / recall / reflect / forget are first-class endpoints with memory_type and importance scoring, not something built on top of raw vector upsert/search. | Stores vectors and metadata; memory-specific concepts (importance, consolidation, forgetting) are left to the caller to build. |
| Metadata filtering | filter is a parameter on the same vector search call — one request, no separate post-lookup pass. | Varies by vendor; filtering is often a documented but separately-priced or separately-tuned capability. |
| Hybrid vector + graph | recall takes a use_graph flag that blends vector similarity with graph traversal over relationships already stored via relate(). | No built-in graph layer — combining vector search with relationship traversal means running and syncing a separate graph database. |
| Scope beyond vectors | The same project also has managed Postgres tables, file storage, and an event stream — one API key. | Scope is the vector index and its storage/compute units; everything else is a separate service and a separate bill. |
Generic-vector-store behavior described here reflects common documented patterns (e.g. Pinecone, Weaviate, Chroma) — see our Pinecone comparison for a vendor-specific, sourced-and-dated breakdown rather than a generalization.
Get started
Build agent memory on infrastructure built for it
Vector search, namespaced memory, hybrid graph recall, managed Postgres, and file storage — one API key, one project, no stitching four vendors together.