refactor: replace Zep Cloud memory with local JSON file storage#634
Open
PMA-Titan wants to merge 1 commit into
Open
refactor: replace Zep Cloud memory with local JSON file storage#634PMA-Titan wants to merge 1 commit into
PMA-Titan wants to merge 1 commit into
Conversation
Removes the zep-cloud dependency entirely and replaces it with a
local file-based graph store (LocalGraphStore) that persists nodes,
edges, and episodes as JSON files under uploads/graphs/{graph_id}/.
- Add backend/app/utils/local_graph_store.py: thread-safe JSON store
with keyword search, node upsert, and episode append
- Rewrite graph_builder.py: LLM-based entity/relationship extraction
from text batches, stored locally instead of sent to Zep Cloud
- Rewrite zep_graph_memory_updater.py: agent activities written as
episodes + searchable fact edges in local JSON
- Rewrite zep_entity_reader.py: reads nodes/edges from local JSON
- Rewrite zep_tools.py: keyword search on local JSON replaces
Zep semantic search; _local_search is now the primary path
- Update oasis_profile_generator.py: local store replaces Zep client
for entity context enrichment
- Update ontology_generator.py: generated code template uses
pydantic BaseModel instead of Zep EntityModel/EdgeModel
- Convert zep_paging.py to a no-op stub (pagination not needed)
- Remove ZEP_API_KEY from config.py, add GRAPH_STORAGE_DIR
- Remove ZEP_API_KEY guards from api/graph.py and api/simulation.py
- Remove zep-cloud==3.13.0 from requirements.txt and pyproject.toml
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zep-clouddependency entirely (no external API key or network calls needed)backend/app/utils/local_graph_store.py: thread-safe JSON store that persists nodes, edges, and episodes underuploads/graphs/{graph_id}/graph_builder.pyto use LLM-based entity/relationship extraction, storing results locally instead of sending to Zep Cloudzep_graph_memory_updater.pyto write agent activities as episodes + searchable fact edges in local JSONzep_entity_reader.pyandzep_tools.pyto read/search local JSON (keyword matching replaces Zep semantic search)oasis_profile_generator.pyandontology_generator.pyto remove all Zep SDK referencesZEP_API_KEYfromconfig.py,requirements.txt,pyproject.toml, and.envTest plan
ZEP_API_KEY— server should start cleanlyuploads/graphs/{graph_id}/episodes.jsonlandedges.jsoninsight_forgeandpanorama_searchreturn results via keyword search🤖 Generated with Claude Code