-
Notifications
You must be signed in to change notification settings - Fork 160
Feat: neo4j community #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ublic into feat/neo4j-community
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review & Summary for PR #121 – Neo4j Community Edition Support
1. Neo4j Community Edition Support
-
New Classes & Configs
Neo4jCommunityGraphDB
andNeo4jCommunityGraphDBConfig
are introduced.- These provide Neo4j Community Edition compatibility by disabling multi-database and vector index features (which are enterprise-only).
-
User Isolation & Vector Database
- Enforces per-user isolation via a mandatory
user_name
field. - Embeddings are handled by an external vector database (Qdrant), not Neo4j itself.
- Enforces per-user isolation via a mandatory
-
Indexing
- Only creates basic B-tree property indexes on Neo4j.
- Vector payload indexes are managed in Qdrant.
-
Unsupported Operations
- Multi-DB, DB creation, and destructive DB drop operations are explicitly disallowed or raise clear errors.
2. Factory and Configuration Updates
- Factory Methods
- Both
GraphDBConfigFactory
andGraphStoreFactory
are updated to support the"neo4j-community"
backend.
- Both
- Example Configuration
- A sample config file (
tree_config_community.json
) is added showing how to use Neo4j Community with Qdrant for vectors.
- A sample config file (
3. Example Scripts
- Quickstart Example
simple_openapi_memos_neo4j_community.py
: Shows how to set up MOS with OpenAI API, Neo4j Community, and Qdrant.- Demonstrates memory add/get/search, conversation, and filtering out embeddings from display results.
4. Vector DB Abstraction & Qdrant
- Interface Expansion
get_by_ids
andensure_payload_indexes
are now abstract methods in the base vector DB interface.- Qdrant backend implements these, allowing multi-id fetches and idempotent payload index creation.
5. Code Quality and Minor Changes
- Refactoring
- Node parsing logic is moved to instance methods for subclass extensibility.
- Unused debug and Chinese comments are removed.
- Bug Fixes
- Fixes around node parsing, edge deletion, and property handling.
Summary
This PR enables MemOS to use Neo4j Community Edition as a graph backend by:
- Separating enterprise-specific logic,
- Integrating Qdrant for vector search,
- Enforcing per-user logical isolation,
- Providing clear example usage and configuration.
Impact:
Greatly broadens deployability—users can now run MemOS with open-source Neo4j and Qdrant, no enterprise license needed.
Code Quality:
Code is modular and maintainable, with good extensibility for future data backends.
Overall:
A significant improvement for open-source and multi-tenant deployments. Well-structured, well-documented, and easy to adopt.
Description
Summary:
feat: support Neo4j Community Edition with Qdrant integration
user_name
get_by_ids
andensure_payload_indexes
in base VecDB interfaceneo4j-community
backendtree_config_community.json
as an example config using Neo4j Community + Qdrantsimple_openapi_memos_neo4j_community.py
to demonstrate core functionality:This change enables full MemOS support for open-source Neo4j deployments, expanding accessibility and ease of adoption.
Fix: #95
Reviewer: @(reviewer)
Checklist: