graphiti-zep-memory-governor
Govern bi-temporal knowledge graphs with Graphiti future-edge clamping, MinHash/LSH entity dedup, RRF/MMR reranking, and Zep typed ontologies. Do not use for static SQL joins or generic web crawling.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- graphiti-zep-memory-governor
- description
- Govern bi-temporal knowledge graphs with Graphiti future-edge clamping, MinHash/LSH entity dedup, RRF/MMR reranking, and Zep typed ontologies. Do not use for static SQL joins or generic web crawling.
02 资源文件 4
- 参考文档CARD.md2.6 KB
- 参考文档config.default.yaml504 B
- 脚本scripts/graphiti_zep_memory_engine.py4.4 KB
- 脚本tests/test_graphiti_zep_skill_contracts.py2.4 KB
03 SKILL.md 正文
Graphiti Zep Memory Governor
graphiti-zep-memory-governor distills Graphiti bi-temporal edge normalization and contradiction invalidation, entropy-gated 32-perm MinHash/LSH entity deduplication and dangling endpoint cleanup, RRF/MMR/shortest-hop hybrid search reranking, weighted label-propagation clustering with per-group sequential queues, and Zep typed ontology compilation from getzep/graphiti (ed231965) and getzep/zep-python (305d8b3a).
See CARD.md for the companion summary card, pipeline stages, and mandatory invariants checklist. Consult config.default.yaml for baseline entropy, LSH, RRF/MMR, and wire property defaults.
1. Bi-Temporal Edge Normalization & Contradiction Resolution
Separate system ingestion timelines from real-world event truth intervals without corrupting future commitments:
- Clamp Future Assertions & Filter Soft Deadlines (
normalize_bitemporal_edges): Detect planned/scheduled assertions (_FUTURE_ASSERTION_RE), clampvalid_at > reference_timeback toreference_time, and clear falseinvalid_at > reference_timecaused by target deadlines (_DEADLINE_REabsent_ONGOING_STATE_END_RE). - Preserve Contradiction Audit Trails: Record contradicted edge UUIDs alongside surviving facts so historical states remain queryable at earlier points in time.
Completion criterion:
BiTemporalEdgeNormalizationReportnormalizes event validity timestamps and partitions contradicted vs surviving edges cleanly.
2. Entropy-Gated MinHash/LSH Dedup & Dangling Endpoint Hygiene
Eliminate false fuzzy merges on short acronyms while pruning unreferenced synthetic endpoints:
- Gate MinHash/LSH Behind Character Shannon Entropy (
resolve_entities_and_endpoints): Defer names belowNAME_ENTROPY_THRESHOLD = 1.5or shorter than6chars with< 2tokens to LLM disambiguation; match high-entropy 3-gram shingles via32-perm 64-bitblake2bMinHash,4-band LSH, and>= 0.9Jaccard similarity with label promotion (Entityfirst). - Materialize & Prune Dangling Endpoints: Synthesize missing edge endpoints transiently and garbage-collect any materialized endpoints absent from
kept_edge_endpoints.
Completion criterion:
EntityDedupResolutionReportseparates deterministic MinHash/LSH merges from low-entropy LLM deferrals and reports surviving vs pruned endpoints.
3. Hybrid Reranking, Community Clustering & Typed Ontologies
Fuse multi-signal retrieval, detect weighted communities, and validate typed memory schemas:
- Rerank Sparse, Dense & Graph Candidates (
rerank_hybrid_results): Fuse multi-source lists viarrf(rank_const = 1), diversify normalized vectors withmmr(lambda = 0.5), or rank local neighborhoods withnode_distance(center_nodedistance0.1, unreachableinf). - Cluster Communities & Compile Typed Ontologies (
cluster_communities_and_compile_ontology): Run edge-weighted label propagation (candidate_rank > 1), verify non-emptygroup_idsequential queue assignment, and compileEntityModel/EdgeModelschemas acrosstext/int/float/booleanwhile forbiddingIdentityfields on edges.
Completion criterion:
HybridRerankReportandCommunityAndOntologyReportproduce deterministic rankings, communities, and schema validation diagnostics.
The Three Foundational Pillars
1. Bi-Temporal Timeline Separation with Future-Commitment Clamping
Maintain independent ingestion and world-validity intervals while preventing soft delivery deadlines from falsely invalidating planned assertions.
2. Specificity-Gated LSH Deduplication & Endpoint Garbage Collection
Gate probabilistic MinHash/LSH entity merging on character Shannon entropy and prune transiently materialized edge endpoints that lose surviving graph edges.
3. Multi-Signal Retrieval Fusion & Typed Group-Serialized Memory
Combine RRF, normalized MMR, and hop-distance reranking atop per-group serialized graph writes and strictly described entity/edge ontologies.
Anti-Patterns
- Soft Deadlines Written as
invalid_at— Saving target dates like "due by Friday" asinvalid_atwithout ongoing state-end markers falsely expires active commitments. - Unconditional Fuzzy Merging on Low-Entropy Names — Running 3-gram Jaccard or MinHash matching on short or repetitive identifiers merges unrelated concepts instead of deferring to LLM resolution.
- Leaking Materialized Dangling Endpoints — Persisting synthetic placeholder nodes created for edges that are later dropped during filtering pollutes the entity graph.
- Attaching
IdentityProperties to Edges or Empty Docstrings — Assigning entity deduplicationIdentitymarkers toEdgeModelfields or omitting type/field descriptions degrades extraction and breaks Zep ontology compilation.
04 同仓库更多 Skills
ui-behavior-primitive-architect
Architect, audit, and verify zero-dependency headless UI behavior primitives, WebMCP agent bridges, WAI-ARIA/SSR/RTL tri-modal checks, and framework expert routing. Do not use for static CSS theme styling or backend database migrations.
trustgraph-ontology-governor
Govern knowledge graphs, SHACL-AF triple policies, OntologyRAG subclass validation, PROV-O dual named graphs, and Laya entropy decision scoring. Do not use for relational SQL queries or generic web scraping.
shim-harness-governor
Govern universal CLI agent loops, 4-tier tool permissions, ancestor-symlink workspace sandboxes, deterministic-first command routing, collision-safe MCP namespacing, and layered skill loading. Do not use for static UI styling or external SQL analytics.
agora-mcp-workbench-architect
Architect, audit, and orchestrate Agora Workbench MCP servers, loopback sidecars, unified state graphs, gateway/dispatcher connectors, and policy-enforced data lakes. Do not use for static frontend CSS styling or non-MCP desktop GUI automation.
skill-eval-assurance-runner
Evaluate and assure agent skills using small-N Wilson confidence intervals, unbiased pass^k reliability, deterministic trajectory graders, preflight boundary honesty, and sealed digest verification. Do not use for subjective prose review or unconstrained production deployment.
ontology-spider
Query, traverse, validate, and explain Brain Harness knowledge vaults and domain ontologies using formal logic reasoning. Do not use for fuzzy text search or ungrounded vector clustering.