Skip to main content

cognee-community-graph-adapter-turbopuffer

A community graph database adapter for cognee backed by TurboPuffer.

TurboPuffer is a vector/document store with no native graph traversal or query language, so this adapter emulates a graph on two TurboPuffer namespaces per dataset — exactly as the core Postgres graph adapter emulates one on relational tables. All traversal is done client-side with single-hop edge queries.

Storage model

Per dataset, namespace-prefixed by database_name:

  • {database_name}_graph_node — one doc per node: id, name, type (the DataPoint class name), belongs_to_set (string[]), and a non-filterable properties JSON blob holding all remaining fields (so large text is kept in full).
  • {database_name}_graph_edge — one doc per edge: a deterministic uuid5 id (TurboPuffer caps ids at 64 bytes), source_id, target_id, relationship_name, denormalized endpoint identity (source_name/source_type/target_name/target_type), and the full edge properties JSON blob.

Install

uv pip install -e cognee-community/packages/graph/turbopuffer
# or, from the package directory:
uv pip install -e .

Configure & use

import cognee
from cognee_community_graph_adapter_turbopuffer import register

register()  # registers the "turbopuffer" graph provider + dataset handler
cognee.config.set_graph_database_provider("turbopuffer")

# Environment:
#   TURBOPUFFER_API_KEY   (required)
#   TURBOPUFFER_REGION    (required by the SDK; e.g. gcp-us-central1)

await cognee.add("Alice followed the White Rabbit.")
await cognee.cognify()
results = await cognee.search("Who does Alice meet?")

For multi-tenant backend access control, also select the graph dataset handler:

GRAPH_DATABASE_PROVIDER=turbopuffer
GRAPH_DATASET_DATABASE_HANDLER=turbopuffer_graph

(The handler is registered under turbopuffer_graph so it does not collide with the TurboPuffer vector adapter's turbopuffer handler.)

Supported vs. not (v1)

Supported: CRUD, single-hop reads (get_neighbors, get_connections, get_edges), get_neighborhood(depth=1), get_graph_data, get_filtered_graph_data, get_nodeset_subgraph (OR + client-side AND), get_graph_metrics (counts + mean degree), get_triplets_batch (offset pagination via deterministic cursor scan), remove_belongs_to_set_tags, delete_graph, per-dataset isolation.

Not in v1: multi-hop BFS (get_neighborhood(depth>=2)) and raw Cypher (query) raise NotImplementedError. Connectivity-dependent metrics (connected components, diameter, clustering) return the -1 sentinel, matching the Postgres adapter.

Examples & tests

# build the Alice graph and query it
GRAPH_DATABASE_PROVIDER=turbopuffer python examples/example.py
python examples/inspect_graph.py --raw       # inspect node/edge namespaces
python examples/export_graph.py               # dump nodes.json / edges.json

# tests (see tests/README.md for tiers)
./run_tests.sh integration                    # live per-method + isolation
./run_tests.sh e2e                            # full add->cognify->search on Alice

Metadata

Release files for cognee-community-graph-adapter-turbopuffer 0.2.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 cognee-community-graph-adapter-turbopuffer 0.2.0
File Size Uploaded Provenance
cognee_community_graph_adapter_turbopuffer-0.2.0.tar.gz 27.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cognee-community-graph-adapter-turbopuffer 0.2.0
File Interpreter ABI Platform
cognee_community_graph_adapter_turbopuffer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.8 kB

Release files / cognee_community_graph_adapter_turbopuffer-0.2.0.tar.gz

Download URL cognee_community_graph_adapter_turbopuffer-0.2.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e2b86d68d8b0abe6045f7f52bef0710689be33da9b723edaf4030dfeee704a04
BLAKE2b-256 checksum
How to use checksums
78d2886b31e91d6b0df16adc3eb6c4247e00a5e59a8e664d9bdbf677fa5149d7
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_graph_adapter_turbopuffer-0.2.0-py3-none-any.whl

Download URL cognee_community_graph_adapter_turbopuffer-0.2.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4ef8335580d6ede6ad8fcd88f1d830c6569edb952208a829491b442edc350a0
BLAKE2b-256 checksum
How to use checksums
b44b6e5acd21a3522cd02901cf87a65d8515f75acac8855b07d2ae094ee9d1df
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-graph-adapter-turbopuffer 0.2.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.2.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