Repository navigation
Releases
v0.2.1
pip install -U selfgraphNew
known_atonretrieveandcheck_answerablereads only what the graph had stored by that time, so a backdated correction does not rewrite past reads. CLI--known-at, MCPknown_at.Relation.certificationskeeps every certification withby,at, anduntil.
Changed
- Certifying again by the same person, or uncertifying an uncertified relation, changes nothing.
- Inserting the same text again keeps the source version as first stored.
v0.2.0
pip install -U selfgraphNew
SelfGraph(level="light" | "balanced" | "max")sets how much each capability does, from deterministic to LLM-backed.max_tiercaps cost.check_answerable(question)says whether the graph holds what a question asks about.readiness()checks the store and lints the data. No LLM.relations.certify(id, by=)marks a fact as checked by a person, so contradictions, source replacement, prune and dedupe keep it.insert.text(..., replace_source=True)retires facts a new source version no longer states.contradiction="llm"retires conflicting facts without a schema.- Schema types take synonyms, definitions and mappings.
Schema.from_tablesdrafts a schema from table metadata. retrieve(..., skip_hubs=True)stops walking through entities linked to everything.schema.to_ossie()exports an Apache Ossie ontology.export_obsidian()writes an Obsidian vault.- HydraDB writes run in parallel, with indexed lookups.
- New CLI commands:
readiness,check-answerable,relation certify,export obsidian. New MCP tools:check_readiness,check_answerable,certify_relation,uncertify_relation.
Breaking
- Renamed:
OntologytoExtraction,DefaultExtractortoLLMExtractor,BasicExtractortoNERExtractor, preferencekindtostance, andmaintenance.consolidatetomaintenance.dedupe_relations.
ts-v0.2.1
npm install @hydradb/selfgraphNew
known_atoption onretrieveandcheckAnswerablereads only what the graph had stored by that time, so a backdated correction does not rewrite past reads. CLI--known-at, MCPknown_at.Relation.certificationskeeps every certification withby,at, anduntil.
Changed
- Certifying again by the same person, or uncertifying an uncertified relation, changes nothing.
- Inserting the same text again keeps the source version as first stored.
Relationhas two new required fields,invalidated_known_atandcertifications.
ts-v0.2.0
npm install @hydradb/selfgraph@0.2.0New
new SelfGraph(store, { level: "light" | "balanced" | "max" })sets how much each capability does.max_tiercaps cost.graph.checkAnswerable(question)andgraph.readiness()tell an agent what the graph holds. No LLM.graph.relations.certify(id, { by })marks a fact as checked by a person, so contradictions, source replacement, prune and dedupe keep it.insert.text(text, { replace_source: true })retires facts a new source version no longer states.contradiction: "llm"retires conflicting facts without a schema.- Schema types take synonyms, definitions and mappings.
fromTables(tables)drafts a schema from table metadata. retrieve(query, { skip_hubs: true })stops walking through hub entities.toOssie(schema)exports an Apache Ossie ontology.graph.exportObsidian()writes an Obsidian vault.- HydraDB writes run in parallel, with indexed lookups.
- Same CLI commands and MCP tools as Python, and the same output byte for byte.
Breaking
- Renamed:
OntologytoExtraction,DefaultExtractortoLLMExtractor,BasicExtractortoNERExtractor, preferencekindtostance, andmaintenance.consolidatetomaintenance.dedupeRelations.
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.
ts-v0.1.0
npm install @hydradb/selfgraph@0.1.0Same changes as Python 0.1.0: entity resolution with merge and unmerge, contradictions with supersede, as_of reads, maintenance (decay, prune, consolidate), Neo4j schema interop, evidence records, schema checks on single writes, HydraDB 0.4 batching, and the CLI and MCP additions and fixes. Also:
setLoggerroutes the library's warnings and progress lines to your own logger.
Breaking changes
- The
aipeer dependency is now>=6. - 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.
Docs: https://github.com/hydra-db/selfgraph/tree/main/typescript#readme
v0.0.4
pip install -U selfgraph- Optional schema: declare entity and relation types to guide extraction and check inserts, in
warn,strictoroffmode. Also available in the CLI (--schema,--schema-mode,selfgraph schema) and in the MCP server (get_schematool). - Clear errors for a wrong password, an unreachable server or a malformed URI.
- Empty or blank names and ids now raise
ValidationError. - Kuzu creates missing parent folders.
memgraphis accepted as a store name. - New CLI flags for external ids, removing aliases and properties, event times, and preference versions.
SyncSelfGraph.connect()andSyncSelfGraph.from_env().- A
prompts_ignoredwarning when prompts are set but no LLM is configured. - Docs fixes.
v0.0.3
First public release of SelfGraph: turn text into a queryable, versioned knowledge graph, with one API over any graph backend.
pip install selfgraph- Extract entities, relations, preferences and decisions from text with any LLM, or without one via spaCy or a built-in fallback.
- Typed CRUD with deterministic ids, versioned relations, source provenance and namespaces.
- Retrieval by keyword seeds plus BFS, DFS or personalized PageRank. No vector store.
- Backends: Neo4j, Memgraph, FalkorDB, embedded Kuzu and HydraDB.
- A CLI and an MCP server over the same API.
- A TypeScript port on npm as
@hydradb/selfgraph.
ts-v0.0.4
npm install @hydradb/selfgraph@0.0.4Same changes as Python 0.0.4, including the optional schema in the SDK, CLI and MCP server. Also:
KuzuStoreoptions (max_db_size,buffer_pool_size,read_only,compression).- MCP tool arguments are validated, and
close()lets an embedding process exit.
Docs: https://github.com/hydra-db/selfgraph/tree/main/typescript#readme
ts-v0.0.3
First public release of the SelfGraph TypeScript SDK. It reads and writes the same graph as the Python SDK.
npm install @hydradb/selfgraphSame API, backends, CLI and MCP server as Python. Node 20+.
Docs: https://github.com/hydra-db/selfgraph/tree/main/typescript#readme