Skip to content

Add Kuzu embedded database support #313

@rysweet

Description

@rysweet

Add Kuzu embedded database support

Summary

Add support for Kuzu (https://kuzudb.com) as an embedded graph database option for Cue/Blarify. This would provide a lightweight, zero-configuration alternative to Neo4j that doesn't require running a separate server.

Motivation

Currently, Cue requires either:

  • A Neo4j server (requires Docker/installation, network configuration, authentication)
  • FalkorDB (requires Redis server)

For users who want a simple, local-only workflow without server management, Kuzu offers:

  • Embedded database - No server required, runs in-process
  • File-based storage - Simple directory-based persistence
  • openCypher compatibility - Same query language as Neo4j
  • Zero configuration - Just specify a directory path
  • Python-native - Pure Python installation via pip

Proposed Implementation

Add a new KuzuManager class that implements the AbstractDbManager interface:

  1. Location: cue/db_managers/kuzu_manager.py
  2. Dependencies: Add kuzu package to pyproject.toml
  3. Interface compliance: Implement all AbstractDbManager methods
  4. CLI integration: Add --db-type kuzu option alongside existing neo4j/falkordb options
  5. Default behavior: Use Kuzu by default for simplicity

Benefits

  • Lower barrier to entry for new users
  • Simpler local development workflow
  • No Docker/server management required
  • Maintains full compatibility with existing Neo4j workflows
  • Same openCypher query language

Testing

We have a working implementation tested on:

  • 893 files
  • 1,434 classes
  • 8,753 functions

We can provide comprehensive tests and documentation.

Questions

  1. Would you prefer Kuzu as the default database or keep Neo4j as default?
  2. Any specific code style or testing requirements we should follow?
  3. Should we update documentation/examples to show Kuzu usage?

We're ready to submit a clean, well-tested PR if this aligns with the project's direction.

/cc @JuanVargas @benerrazuriz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions