HydraDB has released SelfGraph, an open source framework that turns unstructured text into a graph an AI agent can query. The code is licensed Apache-2.0 and runs on Neo4j, Memgraph, FalkorDB, Kuzu, HydraDB or a store you write.
HydraDB announced it on X on 14 November, calling SelfGraph “the open source framework for building agent graphs” and saying “Every fact keeps its source. Same framework. Any graph store.” HydraDB makes a graph database built on object storage; its own repository is licensed under ELv2, while SelfGraph is a separate Apache-2.0 project.
Introducing SelfGraph.
— HydraDB (@hydra_db) November 14, 2026
The open source framework for building agent graphs.
Turn unstructured text into a graph your agents can query. Every fact keeps its source.
Same framework. Any graph store.
Link in comments.
A graph, here, is a set of entities such as people and companies, joined by relations such as “works at”. SelfGraph’s insert step extracts them from text with any LLM provider, or without an LLM through spaCy named-entity recognition or a built-in regex fallback. You can also skip extraction and insert entities and relations you already have.

How a fact keeps its source
The source link comes from the source_id you pass when inserting text. The docs say each extracted relation then records evidence naming the chunk it came from, and retrieval returns those chunks as passages. Facts inserted directly as structured data return relation and entity lines but no passages.
Changed text under the same source_id is stored as a new version. With replace_source set, relations the new text no longer yields are retired, not deleted, so a read from before the change still returns them.
Retrieval without a vector store
A query is split into words and scored against every entity with BM25, a keyword ranking method, and the top 20 entities become starting points. SelfGraph then walks the graph breadth-first, depth-first or by PageRank, and returns source passages and relationships capped at 3,000 tokens by default. The docs say it stores no vectors and ships no embedder; you can pass your own, which adds embedding-based seeds to the keyword ones.
Every entity is scored on each query, and the docs say that cost grows linearly with the size of the graph.
The graph is versioned, and reads can go back in time two ways. as_of returns what was true at a date, using everything stored since. known_at returns only what the graph held on that date. The docs’ example asks where Ann works: as_of 1 June 2025 returns Globex, the corrected answer, while adding known_at 10 June 2025 returns Acme, the answer before the correction.

One API over six stores
All the logic lives in the SDK, and a store only implements a small set of graph primitives. The README lists Neo4j and Memgraph through the Bolt and openCypher family, FalkorDB over its Redis protocol, embedded Kuzu, HydraDB, and any custom store. Raw Cypher queries are the exception: they use each store’s own dialect, so they differ per backend.

Python installs with pip install selfgraph. The TypeScript port, @hydradb/selfgraph, needs Node 20 or newer. The docs say both SDKs derive the same IDs and store the same encoding, so either can read and extend a graph the other wrote.
Built for agents
SelfGraph ships a CLI and an MCP server over the same API. MCP, the Model Context Protocol, is the standard clients such as Claude Desktop, Cursor and Codex use to call outside tools. The server registers 38 tools and tells the client to call check_readiness, then check_answerable, then retrieve, and to report that the graph doesn’t hold the answer when the check returns not_answerable.
The trust docs add two more signals. A person can certify a relation, which marks it verified and puts it first among equally close results, tagged [certified]. Entities with 50 or more relations count as hubs, and a connection that runs through one is marked (via hub) in the context.
What isn’t built yet
The tiers docs list the planned rungs that don’t exist yet: ontology-guided extraction, a reranking tier, community traversal, evolving entity summaries, text-to-Cypher and text-to-SQL modules, OWL and RDF interop, and resolving text mentions to database records. The CLI and MCP server take no embedder, so embedding-based seeding works only in the SDKs.
The code and docs are in the hydra-db/selfgraph repository, and HydraDB posts updates from @hydra_db.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




