Skip to content

feat: add Nebula#168

Merged
fridayL merged 59 commits intoMemTensor:devfrom
CaralHsi:nebular
Jul 27, 2025
Merged

feat: add Nebula#168
fridayL merged 59 commits intoMemTensor:devfrom
CaralHsi:nebular

Conversation

@CaralHsi
Copy link
Collaborator

Description

Summary: (summary)

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

fridayL and others added 30 commits July 11, 2025 20:27
Recent updates include:

Updated feature request template and documentation links/images
Added structure reorganizer and conflict resolver functionality
Implemented OpenAI memory integration with evaluation guide
Updated memory reader with bug fixes

Key changes: Template improvements, new conflict resolution tools,
memory system enhancements, and bug fixes.
## Description
Bug Fixes:

Fixed reorganizer bugs and argument errors
Resolved None issue in reorganizer queue
Updated Python version constraints

New Features:

Added support for multiple embedders (Ark/Volcengine, Universal API)
Introduced Neo4j database integration and sharing capabilities
Added evaluation pipeline (longmemeval)
Implemented multi-language support and customizable system prompts
Added MCP (Model Context Protocol) server support with client demo

Improvements:

Enhanced memory management with ID returns and clustering optimizations
Simplified user onboarding with basic memos
Expanded LLM API support and optimized dependency management
Added development tools (download examples, issue templates, stale
management)

Documentation & DevOps:

Updated issue/PR templates and workflows
Improved multi-user example implementations

with significant additions to embedding support, database backends, and
user experience improvements.
@CaralHsi CaralHsi requested a review from fridayL July 26, 2025 17:41
@CaralHsi CaralHsi marked this pull request as ready for review July 26, 2025 17:41
Copy link
Collaborator

@fridayL fridayL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High-Level Summary
Adds NebulaGraph support alongside Neo4j backends.
Introduces a new configuration class for NebulaGraph.
Updates the factory and config systems to recognize the new backend.
Refactors and improves error handling and logging in several modules.
Bumps embedding dimensions from 768 to 3072 (likely for compatibility with new OpenAI embedding models).
Includes one new example script and a new backend implementation file.
Key Changes

  1. NebulaGraph Integration
    New class: NebulaGraphDBConfig in src/memos/configs/graph_db.py for NebulaGraph-specific configuration (e.g., space, user_name, multi-db logic, embedding dimension).
    GraphDBConfigFactory and GraphStoreFactory now map "nebular" to the new Nebula classes.
    New backend implementation file: src/memos/graph_dbs/nebular.py (file added, content not shown in diff).
    Example usage in examples/basic_modules/nebular_example.py.
  2. Embedding Dimension Update
    In multiple places in examples/basic_modules/neo4j_example.py, changes embedding dimension from 768 to 3072.
    Updates related config fields to reflect the new default.
  3. Improved Error Handling and Logging
    In relation_reason_detector.py and reorganizer.py, error handling now logs full traceback information for easier debugging.
    Refactors logic to better structure error handling and result returns.
  4. API/Signature Changes
    BaseGraphDB.get_by_metadata() changes its parameter from a dict to a list of dicts (likely for more complex filtering).
    Adds new abstract method: get_structure_optimization_candidates()—intended to identify graph nodes for structure optimization.
  5. Other Tweaks
    Extends memory type support in Neo4j backend to include "OuterMemory".
    Refines some edge naming conventions (e.g., “AGGREGATE_TO” instead of “AGGREGATES”).
    Adds example usage of OpenAI’s new API endpoints for embeddings (via environment variables).
    Review Comments
    Strengths
    Clean modular addition of a new backend—follows project conventions.
    Good use of config factories and backend mapping for extensibility.
    Improved error handling and diagnostics.
    Embedding dimension update aligns with newer model standards.
    Suggestions & Questions
    Testing & Docs: Please ensure the new NebulaGraph backend and examples are covered by tests and documentation, especially since this adds a new database engine.
    Migration: Existing users may be affected by the embedding dimension change (768→3072). Consider adding a migration note or supporting both dimensions for backward compatibility.
    Config Consistency: “nebular” is the backend string—confirm if the backend should be “nebular” or “nebula” for clarity.
    Edge Naming: Changing “AGGREGATES” to “AGGREGATE_TO” may affect downstream consumers; note this in changelogs.
    Security: Avoid defaulting to placeholder API keys (“sk-xxxxx”) for production usage; remind users to set proper secrets.
    New File Content: The new files (nebular.py, nebular_example.py) are added but not shown in the diff. Please ensure these are complete and follow codebase standards

@fridayL fridayL merged commit 9764d5e into MemTensor:dev Jul 27, 2025
20 checks passed
tangg555 pushed a commit to tangg555/MemOS that referenced this pull request Jul 29, 2025
* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: docker settings modify

* Update tree_config.json

* Update simple_openapi_memos.py

* feat: docker settings modify

* feat: support nebular database

* Update Dockerfile

* Update docker-compose.yml

* Update tree_config.json

* Update simple_openapi_memos.py

* Rename .env.example to docker/.env.example

* feat: update requirement.txt

* feat: update requirement.txt

* feat: update requirement.txt

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: fix multi-tanant bug for nebula; add create index; fix some functions in nebula; fix example

* fix: search bug;

* fix index and multi-db-name

* feat: finish get-by-metadata in nebula

* feat: finish get_structure_optimization_candidates

* fix: return value in nebula

* feat: fix all nebula issue

* feat: create pool connecting

* fix: reorganize bug

* add several edge types to nebula

* feat: change edge name in nebula

* fix: bug for graph not found

* fix: fail to create db bug

* delete test nebula in temp

* fix: no node_not_exist bug

---------

Co-authored-by: chunyu li <[email protected]>
Co-authored-by: stx <[email protected]>
Co-authored-by: Tianxing Shi <[email protected]>
tianxing02 added a commit to tianxing02/MemOS that referenced this pull request Feb 24, 2026
* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: one-click deployment with docker

* feat: docker settings modify

* Update tree_config.json

* Update simple_openapi_memos.py

* feat: docker settings modify

* feat: support nebular database

* Update Dockerfile

* Update docker-compose.yml

* Update tree_config.json

* Update simple_openapi_memos.py

* Rename .env.example to docker/.env.example

* feat: update requirement.txt

* feat: update requirement.txt

* feat: update requirement.txt

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: support nebular database

* feat: fix multi-tanant bug for nebula; add create index; fix some functions in nebula; fix example

* fix: search bug;

* fix index and multi-db-name

* feat: finish get-by-metadata in nebula

* feat: finish get_structure_optimization_candidates

* fix: return value in nebula

* feat: fix all nebula issue

* feat: create pool connecting

* fix: reorganize bug

* add several edge types to nebula

* feat: change edge name in nebula

* fix: bug for graph not found

* fix: fail to create db bug

* delete test nebula in temp

* fix: no node_not_exist bug

---------

Co-authored-by: chunyu li <[email protected]>
Co-authored-by: stx <[email protected]>
Co-authored-by: Tianxing Shi <[email protected]>
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.

3 participants