Messy documents in. Knowledge bundles out.
Ingests PDFs, Markdown, Office files, Notion exports and wiki dumps, and emits OKF v0.2 bundles your agents can verify.
pip install okfsmith
Offline-first ingest. No API key required. Python 3.10 or newer.
--- type: Course title: "CS 101: Introduction to Programming" sources: - id: python-tutorial resource: https://docs.python.org/3/tutorial/ generated: by: okfsmith/manual verified: - by: human:bilal status: stable ---
The ore: PDFs, Markdown, DOCX, PPTX, XLSX, Notion exports, wiki dumps, plain text. If it holds knowledge, the forge takes it in.
From raw ore to a finished bundle, in seven heats.
Clean markdown already has good tooling. The messy middle is where knowledge actually lives: 200-page PDFs with broken reading order, sprawling Notion exports, wiki dumps. That is what okfsmith ingests first.
- 1Parselocal, keyless parsers
- 2Sectionsplit into concepts
- 3Extractdraft and critic, cited
- 4Linkbuild the graph
- 5EmitOKF v0.2 markdown
- 6Validatesection 11 conformance
- 7ServeMCP, chat, dashboard
A forge for knowledge, not a black box.
Every concept okfsmith emits carries its sources, a trust tier, and lifecycle metadata, and every bundle passes the built-in validator. Here is what ships today.
FOR YOUR AGENTS
- One-command MCP server
okfsmith mcpserves any bundle over stdio, SSE, or streamable HTTP, withindex,search,get, andneighborstools, plus traverse and diff.- Grounded chat
okfsmith chatis a REPL over your bundle that answers with concept citations. No relevant concepts, no invented answer. It shows you what it found instead.- Web dashboard
okfsmith dashboardopens a local, token-secured UI: drag-and-drop ingest with live progress, an interactive knowledge graph, grounded chat, validation, and eval.
TRUST, CHECKED IN
- Provenance and trust tiers
- Every concept carries
sources[]citations and a generated or verified tier. Answers trace back to the exact document they came from. - Section 11 validator
- The spec's hard conformance rules, E001 to E004, run on every bundle, with advisory lints for dead links, orphans, and stubs. Broken links are warnings, never errors.
- Temporal model
- Validity and supersession are first-class: concepts expire and get replaced, and
--as-oflets you query the bundle as it looked on any date.
KEPT CURRENT
- Incremental sync
okfsmith syncprocesses only new, changed, renamed, or deleted sources, with--watch,--dry-run, and text or JSON output. Re-ingest without the wait.- Similarity deduplication
- The extraction pipeline merges near-duplicate entities with stemmed-token Jaccard similarity. Dependency-free, offline, and deterministic.
- Eval and CI gating
okfsmith evalruns golden-set question answering with RAG Triad scores and a retrieval-versus-generation diagnosis, and a--fail-undergate for CI pipelines.- Governed write-back
- MCP write tools are trust-tier gated: agents can update the bundle through preview, write, and audit flows that respect the same tiers reading does.
Sixty seconds to a bundle.
Install, scaffold a bundle, ingest offline, validate, and draw the graph. Then point any MCP-capable agent at it.
$ pip install okfsmith $ okfsmith init ./kb $ okfsmith ingest ./kb notes/ report.pdf --no-llm # offline first pass $ okfsmith validate ./kb $ okfsmith graph ./kb --format html # writes ./kb/viz.html, open it in a browser
-
Init
Scaffold a bundle with
index.mdandlog.md. One command, no config files. -
Ingest
Parse PDFs, Markdown, Office docs, or whole folders.
--no-llmgives a fast, offline, deterministic first pass. -
Validate
Check section 11 conformance: hard rules E001 to E004 plus advisory lints for dead links, orphans, and stubs.
-
Serve
One MCP command exposes the bundle to any capable agent, every answer traced to
sources[].
Not just markdown. Markdown with a memory.
A folder of markdown cannot tell you where a claim came from, whether a human checked it, or when it expires. An OKF bundle can, in plain YAML that any tool can read. Only type is required by the OKF spec. okfsmith adds the metadata that makes a bundle safe to act on:
Ask it in the terminal. Or open the dashboard.
The same bundle, the same CLI underneath. okfsmith chat for a grounded REPL, okfsmith dashboard for the full product in your browser.
Use a Bearer token in the Authorization header [api/auth].
Sources: [api/auth]
-
Citations on every answer
Each reply names its concept and lists its sources.
-
Honest by construction
No relevant concepts, no invented answer. In extractive mode it shows the keyword-matched concepts themselves.
-
Full slash-command set
/ingest,/search,/validate,/graph,/doctorand more, without leaving the REPL.
One command. Any MCP-capable agent.
The bundle is the product; the MCP server is how agents read it. Every answer traces back to sources[] in the bundle.
-
Read freely. Write carefully.
Point Claude, Codex, or any MCP client at a bundle and it can search, read, and walk the concept graph. When agents write back, the same trust tiers that govern reading govern writing.
-
Five core tools
index,list,search,get,neighbors, plus graph traverse and bundle diff. -
Governed write-back
Preview, write, and audit flows, gated by trust tier.
-
Skill pack included
skills/okfsmith-build/SKILL.mdteaches agents the init, ingest, validate, serve loop.
$ pip install "okfsmith[mcp]"
$ okfsmith mcp ./kb
# transports: stdio, SSE, streamable HTTP
# tools: index, list, search, get,
# neighbors, traverse, diff
Bring your own model, or none
--no-llm ingests fully offline, no key, no network. Add a model only for richer extraction: Ollama locally, or one key for any hosted provider. Keys are never logged, never shown, never written to disk.
openrouter, anthropic, openai, gemini, groq, mistral, deepseek, together, fireworks, deepinfra, anyscale, perplexity, xai, agentrouter, lmstudio, ollama, plus any OpenAI-compatible endpoint via --api-base.
Install it your way.
The base install is offline-first. Extras add Office parsing, the MCP server, or OCR, only if you want them.
$ pip install "okfsmith[office]" # DOCX, PPTX, XLSX
$ pip install "okfsmith[mcp]" # MCP server
$ pip install "okfsmith[ocr]" # Docling OCR sidecar
$ pipx install "okfsmith[office,mcp]"
$ okfsmith doctor # verify your setup
Latest release v0.37.1, on PyPI. Python 3.10 or newer, Apache-2.0.
Questions, answered straight.
The Open Knowledge Format (v0.2), Google's spec for portable knowledge bundles: markdown files with YAML frontmatter plus reserved index.md and log.md files. Canonical reference: GoogleCloudPlatform/open-knowledge-format on GitHub.
It enforces the OKF section 11 conformance rules (validate), tracks provenance and trust tiers, dedups sources by SHA-256, links concepts into a graph, and serves the bundle to agents over MCP, while keeping everything as plain markdown you can read without the tool.
No. --no-llm ingests fully offline. An LLM (Ollama or an OpenAI-compatible API) gives richer extraction; it never changes the bundle format.
Not by okfsmith itself. Parsing, validation, and the graph viewer are offline. Only LLM extraction contacts a model endpoint, and Ollama keeps that on your machine too.
3.10 and newer.
Apache-2.0.
Yes, it is markdown and YAML. index.md lists the concepts; each concept is one file. Any markdown reader works.
okfsmith builds a curated, validated, provenance-tracked bundle, not an embedding index. The two complement each other; the MCP search tool does full-text search over the finished bundle.
Your docs are already knowledge. Forge them.
One install. One command per stage. A bundle your agents can check, cite, and trust.