Self-Hosting with ZeroDB Local
ZeroDB Local runs entirely on your machine. SQLite for storage, FAISS for vector search, inline embeddings — no API key or cloud connection needed.
pip install zerodb-local
Quick Start
from zerodb_local import ZeroDBLocal
# Create a local database
db = ZeroDBLocal("./my-data")
# Store documents (embeddings generated locally)
db.add_texts([
"ZeroDB is a persistent knowledge layer",
"Vector search finds similar documents",
"Agents need memory to be useful",
])
# Search by meaning
results = db.search("database for AI agents", k=3)
for r in results:
print(f"Score: {r['score']:.3f} — {r['text']}")
Run as a Server
zerodb serve --port 8080 --data ./my-data
This starts a local HTTP server with the same API as the cloud version. Useful for development and testing.
Architecture
| Component | Technology | Role |
|---|---|---|
| Storage | SQLite | Document and metadata storage |
| Vector index | FAISS | Approximate nearest neighbor search |
| Embeddings | Sentence Transformers (inline) | No external API needed |
When to Use Local vs Cloud
| Feature | ZeroDB Local | ZeroDB Cloud |
|---|---|---|
| No API key needed | Yes | No |
| Runs offline | Yes | No |
| Free embeddings | Yes (inline) | Yes (TEI) |
| Multi-tenant | No | Yes |
| GraphRAG | No | Yes |
| MCP server | No | Yes |
| File storage | No | Yes |
| PostgreSQL | No | Yes |
| Best for | Dev, testing, privacy | Production, multi-user |
PyPI
- Package: zerodb-local on PyPI
- Version: 0.2.0+
- Python: 3.9+
Next Steps
- ZeroDB Cloud — Full cloud product
- MCP Setup — Agent tool integration