Catalog PyPI
Back to packageRELEASE DETAILS

0.2.1

PyPI

agentvec

Embedded, serverless vector database for mutable AI agent memory — pure Rust, with native TTL, in-place upserts, and incremental HNSW search

agentaidatabaseembeddingmemoryvector
Published28 Jun 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.2.1 documentation

AgentVec

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)

Why AgentVec?

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.

AgentVecLanceDBChromaDBFAISS
Primary useAgent memoryRAG / analyticsStatic searchBatch search
ArchitectureRow-orientedColumnarMemory-firstIndex-only
DependenciesZero (pure Rust)Arrow / C++Python / C++C++ / BLAS
In-place updatesACIDCopy-on-writeVariableRebuild
TTL / expiryNative———
Incremental indexYesRebuildVariableRebuild

Built for

  • AI agents — conversational memory, working memory, long-term knowledge
  • Local-first apps — no server, no network, just a directory on disk
  • Mutable workloads — frequent upserts, deletes, and TTL-based expiry
  • Embedded use — single library, low memory footprint, instant startup

Not built for

  • Billion-vector or distributed search (use Qdrant, Milvus, or Pinecone)
  • Heavy analytical queries over vectors (use LanceDB or DuckDB)
  • Static datasets you never update (use FAISS or usearch)
  • Multi-process concurrent access (AgentVec is single-process, multi-threaded)

Features

  • Memory decay (TTL) — give any record a time-to-live; expired memories are skipped on read and reclaimed on compact().
  • In-place upserts — upsert(id, ...) is idempotent and ACID-safe; update a memory without rebuilding anything.
  • HNSW approximate search — auto-enabled past a threshold, built in parallel across all cores, with incremental inserts (no full rebuilds) and on-disk persistence.
  • Metadata filtering — filter by metadata with $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin.
  • Multiple distance metrics — cosine, dot, and l2 (Euclidean).
  • Crash-safe storage — vectors live in memory-mapped files for zero-copy reads; metadata lives in an ACID key-value store with checksums and a recovery path.
  • Product quantization — optional compression for larger collections.
  • Export / import — snapshot a collection to a file for backup or transfer.

Quick start

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()

Companion packages

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.

Documentation & source

License

Dual-licensed under either of MIT or Apache-2.0, at your option.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

25 collected
agentvec-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 725.41 KB · Python cp310

Source file
agentvec-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 777.91 KB · Python cp310

Source file
agentvec-0.2.1-cp310-cp310-win_amd64.whl

bdist_wheel · 664.84 KB · Python cp310

Source file
agentvec-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl

bdist_wheel · 732.96 KB · Python cp311

Source file
agentvec-0.2.1-cp311-cp311-macosx_11_0_arm64.whl

bdist_wheel · 652.73 KB · Python cp311

Source file
agentvec-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 725.24 KB · Python cp311

Source file
agentvec-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 777.62 KB · Python cp311

Source file
agentvec-0.2.1-cp311-cp311-win_amd64.whl

bdist_wheel · 664.63 KB · Python cp311

Source file
agentvec-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl

bdist_wheel · 732.88 KB · Python cp312

Source file
agentvec-0.2.1-cp312-cp312-macosx_11_0_arm64.whl

bdist_wheel · 652.35 KB · Python cp312

Source file
agentvec-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 724.08 KB · Python cp312

Source file
agentvec-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 775.87 KB · Python cp312

Source file
agentvec-0.2.1-cp312-cp312-win_amd64.whl

bdist_wheel · 663.85 KB · Python cp312

Source file
agentvec-0.2.1-cp313-cp313-macosx_10_12_x86_64.whl

bdist_wheel · 732.87 KB · Python cp313

Source file
agentvec-0.2.1-cp313-cp313-macosx_11_0_arm64.whl

bdist_wheel · 652.36 KB · Python cp313

Source file
agentvec-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 724.03 KB · Python cp313

Source file
agentvec-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 775.76 KB · Python cp313

Source file
agentvec-0.2.1-cp313-cp313-win_amd64.whl

bdist_wheel · 663.81 KB · Python cp313

Source file
agentvec-0.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 725.93 KB · Python cp38

Source file
agentvec-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 778.28 KB · Python cp38

Source file
agentvec-0.2.1-cp38-cp38-win_amd64.whl

bdist_wheel · 665.38 KB · Python cp38

Source file
agentvec-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 725.84 KB · Python cp39

Source file
agentvec-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 778.26 KB · Python cp39

Source file
agentvec-0.2.1-cp39-cp39-win_amd64.whl

bdist_wheel · 665.2 KB · Python cp39

Source file
agentvec-0.2.1.tar.gz

sdist · 128.39 KB · Python source

Source file

Repository

PENDING
akuming/agentvec

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 00:38 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:05368d05c8cdc09edc83840ce0bcdb9e73ef5a460b4466cb091420f6905ec4df

Other collected versions

View all collected versions →