Scan your whole stack
From OX Research Newsroom
Are you using okfgraph?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.18.0
okfgraph was last scanned on 30 Nov 2026 at version 0.18.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.18.0 LATEST | 30 Nov 2026 | No rules fired |
| 0.17.0 | 30 Nov 2026 | No rules fired |
| 0.16.1 | 22 Nov 2026 | No rules fired |
| 0.16.0 | 22 Nov 2026 | Not shown |
| 0.15.0 | 16 Nov 2026 | Not shown |
Findings for v0.18.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.18.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Ladybug-backed knowledge graph with Rust retrieval, model-free graph ranking, and agent-first MCP + CLI + HTTP surfaces.
OKFgraph builds, queries, and maintains a knowledge graph from Markdown/OKF documents. It combines hybrid semantic search (vector + FTS, RRF-fused), chunk-level retrieval, model-free PPR retrieval that works with no embedding model loaded, structural diffing, scored health checks, and Obsidian-vault compatible wikilinks — in a single LadybugDB file.
Since 0.16.0 the implementation has been Rust. One native core powers the CLI, MCP server, HTTP owner and Python facade. Python is a thin PyO3 layer with the same public API as 0.15; there is no Python core and no Python fallback.
0.18.0 breaks one thing on purpose. okf serve now wants a bearer token on
every route but GET /health, /mcp included. The owner writes 64 hex
characters to <db>.serve.token (readable only by its user) and names the
file in the discovery record, so OkfClient::connect, Python
okfgraph.connect, okf and okf-mcp --connect pick the token up
themselves; any other client passes token= or OKFGRAPH_TOKEN, or the owner
runs with --no-auth. The same release runs the long ops as cancellable jobs
with Server-Sent Event progress, adds client leases, --idle-exit and
POST /admin/shutdown so an owner can be managed by another program, and pins
a llama.cpp host by the GGUF file it serves. okf serve also binds loopback
only and refuses a non-loopback Host unless you pass --allow-remote. See
docs/release-notes-0.18.0.md.
Design stance: one wheel, few dependencies, no legacy fallbacks. Embeddings
run through the embroider Rust crate (ONNX Runtime, no torch / transformers /
optimum anywhere). PDF and Office conversion is the bobine Rust engine, bundled
inside the wheel. What isn't needed isn't installed.
| Category | Features |
|---|---|
| Core | Rust core in src/; 30 router ops shared by the Python facade, CLI, HTTP and MCP; transactional imports; one writer per database |
| Embeddings | google/embeddinggemma-2 (default), Jina v5 text-nano, and the gemma vision pairing through embroider; device cpu/cuda, precision auto/fp32/fp16/int8; model, precision and vector space pinned per graph, never mixed |
| Search | Hybrid RRF fusion (vector + FTS) at concept and chunk granularity; rank=none\|hub\|ppr\|cross; PPR is lexical-seeded and model-free; chunk collapse, expansion, token budgets, filters |
| Read | Body / chunks / rebuilt document / graph context, with optional token budgets (max_tokens) |
| Storage | LadybugDB 0.23 (lbug =0.23.1, core 0.23.0, pinned): graph + vector + FTS in one file; schema v10 |
| Links | Path links (](doc.md)) and [[wikilinks]] resolved by uid → aliases → title → filename stem; ambiguity never resolves; broken links tracked and repairable |
| Import | Single files, bundles (delta-aware: only changed files re-embed, --prune-missing drops deleted concepts), PDF/Office, raw thoughts, BibTeX; mordant lint on the way in; okf produce builds bundles from SQLite |
Bundled native converter (bobine): PDF, DOCX/XLSX/PPTX and legacy Office; routing auto\|surgical\|always\|never; one warm converter per batch |
|
| Diff | okf diff: structural snapshot (dir vs dir, no model) and drift (graph vs dir); CI exit codes and --json |
| Doctor | okf doctor: 0–100 health score, safe --fix that never touches reviewed: true, --strict CI gate, cache/stale/lock probes |
| Export | OKF round-trip with See Also / Cited By enrichment and index files, or --flavor obsidian ([[Title]] wikilinks, no index files, edge-lossless re-import) |
| Images | Caption-based (mode=text) or image-content (mode=optional/omni) with content-hash dedup and the okf-asset:// protocol; unsafe asset ids are refused |
| Surfaces | Python (OKFRouter, OKFClient), 30-command okf CLI (29 from 0.15 plus settings), 11 MCP tools over stdio or /mcp, and one okf serve owner over TCP or POSIX UDS |
| Jobs | In-memory HTTP job lane; reembed, import_files, import_bundle, sync, produce, reindex and export_bundle run as jobs, one at a time, with progress over GET /jobs/<id>/events (SSE) and cooperative cancel |
Requires Python 3.12, 3.13 or 3.14. The extras decide what you get:
| Extra | Installs | Gives you |
|---|---|---|
cpu or gpu (pick exactly one) |
onnxruntime==1.31.1 / onnxruntime-gpu[cuda,cudnn]==1.31.1 |
the ONNX Runtime that embedding, search and rerank run on |
pdf |
nothing (compatibility alias) | PDF/Office conversion is already in the wheel |
dev |
pytest |
the Python compatibility suite |
Why the runtime isn't installed by default. onnxruntime and
onnxruntime-gpu are two distributions of the same onnxruntime module, and
pip can't pick one from the hardware or install both side by side. A bare
pip install okfgraph installs, but the first embedding fails with
NO_ORT_RUNTIME and the install line to run.
Why pdf is a no-op. Since 0.16 one wheel contains the facade, the Rust
core and the bobine converter. The extra stays so 0.15 install commands
(okfgraph[cpu,pdf]) keep working.
[gpu] |
[cpu] |
|
|---|---|---|
| Pick it when | the machine has an NVIDIA GPU (nvidia-smi prints it) |
no NVIDIA GPU, macOS, CI, or a small install |
| Runtime | onnxruntime-gpu[cuda,cudnn]==1.31.1 (large download) |
onnxruntime==1.31.1 (small) |
--device auto lands on |
CUDA, FP16 weights | CPU, FP32 weights |
| Platforms | Windows and Linux x86-64 with a recent NVIDIA driver | all |
Not sure? Run nvidia-smi: if it lists a GPU, take [gpu]. After installing,
okf doctor shows cuda_usable=True/False. With a GPU present but the CPU
runtime installed it adds an ort_gpu_unused note. Switching later is safe for
the install, but vectors made on CPU (FP32) and GPU (FP16) cannot share one
graph (the precision pin refuses it), so pick before the first import or plan a
reimport.
PyPI
pip install "okfgraph[gpu,pdf]" # NVIDIA GPU
pip install "okfgraph[cpu,pdf]" # everything else
Supported targets: Windows x64, Linux x86_64 and macOS arm64. Python 3.11, Linux aarch64 and macOS x86_64 are not part of the first release.
From source needs a Rust toolchain (1.88+) and OpenSSL. On Windows use vcpkg:
export VCPKG_ROOT='C:\path\to\vcpkg'
export VCPKGRS_DYNAMIC=1
vcpkg install --classic openssl:x64-windows
python bindings/python/build_wheel.py --release
On macOS install openssl@3 and set OPENSSL_ROOT_DIR=$(brew --prefix openssl@3). Linux needs the usual OpenSSL development package.
Prefer a system-wide ONNX Runtime (conda, distro package, self-built)? Skip
both extras and point ORT_DYLIB_PATH at your onnxruntime 1.31 library instead
— but never rely on bare OS-loader discovery: a stale system DLL (e.g. in
System32) fails the load instead of being used.
After installing, copy the agent skills into your harness:
okf setup skills writes them to .claude/skills/ (Claude Code); --to DIR
for another harness, --skill NAME for one of them.
Each model can run in its own server instead of inside okfgraph:
[embedding] backend = "external" (text), [search] rerank_backend = "external" (reranker) and [embedding] image_backend = "external" (vision),
each with an endpoint URL (endpoint_url, rerank_endpoint_url,
image_endpoint_url). An embroider host serves any of them:
python -m embroider.serve --kind vision --model <image model id> --dim <graph dim> --port 8091
[embedding]
image_backend = "external"
image_endpoint_url = "http://127.0.0.1:8091"
The image lane has no declared mode: the host must be embroider and report its
model, width, precision, vector space and text partner on GET /v1/models;
okfgraph refuses a host whose model, width or text partner doesn't match the
graph. okfgraph sends the original image bytes and the host resizes them, so
vectors match the in-process lane. An unreachable host is
EXTERNAL_UNAVAILABLE.
A text or rerank host without an identity row (llama-server, TEI, vLLM) is a
declared host: you name its family, width and prefixes. Its vectors get their
own space (declared/<family>@<model_id>:<dim>), so a graph never mixes them
with embroider's, in either direction. The known families are embeddinggemma-2
(EmbeddingGemma 2 GGUF on llama.cpp) and nomic-v1.5. The full host contract
(routes, shapes, identity, families, a llama-server example) is
docs/external-api.md.
okfgraph = "0.18" # everything, as the wheel
okfgraph = { version = "0.18", default-features = false, features = ["client"] }
The defaults (store, producer-sqlite, embed, external, vision) build
what 0.16 built. client alone is settings, model metadata, the typed op
contract, errors and an async HTTP client, with no LadybugDB, SQLite, ONNX
Runtime, bobine or image codecs (CI checks the tree). Other features: meta,
client-blocking, cli, server, mcp, pdf.
okf init --db-path kb.db --bundle-root kb/ # once; persists to okfgraph.toml
okf import --all # delta-aware bulk import
okf search "honey badger defense" # hybrid semantic search
okf search --rank ppr "honey badger" # same question, no model load
okf read savanna --include context --max-tokens 1500
okf traverse savanna --relationship LINKS_TO --direction BOTH
okf diff # drift: graph vs bundle dir
okf doctor # health score + findings
okf lint kb/ # pre-import gate, no model
okf produce --from sqlite --source shop.db --output-dir kb/
okf images savanna # image assets on one concept
okf image img-1 --output-path asset.png # fetch one asset
from pathlib import Path
from okfgraph import OKFRouter
# The constructor creates a missing database and its parent directory.
router = OKFRouter(db_path="kb.db", bundle_root="kb/", embedding_dim=512)
# Import: whole bundle (delta-aware), one file, or raw reasoning
result = router.import_bundle(None) # every configured root
cid = router.import_file("kb/auth.md", mode="text")["concept_id"]
th = router.ingest("thoughts", thoughts="Session decided X because Y",
topic="auth-refactor")["concept_id"]
# Search: hybrid (default), hub-blended, model-free PPR, cross-encoder
hits = router.search("session auth decisions", limit=5)
hubbed = router.search("session auth decisions", rank="hub")
cold = router.search("auth refactor", rank="ppr")
ranked = router.search("auth refactor", rank="cross")
# Read: full shapes, or a token-budgeted section list
doc = router.read("auth", include="body")
reading = router.read("auth", include="context", max_tokens=1500)
# Image assets are first-class read ops
imgs = router.list_images(cid)
row = router.get_image(imgs[0]["id"])
# Maintain: drift, health, links
print(router.diff(Path("kb/"))["identical"]) # differs -> DIFF_DIFFERENT on err.data
print(router.doctor()["report"]["score"]) # 0-100
print(router.doctor(stale_days=365, fix=True))
print(router.repair_links()) # {"repaired": n}
# Export: OKF bundle or Obsidian vault
router.export_bundle(Path("out-okf/"))
router.export_bundle(Path("out-vault/"), flavor="obsidian")
router.close()
The supported Python surface is documented in
docs/python-binding.md. Internal modules
(okfgraph.components.*, okfgraph.ops.*) are intentionally gone; use the
router, the CLI or MCP.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.