Skip to main content

crewai-hydradb

HydraDB as external memory for CrewAI agents. Your crews recall relevant history on each task and persist their outputs into HydraDB, so memory survives across runs.

Install

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

Prerequisites

  • Python >= 3.10
  • A HydraDB account: API key + tenant ID (hydradb.com)
  • crewai >= 1.0, < 1.11

CrewAI version compatibility

This integration implements CrewAI's Storage interface (crewai.memory.storage.interface.Storage) wired via ExternalMemory, which exists in CrewAI 1.0-1.10 (verified present in 1.5, removed in 1.11). CrewAI 1.11+ restructured memory around a new embedding-based StorageBackend protocol that expects the backend to store and search raw embedding vectors - a poor fit for HydraDB's text-query recall. On 1.11+, use HydraDB over MCP instead (hydra-db/hydradb-mcp), which exposes HydraDB's own retrieval without a vector-store contract.

Quick start

from crewai import Crew
from crewai.memory.external.external_memory import ExternalMemory
from hydradb_crewai import HydraDBClient, HydraDBStorage

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

crew = Crew(
    agents=[...],
    tasks=[...],
    external_memory=ExternalMemory(storage=HydraDBStorage(client)),
)
crew.kickoff()

Notes

  • Public API only. save writes via the public knowledge path (app_knowledge → /context/ingest); search uses POST /query. The memory-family write route is not publicly exposed, so outputs are stored as knowledge (default kind="knowledge").

How it works

CrewAI's ExternalMemory delegates to a Storage implementation:

CrewAI call HydraDB
save(value, metadata) - after a task completes ingest as HydraDB knowledge (app_knowledge)
search(query, limit, score_threshold) - before a task hybrid recall from HydraDB

This mirrors the pattern used by Mem0, Honcho, and Hindsight.

Test

pip install -e ".[test]"
pytest

License

Apache-2.0 - Copyright (c) 2026 HydraDB

Metadata

Release files for crewai-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 crewai-hydradb 0.1.0
File Size Uploaded
crewai_hydradb-0.1.0.tar.gz 10.0 kB Details

Built distribution (wheel)

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

Total release size: 20.6 kB

Release files / crewai_hydradb-0.1.0.tar.gz

Download URL crewai_hydradb-0.1.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
957a38b21ed185709ef4391036a72d9ef5ab4ca5116f8d8f80c389e2a14a55f2
BLAKE2b-256 checksum
How to use checksums
b534ccce20bd809f0689162778005ec38656cffb5f39d8e43e043246173d6d7f
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 / crewai_hydradb-0.1.0-py3-none-any.whl

Download URL crewai_hydradb-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ce150ed1388238c9c400eafdab5c12be83a23825bde990514e33fcbf38accb8
BLAKE2b-256 checksum
How to use checksums
d2c4dea4414f5c53545d33e7fd88d9e0ac85415c9f2f8fe002f0860e1dc6ae21
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 history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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