Metadata-Version: 2.5
Name: vantadb-dspy
Version: 0.5.0
Summary: DSPy adapter for VantaDB — embedded vector memory for AI agents
Project-URL: Homepage, https://github.com/ness-e/Vantadb
Project-URL: Repository, https://github.com/ness-e/Vantadb
Project-URL: Documentation, https://github.com/ness-e/Vantadb/tree/main/integrations/dspy
Author: VantaDB Team
License: Apache-2.0
Keywords: ai-memory,dspy,rag,vantadb,vector-store
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: dspy<3,>=2.6
Requires-Dist: vantadb-py<0.9.0,>=0.6.1
Description-Content-Type: text/markdown

# VantaDB × DSPy

DSPy Retriever adapter for [VantaDB](https://github.com/ness-e/Vantadb).

## Install

> **Not on PyPI yet.** The `vantadb-dspy` package builds and passes
> `twine check` locally; it will go live with the first `adapters-v*` tag
> release. Until then, install from source.

```bash
# Today, from a repo checkout
cd integrations/dspy && pip install .
```

### Install from PyPI (after first release)

```bash
pip install vantadb-dspy
```

## Quickstart

```python
import dspy
from vantadb_dspy import VantaDBRetriever

retriever = VantaDBRetriever(
    db_path="./my_data",
    namespace="docs",
    k=5,
)

# Use in DSPy program
class RAG(dspy.Module):
    def __init__(self):
        self.retrieve = retriever

    def forward(self, question):
        context = self.retrieve(question)
        return context
```

## API

- `VantaDBRetriever(db_path, namespace, k)` — DSPy-compatible retriever
- `forward(query)` — search and return passages

## 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;
  DSPy has no built-in memory, so VantaDB adds retrievable context across
  program runs.
- **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

```bash
pip install -e .
```
