MicroFish/backend/app
Abhishek Yadav 28827067c0 feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j
Replaces the paid, rate-limited Zep Cloud service with Graphiti (graphiti-core
0.11.6) backed by a local Neo4j instance — free, unlimited, and self-hosted.

Key changes:
- Add GraphitiAdapter: drop-in Zep-compatible wrapper around Graphiti with a
  persistent event-loop thread to avoid asyncio/Neo4j driver conflicts
- Switch LLM client to native GeminiClient + GeminiEmbedder (text-embedding-004
  fails on Gemini compat endpoint; use google-genai SDK directly)
- Add _GeminiReranker passthrough replacing OpenAIRerankerClient (which
  hardcodes gpt-4.1-nano and uses logprobs unsupported by Gemini)
- Fix Cypher queries: use s.uuid/t.uuid for edge source/target instead of
  r.source_node_uuid (null property in Graphiti's schema)
- Add ontology-based entity type classifier (_classify_entity_type) so nodes
  get colored by type in the D3 graph visualization instead of all being Entity
- Apply classifier in ZepEntityReader so filter_defined_entities finds entities
  (previously 0 personas loaded because all labels were ['Entity'])
- Add startup recovery: auto-mark graph_building projects as graph_completed
  on backend restart if Neo4j already has their data
- Add resume capability to graph build: skip already-processed episodes after
  a restart (断点续传)
- Add non-blocking graph data cache with background refresh in graph.py
- Add EMBEDDING_MODEL config (default: gemini-embedding-001 for Gemini users)
- Add CLAUDE.md with project architecture and dev commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 01:30:28 +05:30
..
api feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30
models Enhance backend functionality with OASIS simulation features 2025-12-01 15:03:44 +08:00
services feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30
utils feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30
__init__.py feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30
config.py feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30