Skip to content

Conversation

@saksham115
Copy link

@saksham115 saksham115 commented Nov 6, 2025

Description

This PR adds RyuGraph as the new graph store provider while maintaining complete backwards compatibility with existing Kuzu configurations.

Background: Kuzu has been archived and is no longer maintained. RyuGraph is a community-maintained fork of Kuzu with an identical API, ensuring ongoing support and updates.

Key Changes:

  • Add ryu_memory.py as native RyuGraph implementation
  • Modify kuzu_memory.py to use RyuGraph internally (backwards compatibility wrapper)
  • Support both "kuzu" and "ryu" providers in factory and configs
  • Add deprecation warnings guiding users to migrate to "ryu" provider
  • Update dependency from kuzu>=0.11.0 to ryugraph>=25.9.0

Backwards Compatibility:

  • NO BREAKING CHANGES: Existing code using provider: "kuzu" continues to work without modification
  • The "kuzu" provider automatically uses RyuGraph under the hood
  • Deprecation warnings guide users to update at their convenience
  • No migration required - existing code benefits from RyuGraph automatically

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

How Has This Been Tested?

  • Unit Test

Test Results:

pytest tests/memory/test_kuzu.py tests/memory/test_ryu.py -v
# ======================== 10 passed, 5 warnings in 0.55s ========================

All tests pass successfully:

  • 5 tests for backwards-compatible 'kuzu' provider (shows expected deprecation warnings)
  • 5 tests for new 'ryu' provider
  • Both providers use RyuGraph internally and work correctly

Test Coverage:

  • Initialization with valid and invalid embedding dimensions
  • Adding, searching, and deleting graph entities
  • Node and edge counting
  • Graph operations with filters and metadata

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (only expected deprecation warnings)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Documentation Updates

  • Updated docs/changelog.mdx - Added v1.0.1 entry emphasizing backwards compatibility
  • Updated docs/open-source/features/graph-memory.mdx - Added both Kuzu (deprecated) and RyuGraph sections
  • Updated docs/platform/features/graph-threshold.mdx - Listed both providers
  • Restored examples/graph-db-demo/kuzu-example.ipynb with deprecation notice
  • Created examples/graph-db-demo/ryu-example.ipynb for new users
  • Updated LLM.md and Makefile references
  • Created optional migration tool with clear documentation

Files Changed

New Files:

  • mem0/memory/ryu_memory.py - Native RyuGraph implementation
  • tests/memory/test_ryu.py - Test suite for RyuGraph
  • examples/graph-db-demo/ryu-example.ipynb - Example notebook for RyuGraph
  • tools/migrate_kuzu_to_ryu.py - Optional migration script

Modified Files:

  • mem0/memory/kuzu_memory.py - Wrapper using RyuGraph internally
  • mem0/utils/factory.py - Supports both "kuzu" and "ryu" providers
  • mem0/graphs/configs.py - Keeps both KuzuConfig and RyuConfig
  • tests/memory/test_kuzu.py - Backwards compatibility tests
  • examples/graph-db-demo/kuzu-example.ipynb - Added deprecation notice
  • pyproject.toml - Updated dependency to ryugraph>=25.9.0
  • Makefile - Updated install_all target
  • Documentation files (changelog, graph-memory, graph-threshold, LLM.md)

Migration Guide for Users

For existing Kuzu users:

  • Your code continues to work without any changes
  • Optional: Update config from provider: "kuzu" to provider: "ryu" at your convenience
  • Optional: Run migration script if you want to explicitly understand the migration

For new users:

  • Use provider: "ryu" in your configuration
  • Install with: pip install "mem0ai[graph]"

Why this change?

  • Kuzu has been archived and is no longer maintained
  • RyuGraph is a community-maintained fork with ongoing support
  • Identical API ensures seamless transition
  • Users automatically benefit from maintained software
  • Future-proofs the graph store functionality

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

Add RyuGraph as the new default graph store provider while maintaining
complete backwards compatibility with existing Kuzu configurations.

Changes:
- Add ryu_memory.py as native RyuGraph implementation
- Modify kuzu_memory.py to use RyuGraph internally (backwards compatibility wrapper)
- Support both "kuzu" and "ryu" providers in factory and configs
- Add deprecation warnings guiding users to migrate to "ryu" provider
- Keep both KuzuConfig and RyuConfig classes for compatibility
- Update dependency from kuzu>=0.11.0 to ryugraph>=25.9.0
- Restore and update test_kuzu.py with backwards compatibility notes
- Restore and update kuzu-example.ipynb with deprecation notice
- Add optional migration tool (tools/migrate_kuzu_to_ryu.py)
- Update documentation to show both providers with deprecation guidance

Backwards Compatibility:
- NO BREAKING CHANGES: Existing code using provider="kuzu" continues to work
- The "kuzu" provider automatically uses RyuGraph under the hood
- Deprecation warnings guide users to update at their convenience
- No migration required - existing code benefits from RyuGraph automatically

Why RyuGraph?
- Kuzu has been archived and is no longer maintained
- RyuGraph is a maintained fork with identical API
- Users get ongoing support and updates automatically
- Seamless transition ensures no disruption
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants