Skip to content

Migration/zep local#374

Open
anurag-ay wants to merge 13 commits into666ghj:mainfrom
anurag-ay:migration/zep-local
Open

Migration/zep local#374
anurag-ay wants to merge 13 commits into666ghj:mainfrom
anurag-ay:migration/zep-local

Conversation

@anurag-ay
Copy link
Copy Markdown

Summary

Migrates Zep functionality to use local Graphiti with Neo4j setup, including pluggable graph providers.

Changes

  • Refactor backend to support pluggable graph providers.
  • Add local Graphiti runtime and Neo4j setup.
  • Update Graphiti local provider.
  • Add setup documentation (README-SETUP.md).
  • Document Zep cloud to local migration.

Testing

  • Tested local Graphiti integration.
  • Verified Neo4j setup.
  • Checked graph provider switching.

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request Memory Layer Any questions related to RAG, GraphRAG and LLM Memory. labels Mar 28, 2026
blks added a commit to blks/MiroFish that referenced this pull request Mar 29, 2026
vanduc2514 added a commit to vanduc2514/MiroFish that referenced this pull request Apr 20, 2026
Cherry-picked from anurag-ay/MiroFish:migration/zep-local (PR 666ghj#374).
Conflict resolution: kept upstream i18n calls where appropriate,
took anurag's logic changes (validate_graph_backend, provider delegation).

New files:
- backend/app/services/graph_provider/ (BaseGraphProvider ABC, factory,
  GraphitiLocalGraphProvider, ZepCloudGraphProvider, models)

Modified:
- backend/app/__init__.py: call initialize_selected_graph_backend()
- backend/app/config.py: add GRAPH_BACKEND, NEO4J_*, GRAPHITI_* config vars
- backend/app/services/graph_builder.py: delegate to graph provider
vanduc2514 added a commit to vanduc2514/MiroFish that referenced this pull request Apr 20, 2026
* feat(graph): add pluggable graph provider + Graphiti local backend

Cherry-picked from anurag-ay/MiroFish:migration/zep-local (PR 666ghj#374).
Conflict resolution: kept upstream i18n calls where appropriate,
took anurag's logic changes (validate_graph_backend, provider delegation).

New files:
- backend/app/services/graph_provider/ (BaseGraphProvider ABC, factory,
  GraphitiLocalGraphProvider, ZepCloudGraphProvider, models)

Modified:
- backend/app/__init__.py: call initialize_selected_graph_backend()
- backend/app/config.py: add GRAPH_BACKEND, NEO4J_*, GRAPHITI_* config vars
- backend/app/services/graph_builder.py: delegate to graph provider

* feat(graph): add GraphitiLocalGraphProvider implementation

* feat(graph): add ZepCloudGraphProvider wrapping existing Zep Cloud logic

* feat(graph): update app factory and config for pluggable graph backend

- backend/app/__init__.py: call initialize_selected_graph_backend() on startup
- backend/app/config.py: add GRAPH_BACKEND, NEO4J_*, GRAPHITI_* config vars
  and validate_graph_backend() classmethod

* feat(graph): update GraphBuilderService to delegate to pluggable provider

* feat(graph): update API, config files and build assets for graphiti-local support

- backend/app/api/graph.py: validate_graph_backend() replaces ZEP_API_KEY check
- .env.example: add GRAPH_BACKEND, NEO4J_*, GRAPHITI_* vars
- backend/requirements.txt: add graphiti-core comment, update openai pin
- backend/pyproject.toml: update dependencies
- Dockerfile: install graphiti-core==0.28.2 separately via uv
- package.json: add setup:backend script for graphiti-core

* docs: add README-SETUP.md for local Graphiti + Neo4j setup guide

* feat: migrate remaining services to pluggable graph provider

- zep_tools, simulation, oasis_profile_generator: replace direct
  Zep client usage with create_graph_provider()
- zep_entity_reader, zep_graph_memory_updater: delegate all graph
  operations through BaseGraphProvider
- docker-compose.yml: add Neo4j service and volumes
Copilot AI added a commit to vanduc2514/MiroFish that referenced this pull request Apr 20, 2026
- Replace custom ontology_normalizer.py with the upstream version from
  anurag-ay/MiroFish:migration/zep-local (PR 666ghj#374). Key improvements:
  - Preserves ALL-CAPS acronyms: IH_Team → IHTeam (not IhTeam)
  - Adds _ensure_unique_name() to deduplicate colliding entity names
  - Uses PASCAL_CASE_PATTERN fast-path for already-valid names
  - Default fallback is "Entity" (matching Zep conventions)
- Create backend/tests/test_ontology_normalizer.py with upstream test case

Agent-Logs-Url: https://github.com/vanduc2514/MiroFish/sessions/d67e8214-275c-48ff-992d-1a78f54828d1

Co-authored-by: vanduc2514 <52255055+vanduc2514@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Memory Layer Any questions related to RAG, GraphRAG and LLM Memory. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant