VantaDB × LangChain
LangChain VectorStore adapter for VantaDB.
Install
Not on PyPI yet. The
vantadb-langchainpackage builds and passestwine checklocally; it will go live with the firstadapters-v*tag release. Until then, install from source.
# Today, from a repo checkout
cd integrations/langchain && pip install .
Install from PyPI (after first release)
pip install vantadb-langchain
Quickstart
from langchain_openai import OpenAIEmbeddings
from vantadb_langchain import VantaDBVectorStore
embedding = OpenAIEmbeddings(model="text-embedding-3-small")
store = VantaDBVectorStore(
embedding=embedding,
db_path="./my_data",
namespace="docs",
)
# Add documents
store.add_texts(
["VantaDB is an embedded vector database written in Rust.",
"It supports hybrid search across vectors and text."],
metadatas=[{"source": "docs"}, {"source": "docs"}],
)
# Search
results = store.similarity_search("vector database", k=5)
for doc in results:
print(doc.page_content, doc.metadata)
API
similarity_search(query, k=4)— search by textsimilarity_search_by_vector(embedding, k=4)— search by raw vectorsimilarity_search_with_score(query, k=4)— search with cosine distanceadd_texts(texts, metadatas=None, ids=None)— add documentsdelete(ids=...)— delete by keyfrom_texts(texts, embedding, metadatas=None, ids=None)— create + populate store
LangGraph (INTG-01)
Persistent LangGraph
adapters — same embedded database, no server. Requires
langgraph-checkpoint>=2,<5 (pinned major: upstream API is unstable).
from vantadb_langchain import VantaDBCheckpointer, VantaDBStore
# Short-term memory: per-thread checkpoints (put/get/list/writes/delete)
checkpointer = VantaDBCheckpointer(db_path="./my_data")
graph = builder.compile(checkpointer=checkpointer)
graph.invoke(inputs, {"configurable": {"thread_id": "user-1"}})
# Long-term memory: hierarchical KV store, namespaces are tuples
store = VantaDBStore(db_path="./my_data", embeddings=embedding)
await store.aput(("users", "123", "prefs"), "theme", {"mode": "dark"})
item = await store.aget(("users", "123", "prefs"), "theme")
results = await store.asearch(("users", "123"), query="dark mode")
Notes:
- Namespace tuples map to VantaDB namespaces joined with
/(parts must be non-empty strings without/). search(filter=...)matches scalar value fields exactly; nested dicts/lists are payload-only.- Semantic
queryneedsembeddings=; without it raisesValueError. - TTL is not supported (
supports_ttl = False);index=is accepted and ignored.
Why VantaDB?
- Embedded & local-first: the storage engine is a Rust library embedded in your process — no server to deploy, no network hop; data lives in your filesystem.
- Persistent hybrid search: vectors + BM25 text search out of the box,
where LangChain's
InMemoryVectorStorecovers only small single-process sessions. - Zero-setup alternative to hosted stacks: unlike Zep (requires a server) or Cognee (spins up its own knowledge-graph runtime), VantaDB is a plain library you import.
Development
pip install -e .
Metadata
Release files for vantadb-langchain 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vantadb_langchain-0.9.0.tar.gz | 16.1 kB | Without provenance | Details for vantadb_langchain-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vantadb_langchain-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for vantadb_langchain-0.9.0-py3-none-any.whl |
Total release size: 30.5 kB
Release files / vantadb_langchain-0.9.0.tar.gz
| Download URL | vantadb_langchain-0.9.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d427cb080bd4890745dd9b677afebc279986e1c30e8e938a3dc9ac46d6beceac
|
|
BLAKE2b-256 checksum How to use checksums |
8c13088f92a01b979b2b1c341179153cc22c33c431f8c98bf865af4ae3e3e06a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / vantadb_langchain-0.9.0-py3-none-any.whl
| Download URL | vantadb_langchain-0.9.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4267cf7f37ef0f79cbb8ae9d21809904ed77a0a37ae7949509bbc2f1952fc166
|
|
BLAKE2b-256 checksum How to use checksums |
3fc8d119f90ac3037f61f07f54e63af7e73e4087ef3b0467cdf225995b9589bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for vantadb-langchain 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.