Skip to main content

langchain-hydradb

HydraDB integration for LangChain: give your chains and agents persistent, cross-session memory and retrieval powered by HydraDB.

Install

pip install langchain-hydradb   # once published; for local dev: pip install -e .

Prerequisites

  • Python >= 3.9
  • A HydraDB account: API key + tenant ID (hydradb.com)
  • langchain-core >= 0.3

Quick start

from langchain_hydradb import HydraDBClient, HydraDBRetriever

client = HydraDBClient(api_key="sk_live_...", tenant_id="your-tenant")

# Use HydraDB as a retriever in any chain
retriever = HydraDBRetriever(client=client, kind="both", max_results=6)
docs = retriever.invoke("what did we decide about auth?")

# Write durable memory
client.add_text("We deploy on Fridays only.", infer=True)

As chat memory

from langchain_core.runnables.history import RunnableWithMessageHistory
from langchain_hydradb import HydraDBChatMessageHistory

chain_with_memory = RunnableWithMessageHistory(
    chain,
    lambda session_id: HydraDBChatMessageHistory(client, session_id),
    input_messages_key="input",
    history_messages_key="history",
)

What's included

Class Role
HydraDBClient Thin HTTP client, public API only (POST /query, POST /context/ingest, DELETE /context)
HydraDBRetriever BaseRetriever over memory, knowledge, or both
HydraDBChatMessageHistory BaseChatMessageHistory that persists + recalls turns

Notes

  • Public API only. Writes use the public knowledge path (app_knowledge via /context/ingest); the memory-family write route is not publicly exposed, so add_text/add_conversation store as knowledge. Recall kind may still be "memory", "knowledge", or "both" - default is "knowledge".
  • Ingestion is asynchronous; recall a source only after it finishes indexing.
  • The client depends only on requests; no HydraDB SDK required.

Test

pip install -e ".[test]"
pytest

License

Apache-2.0 - Copyright (c) 2026 HydraDB

Metadata

Release files for langchain-hydradb 0.1.0

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-hydradb 0.1.0
File Size Uploaded Provenance Actions
langchain_hydradb-0.1.0.tar.gz 10.4 kB Without provenance Details for langchain_hydradb-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-hydradb 0.1.0
File Interpreter ABI Platform Actions
langchain_hydradb-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_hydradb-0.1.0-py3-none-any.whl

Total release size: 21.7 kB

Release files / langchain_hydradb-0.1.0.tar.gz

Download URL langchain_hydradb-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
05175d04cc185213d223a1dee5aac7fac73204f8cbac37e2662af2fbd6e6839c
BLAKE2b-256 checksum
How to use checksums
0ec8b1ca95a7ba8a4d22a12874a4f8df13d37180fcb496a08ac6ac95aed504c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / langchain_hydradb-0.1.0-py3-none-any.whl

Download URL langchain_hydradb-0.1.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4985bfc85668ece3665e75277270b24809af3d84c75f7f2c4f857419cff4a6f
BLAKE2b-256 checksum
How to use checksums
5831f3b7792f11a47e1e42d7ef40c9b01d2d07ce277c19e89c30a14b05a8daf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for langchain-hydradb 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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