Cognee Community ArcadeDB Hybrid Adapter
A community-maintained adapter that enables Cognee to work with ArcadeDB as a unified hybrid database — both graph and vector operations in a single engine.
Based on PR#94 by @lvca (ArcadeDB team) with additional fixes for Cognee 1.0+ compatibility and production reliability.
Installation
pip install cognee-community-hybrid-adapter-arcadedb
# Optional: Bolt protocol support (faster graph operations)
pip install "cognee-community-hybrid-adapter-arcadedb[bolt]"
Usage
import asyncio
import os
import pathlib
from os import path
from cognee import config, prune, add, cognify, search, SearchType
# Import the register module to enable ArcadeDB support
from cognee_community_hybrid_adapter_arcadedb import register
async def main():
# Set up local directories
system_path = pathlib.Path(__file__).parent
config.system_root_directory(path.join(system_path, ".cognee_system"))
config.data_root_directory(path.join(system_path, ".cognee_data"))
# Configure databases
config.set_relational_db_config(
{
"db_provider": "sqlite",
}
)
# Configure ArcadeDB as both vector and graph database
config.set_vector_db_config(
{
"vector_db_provider": "arcadedb",
"vector_db_url": os.getenv("ARCADEDB_URL", "localhost"),
"vector_db_port": int(os.getenv("ARCADEDB_HTTP_PORT", "2480")),
"vector_db_username": os.getenv("ARCADEDB_USERNAME", "root"),
"vector_db_password": os.getenv("ARCADEDB_PASSWORD", ""),
}
)
config.set_graph_db_config(
{
"graph_database_provider": "arcadedb",
"graph_database_url": os.getenv("ARCADEDB_URL", "localhost"),
"graph_database_port": int(os.getenv("ARCADEDB_HTTP_PORT", "2480")),
"graph_database_username": os.getenv("ARCADEDB_USERNAME", "root"),
"graph_database_password": os.getenv("ARCADEDB_PASSWORD", ""),
}
)
# Optional: Clean previous data
await prune.prune_data()
await prune.prune_system(metadata=True)
# Add and process your content
await add("""
Natural language processing (NLP) is an interdisciplinary
subfield of computer science and information retrieval.
""")
await cognify()
# Search using graph completion
search_results = await search(
query_type=SearchType.GRAPH_COMPLETION,
query_text="Tell me about NLP",
)
for result in search_results:
print("\nSearch result:\n" + result)
if __name__ == "__main__":
asyncio.run(main())
Configuration
The ArcadeDB adapter can be configured as both a vector database and graph database, providing true hybrid capabilities.
Environment Variables
export ARCADEDB_URL="localhost"
export ARCADEDB_HTTP_PORT="2480"
export ARCADEDB_USERNAME="root"
export ARCADEDB_PASSWORD="your-password"
export GRAPH_DATASET_DATABASE_HANDLER="arcadedb_graph_local"
export VECTOR_DATASET_DATABASE_HANDLER="arcadedb_vector_local"
ArcadeDB Setup
ArcadeDB is a multi-model database that natively supports graph traversal, vector search, and document operations in a single engine.
HTTP only (simplest):
docker run -p 2480:2480 \
-e JAVA_OPTS="-Darcadedb.server.rootPassword=your-password" \
arcadedata/arcadedb:latest
With Bolt protocol (recommended for better graph performance):
docker run -p 2480:2480 -p 7687:7687 \
-e JAVA_OPTS="-Darcadedb.server.rootPassword=your-password \
-Darcadedb.server.plugins=Bolt:com.arcadedb.bolt.BoltProtocolPlugin" \
arcadedata/arcadedb:latest
Configuration Parameters
Graph Database Configuration:
graph_database_provider: Set to"arcadedb"graph_database_url: ArcadeDB server hostname (default:"localhost")graph_database_port: HTTP API port (default:2480)graph_database_username: Database usernamegraph_database_password: Database password
Vector Database Configuration:
vector_db_provider: Set to"arcadedb"vector_db_url: ArcadeDB server hostname (default:"localhost")vector_db_port: HTTP API port (default:2480)vector_db_username: Database usernamevector_db_password: Database password
How it works
Graph operations
Graph operations use the Neo4j Bolt protocol when the BoltProtocolPlugin is enabled (port 7687), with automatic fallback to the HTTP API (OpenCypher). The adapter verifies Bolt connectivity on first use and transparently falls back if unavailable.
Vector operations
Vector operations use ArcadeDB's HTTP API for SQL queries:
- Index creation:
CREATE INDEX ... LSM_VECTOR METADATA { dimensions: N, similarity: 'COSINE' } - Vector storage: Stored as
ARRAY_OF_FLOATSproperties on vertex records - Search:
SELECT expand(vectorNeighbors('Type[prop]', [vec], k))returns results sorted by distance
Auto-detection
The adapter automatically:
- Detects the Cypher vertex type casing (
Vertexvsvertex) based on ArcadeDB version - Creates the target database on first use (if it doesn't exist)
- Retries on HTTP 503
ConcurrentModificationException(ArcadeDB uses optimistic concurrency)
Key differences from PR#94
This adapter is based on PR#94 by @lvca with the following improvements:
| Area | Description |
|---|---|
| Bug fix | index_data_points() now delegates to create_data_points() for proper vector embedding and storage. Without this fix, vectors are never populated on TextSummary/DocumentChunk nodes, making vector search return empty results. |
| Cognee 1.0+ | get_neighborhood() implementation for the new GraphDBInterface API |
| Compatibility | Auto-detection of Cypher type casing (ArcadeDB 26.3 vs 26.4+) |
| Reliability | Retry with backoff on HTTP 503 ConcurrentModificationException |
| Database | Lazy auto-creation with privilege-aware probing (from PR#94 commit 2b0b9f7) |
Requirements
- Python >= 3.11, <= 3.13
- ArcadeDB >= 26.3 (tested with 26.4.2)
- Cognee >= 1.0.3
About ArcadeDB
ArcadeDB is a multi-model database engine that combines the power of graph databases, document stores, and vector search in a single, unified system:
- Graph: Full OpenCypher and Gremlin support, with Neo4j Bolt protocol compatibility
- Vector: Native HNSW/LSM_VECTOR indexes with cosine/euclidean similarity
- Document: JSON document storage with SQL queries
- Multi-model: Use all paradigms together in a single query
Key benefits:
- No separate vector DB needed — keep embeddings co-located with the knowledge graph
- Distributed via Raft — built-in high availability (no external coordination service)
- Low latency — optimized for fast traversals and real-time analytics
- SQL + Cypher — query in either language, or mix them
Learn more at arcadedb.com and the GitHub repository.
Metadata
Release files for cognee-community-hybrid-adapter-arcadedb 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cognee_community_hybrid_adapter_arcadedb-0.5.0.tar.gz | 18.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cognee_community_hybrid_adapter_arcadedb-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.6 kB
Release files / cognee_community_hybrid_adapter_arcadedb-0.5.0.tar.gz
| Download URL | cognee_community_hybrid_adapter_arcadedb-0.5.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b1f0481e1c7ebc08159b97f3ac3903c9be938ddcce12ee080a107f12b5ee96e
|
|
BLAKE2b-256 checksum How to use checksums |
d6c1019f70e70ed10d73bf0cb76d419c037fabe087d2db0aac1c0024630d694b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.18 Darwin/24.1.0
|
Release files / cognee_community_hybrid_adapter_arcadedb-0.5.0-py3-none-any.whl
| Download URL | cognee_community_hybrid_adapter_arcadedb-0.5.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a29fc947b0778a12def262acedf79df8211c4e4902e53d3d1ed5aad34f8023ae
|
|
BLAKE2b-256 checksum How to use checksums |
8cdaa7ebad189eff0409b68edf5646d2b78b4e223157046c59a8d003203b8f87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.18 Darwin/24.1.0
|
Security for cognee-community-hybrid-adapter-arcadedb 0.5.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.