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.1

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.1
File Size Uploaded Provenance Actions
langchain_cyborgdb-0.18.1.tar.gz 6.4 kB With provenance Details for langchain_cyborgdb-0.18.1.tar.gz

Built distribution (wheel)

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

Total release size: 10.6 kB

Release files / langchain_cyborgdb-0.18.1.tar.gz

Download URL langchain_cyborgdb-0.18.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bd2890266b5a93eff77fb53779276c7cec2299f5398e0541443e18afacc319a5
BLAKE2b-256 checksum
How to use checksums
c211b6ccf1c53d0306be7b482e663bcbc5d79b615148de1cddf0404e6c1e42d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 20, 2026.

Transparency log

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

Download URL langchain_cyborgdb-0.18.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03dd089646a2a5213acfaf8ac12fcdd9a1819ee76c2ec0c44c7b55c6e51798b8
BLAKE2b-256 checksum
How to use checksums
4164c4842227e117ae34539bc17558fa59ebabde9229bb52beb99b1b1bb1602f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 20, 2026.

Transparency log

Security for langchain-cyborgdb 0.18.1

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.1.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 Oct 20, 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