Observed since 21 Oct, 00:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Embedded, serverless vector database for mutable AI agent memory — pure Rust, with native TTL, in-place upserts, and incremental HNSW search
The SQLite for mutable agent memory. A lightweight, serverless, embedded vector database written in pure Rust — built for AI agents that need to remember, forget, and update knowledge in real time.
No server. No cloud. No external dependencies. Just point it at a directory.
pip install agentvec
import agentvec
db = agentvec.AgentVec("./agent_memory.avdb")
memories = db.collection("episodic", dim=384, metric="cosine")
# Store a memory that expires in one hour
memories.add([0.1, 0.2, ...], {"event": "user said hello"}, ttl=3600)
# Recall the most similar memories
for r in memories.search(query_embedding, k=10):
print(r.id, r.score, r.metadata)
Most vector databases are built for search over static datasets — you index once and query forever. Agent memory is the opposite workload: it changes constantly. Agents add new observations every turn, update what they already know, and let stale context decay away.
AgentVec is designed for that mutable, transactional, row-oriented pattern instead of bulk analytics.
| AgentVec | LanceDB | ChromaDB | FAISS | |
|---|---|---|---|---|
| Primary use | Agent memory | RAG / analytics | Static search | Batch search |
| Architecture | Row-oriented | Columnar | Memory-first | Index-only |
| Dependencies | Zero (pure Rust) | Arrow / C++ | Python / C++ | C++ / BLAS |
| In-place updates | ACID | Copy-on-write | Variable | Rebuild |
| TTL / expiry | Native | — | — | — |
| Incremental index | Yes | Rebuild | Variable | Rebuild |
compact().upsert(id, ...) is idempotent and ACID-safe; update a memory without rebuilding anything.$eq, $ne, $gt, $gte, $lt, $lte, $in, $nin.cosine, dot, and l2 (Euclidean).import agentvec
db = agentvec.AgentVec("./my_agent.avdb")
# Different memory types can use different embedding dimensions
episodic = db.collection("episodic", dim=384, metric="cosine") # conversations
semantic = db.collection("semantic", dim=1536, metric="cosine") # knowledge
working = db.collection("working", dim=384, metric="cosine") # scratchpad
# Add a memory (auto-generated id, expires in 24h)
mem_id = episodic.add(vector, {"user": "alice", "type": "chat"}, ttl=86400)
# Update it later — same id, no rebuild
episodic.upsert("conv_turn_42", vector, {"summary": "discussed timeline"})
# Bulk insert is 10-100x faster than one-at-a-time
episodic.add_batch(vectors=[...], metadatas=[...])
# Search, filtered by metadata
results = episodic.search(query_vector, k=10, where_={"user": "alice"})
# Reclaim expired memories and flush to disk
episodic.compact()
db.sync()
AgentVec is the storage engine. Higher-level libraries build on top of it:
agentvec-memory — tiered agent memory (working / session / project / user) with pluggable embedders, so you store text and let it handle vectors and TTLs.agentvec-mcp — a Model Context Protocol server that exposes AgentVec memory to MCP-compatible AI tools.Dual-licensed under either of MIT or Apache-2.0, at your option.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.1 | 28 Jun 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 00:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e859f6bff4b27a2211ce2f313355262e69f799afa233e15e221a243428673293