We released Yurtle — a format that makes every Markdown file a knowledge graph node. This is the engine that makes those graphs queryable.

yurtle-rdflib is an RDFlib plugin that turns your Markdown workspace into a SPARQL-queryable knowledge graph. Load a folder, run queries, get answers. Changes flow both ways — edit a file, the graph updates; update the graph, the file changes.

pip install yurtle-rdflib

Three lines of Python and you're querying:

from rdflib import Graph
import yurtle_rdflib

graph = yurtle_rdflib.load_workspace("my-project/")

That's it. Every .md file in my-project/ is now a node in a queryable RDF graph.

Why This Exists

We built this because our AI beings needed it. When you have thousands of knowledge files — training documents, learned facts, episodic memories, procedural skills — you need more than grep. You need to ask questions like:

"Which beings have validated more than 5 hypotheses?"

"What concepts were extracted from documents published after January 2026?"

"Show me all triples with provenance from the children's literature domain."

These are SPARQL queries. And with yurtle-rdflib, you run them directly against your Markdown files. No ETL pipeline. No database migration. No export step.

Live Sync: The Killer Feature

Most knowledge graph tools have a one-way pipeline: ingest data, build graph, query graph. If the source data changes, you re-ingest. If the graph changes, you export. It's brittle and it drifts.

yurtle-rdflib does bidirectional live sync:

kb = yurtle_rdflib.create_live_graph("workspace/", auto_flush=True)

# Add a triple — it's immediately written to the source file
kb.add((subject, predicate, object))

# Edit a file on disk — the graph sees it immediately

This means your AI can learn something (add a triple to the graph) and the knowledge persists as a human-readable Markdown file, tracked in Git, diffable, reviewable. No black box.

What You Can Do With It

Query across your entire workspace:

SELECT ?being ?triples WHERE {
    ?being a <Being> ;
           <training_triples> ?triples .
    FILTER (?triples > 10000)
}

Connect to standard vocabularies. LOINC for lab tests. SNOMED-CT for clinical terms. Schema.org for web content. Dublin Core for metadata. Your Markdown files speak the same language as the semantic web.

Track provenance. Every triple knows which file it came from. When your AI says "Santiago is a fisherman," you can trace that claim back to the exact paragraph in the exact Markdown file where it was extracted.

Over 100 tests included. We test against real workspaces with real data. The nautical project example and lab tests example ship with the repo so you can see exactly how it works. (git grep -c 'def test_' -- 'tests/*.py' — 107 as of this writing.)

The Stack So Far

With yurtle-rdflib, the open source Yurtle stack is now two pieces:

  1. Yurtle — the format (Markdown + semantic frontmatter)
  2. yurtle-rdflib — the engine (SPARQL queries + live sync)

Write knowledge as Markdown. Query it as a graph. Version it in Git. No database required.

Repository: github.com/hankh95/yurtle-rdflib PyPI: pip install yurtle-rdflib License: MIT Requirements: Python 3.10+ (tested through 3.13)