Sulat.com / Writing on AISunday, November 15, 2026
Agents/15 November 2026

HydraDB releases SelfGraph, an open source framework that builds agent graphs from text

HydraDB announced SelfGraph on X on 14 November. The Apache-2.0 Python and TypeScript framework runs on Neo4j, Memgraph, FalkorDB, Kuzu or HydraDB, and ships a CLI and an MCP server.

A 3D HydraDB logo floating between glowing graph nodes, each tied by a thread to a paper document

At a glance

  • HydraDB announced SelfGraph on X on 14 November, calling it an open source framework for building agent graphs that turns unstructured text into a graph agents can query.
  • With a source_id on insert, each extracted relation records the chunk it came from, and retrieval returns those chunks as source passages, according to the SelfGraph docs.
  • Retrieval starts from keyword matches and walks the graph; the framework uses no vector store and ships no embedder, though you can pass your own.
  • SelfGraph runs on Neo4j, Memgraph, FalkorDB, embedded Kuzu, HydraDB or a custom store, in Python and a TypeScript port, with a CLI and an MCP server.
  • The docs list ontology-guided extraction, a reranking tier, community traversal, text-to-Cypher and OWL and RDF interop as not built yet.

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.

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.

SelfGraph flow: text with a source_id, fact extraction, the graph, then passages and relation lines as the answer
Text goes in with a source_id and comes back out as passages and relation lines.

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.

as_of 1 June 2025 returns Globex; known_at 10 June 2025 returns Acme for where Ann works
as_of returns what was true then; known_at returns what the graph held that day.

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.

SelfGraph connects to Neo4j, Memgraph, FalkorDB, Kuzu, HydraDB or a custom store through one API
One API sits over Neo4j, Memgraph, FalkorDB, Kuzu, HydraDB or a store you write.

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.