Skip to content

okfgen v0.1.0 — make your systems agent-readable in one command

Choose a tag to compare

@bushans bushans released this 01 Jul 12:33
· 14 commits to main since this release

okfgen turns any repo, database, docs site, or open-data portal into a portable, agent-ready knowledge graph — deterministically, with no LLM and no API key. It's a reference implementation of both sides of Google's Open Knowledge Format: producing OKF bundles and consuming them.

demo

Install

uvx okfgen generate .        # zero-install
pip install okfgen           # or: pip install "okfgen[all]"

Highlights

Producers — make a bundle from your data

  • git, local directory, database schema (schema: JSON/SQL), BigQuery (bq:), Firebase/Firestore (firebase:), web docs, and live open-data portals via CKAN (ckan:) and Socrata (socrata:) — no auth, works against data.gov, NYC, Toronto, and thousands of gov portals.
  • The core runs on the Python standard library alone — zero required third-party deps. Cloud SDKs are optional extras, loaded lazily.

Enrichment agent (pass 2)

  • Infers foreign-key join paths between tables (customer_id → customers) and wires backlinks so the graph is navigable both ways.

Consumers — read any bundle back

  • visualize → a self-contained interactive graph (one HTML file, no backend, data never leaves the page)
  • search → a TF-IDF full-text index
  • ask → a reasoning agent that answers with citations and shows the concepts it traversed
  • validate → OKF v0.1 conformance check

Use it inside your AI agent (MCP)

  • Ships an MCP server (okfgen-mcp) exposing generate/search/ask/validate/visualize as tools for Claude Desktop, Claude Code, and Cursor.

Deterministic by default — reproducible facts, not hallucinations; runs offline. An optional --llm flag adds Claude-written polish where you want it.

Try it

uvx okfgen generate . -o my-okf
uvx okfgen visualize my-okf -o my-okf/graph.html

Links

Notes

  • The OKF spec is a v0.1 draft; okfgen tracks it and includes an automated spec-drift watcher.
  • Feedback very welcome — especially on the producer adapters and where the deterministic extraction falls short.

Full Changelog: https://github.com/bushans/okfgen/commits/v0.1.0