OKF README & Reference Agent
July 1, 2026 · View on GitHub
The okf/ directory of GoogleCloudPlatform/knowledge-catalog
contains the spec, a reference agent, sample recipes, and example
bundles (GA4, Stack Overflow, Bitcoin).
The reference agent
Produces an OKF bundle in two passes:
- BQ pass — one concept per object from BigQuery metadata alone.
- Web pass — the LLM acts as a crawler: it fetches seed URLs via a
fetch_urltool and follows outbound links that look like authoritative docs, then either enriches an existing concept, mints areferences/<slug>concept, or skips. Safety rails:--web-max-pagescap and a same-domain--web-allowed-hostfilter;--no-webskips crawling.
enrich
python -m reference_agent enrich \
--source bq --dataset <project>.<dataset> \
--web-seed-file <seeds.txt> --out ./bundles/<name>
--concept <type>/<name> (repeatable) iterates on a single concept.
visualize
python -m reference_agent visualize --bundle ./bundles/<name>
Writes a self-contained interactive viz.html (Cytoscape.js graph + marked for markdown,
both from CDN, no backend, no data leaves the page): force-directed graph colored by
type, edges from cross-links, a detail panel
with frontmatter + rendered body, a "Cited by" backlinks list, plus search, type filter, and
switchable layouts.
Relevance to this project
The reference agent shows the producer and consumer ends of OKF working end-to-end. It is
domain-coupled (BigQuery + web crawl). Our contribution is a portable producer/maintainer: the
generic ingest / query / lint
skills, usable in any project, over the same format. The visualize command is directly reusable
on any conformant bundle — including this one.