Skip to main content

langchain-cyborgdb

LangChain integration for CyborgDB, the Confidential Vector Database. Provides CyborgVectorStore, a LangChain VectorStore backed by CyborgDB's encrypted vector indexes.

This package is a thin wrapper around the integration that ships in cyborgdb-core — it re-exports CyborgVectorStore, CyborgEmbeddings, and StorageConfig under the standalone package name that LangChain's integration directory expects.

Installation

pip install langchain-cyborgdb

Quick Start

The example below runs with no API key and no extra installs: it uses the built-in all-MiniLM-L6-v2 embedding model and CyborgDB's free tier (api_key=""). Any LangChain Embeddings implementation also works, for example OpenAIEmbeddings() from langchain-openai.

import secrets
from langchain_cyborgdb import CyborgVectorStore, StorageConfig

# Generate an encryption key for the index.
# WARNING: store this key securely; data encrypted with a lost key is unrecoverable.
index_key = secrets.token_bytes(32)

store = CyborgVectorStore.from_texts(
    texts=["hello world", "goodbye world"],
    embedding="all-MiniLM-L6-v2",   # built-in model: no extra install, no paid key
    index_key=index_key,
    api_key="",                     # free tier; pass your key to lift the 1M-item cap
    storage_config=StorageConfig.disk("./cyborgdb-langchain"),
    metric="cosine",
)

for doc in store.similarity_search("hello", k=1):
    print(doc.page_content)  # -> "hello world"

# Delete the index so the example can be run again (the key above is not saved).
store.delete(delete_index=True)

Requires Python 3.10 or newer. Full guide: CyborgDB LangChain docs.

Key Features

  • Full VectorStore API compatibility (add_texts, similarity_search, etc.)
  • Async operations support
  • Configurable distance metrics (cosine, euclidean, squared_euclidean)
  • Document ID tracking and management
  • Max marginal relevance search
  • Factory methods (from_texts, from_documents) for quick setup

Key Classes

CyborgVectorStore

Implements the LangChain-compatible vector store interface. Supports:

  • .add_texts() / .add_documents()
  • .similarity_search() / .similarity_search_with_score()
  • .max_marginal_relevance_search()
  • .get_document() / .get_documents() / .list_ids() / .delete()
  • .as_retriever() for use in LangChain chains
  • Async variants (.aadd_texts(), .asimilarity_search(), etc.)

StorageConfig

Configuration object for defining where index data is stored, built with StorageConfig.disk(path) or StorageConfig.s3(bucket, ...).

Documentation

Full documentation, including metadata filtering and hybrid (BM25) search, lives at docs.cyborg.co.

Using the CyborgDB client/server deployment instead of the embedded engine? The same integration is available via pip install cyborgdb[langchain] — see the Deployment Models Guide.

License

This wrapper is MIT licensed. It depends on cyborgdb-core, which is distributed under its own proprietary license.

Metadata

Release files for langchain-cyborgdb 0.18.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-cyborgdb 0.18.2
File Size Uploaded Provenance Actions
langchain_cyborgdb-0.18.2.tar.gz 6.9 kB With provenance Details for langchain_cyborgdb-0.18.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-cyborgdb 0.18.2
File Interpreter ABI Platform Actions
langchain_cyborgdb-0.18.2-py3-none-any.whl Python 3 none any Details for langchain_cyborgdb-0.18.2-py3-none-any.whl

Total release size: 11.3 kB

Release files / langchain_cyborgdb-0.18.2.tar.gz

Download URL langchain_cyborgdb-0.18.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3882de59adcb4e9cea8a46261073edabcd9e5aa1e41bed949189f6e7f8264dbf
BLAKE2b-256 checksum
How to use checksums
814f982a304690c44968f332624ae96e8d2beaf3976ff3dee4d8ae5dcba2c195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / langchain_cyborgdb-0.18.2-py3-none-any.whl

Download URL langchain_cyborgdb-0.18.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4143a7d0d438733f5fceef24e5b3a98cd49e25e5466ba4aa491713820813d16d
BLAKE2b-256 checksum
How to use checksums
729e2c18932df172be0e257d51a8035f156a111f2722ebc8a003ae1791b0fc8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for langchain-cyborgdb 0.18.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_cyborgdb-0.18.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page