Repository navigation
v0.1.0
pip install -U selfgraph- Entity resolution: fold a new entity into a stored one that names the same thing. Modes are
exact(default),default(shared external id or alias),fuzzy(similar names) andllm(an LLM confirms close pairs). Every merge is recorded and can be undone withunmerge. Available as--resolverin the CLI and asentity_mergesandunmerge_entityin MCP. - Contradictions: a schema can cap relations per entity with
max_count, e.g. one employer per person. A newer fact that breaks the cap warns by default. Insupersedemode the older fact is retired withinvalidated_atand stays in history.relation list --include-invalidatedshows retired relations. as_ofreads:retrieve(as_of=...)and--as-ofread the graph as it was at a given time.- Maintenance:
decayscores items by recency and frequency,pruneremoves weak or old items, andconsolidatemerges duplicate parallel relations. All three only show the plan unless you pass--apply(dry_run=Falsein the SDK). - Neo4j schema interop:
selfgraph schema importandselfgraph schema exportconvert to and from a Neo4j graph schema. - Evidence: every entity and relation records the source text that supports it (
entity evidence,relation evidence). - Schema checks now also apply to single
createandupdatecalls. The schema also supportsmin_count/max_count, parent types and required properties. - HydraDB 0.4: writes are batched.
- CLI:
versionssubcommands,retrieve --context-only, connection flags after the subcommand, inline JSON for--schema, progress on stderr, and settings checked before connecting. - Fixes: HydraDB now clears emptied fields, re-inserting an old fact no longer retires a newer one, alias-form ids map to the real entity, and an invalid LLM key or model now fails with an error instead of silently producing an empty graph.
Breaking changes
- The
llmextra no longer installsmcp. Usepip install "selfgraph[mcp]"for the MCP server. - List cursors are now id-based. Cursors saved from 0.0.x no longer work.
- A time without a timezone is read as UTC.
- CLI exit codes: 2 for invalid input, 1 for runtime errors, 130 when interrupted.