langchain-zerodb
ZeroDB vector store integration for LangChain - the AI-native vector database with free embeddings and sub-millisecond semantic search.
Why ZeroDB?
- Free embeddings - BAAI/bge-small-en-v1.5 (384-dim) powered by TEI, no OpenAI costs
- Sub-millisecond search - pgvector with HNSW indexes
- Zero infrastructure - fully managed, no servers to run
- Instant provisioning -
POST /api/v1/instant-dbgets you a database in one request - Built for agents - MCP server, memory API, event streams
Installation
pip install langchain-zerodb
Quick Start
from langchain_zerodb import ZeroDBVectorStore
# Initialize (get your API key at ainative.studio)
vectorstore = ZeroDBVectorStore(
api_key="your-api-key",
project_id="your-project-id",
)
# Add documents
ids = vectorstore.add_texts(
["ZeroDB is fast", "Semantic search is powerful"],
metadatas=[{"source": "docs"}, {"source": "blog"}],
)
# Similarity search
results = vectorstore.similarity_search("fast database", k=5)
for doc in results:
print(doc.page_content, doc.metadata)
# Search with scores
scored = vectorstore.similarity_search_with_score("fast database", k=5)
for doc, score in scored:
print(f"{score:.3f}: {doc.page_content}")
Use with LangChain Chains
from langchain_zerodb import ZeroDBVectorStore
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
vectorstore = ZeroDBVectorStore(
api_key="your-api-key",
project_id="your-project-id",
)
retriever = vectorstore.as_retriever(search_kwargs={"k": 5})
# RAG chain
template = "Answer based on context:\n{context}\n\nQuestion: {question}"
prompt = ChatPromptTemplate.from_template(template)
chain = (
{"context": retriever, "question": RunnablePassthrough()}
| prompt
)
Get a Free API Key
- Sign up at ainative.studio
- Create a ZeroDB project
- Copy your API key
Or get an instant database with no signup:
curl -X POST https://api.ainative.studio/api/v1/public/instant-db
Links
License
MIT - Built by AINative Studio
Metadata
Release files for langchain-zerodb 0.1.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 | |
|---|---|---|---|---|
| langchain_zerodb-0.1.0.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_zerodb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / langchain_zerodb-0.1.0.tar.gz
| Download URL | langchain_zerodb-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47158154d04a6ab1d6f52b62537d4f42438af0a5f6aae9fc35ef799dceec5f41
|
|
BLAKE2b-256 checksum How to use checksums |
6c809d7330f25303fa04758ac7f1085694b4d2713efdb167b6ab7673cd18e701
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / langchain_zerodb-0.1.0-py3-none-any.whl
| Download URL | langchain_zerodb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f4c8580dcc9404d189d0d73b10f7c64113f525ebf7443f9bdabbfa0c50be400
|
|
BLAKE2b-256 checksum How to use checksums |
6a95de57fa076cf2a5526bae8eaed1cc5181306449106be4cf6ebe137df391d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for langchain-zerodb 0.1.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.