Skip to main content

OKF-Native Knowledge Bundles

Synth is OKF-native for project knowledge. Existing v0.1 Projects remain supported and exportable, while new Projects use the current Open Knowledge Format v0.2 specification. Synth can download a validated OKF ZIP or import one through Ingest without changing how users work day to day.

OKF import is a deterministic merge, not model-assisted ingestion. Synth validates and preserves the authored bundle, calculates changes from paths and bytes, and makes the merged result searchable in the existing Project. It does not call an LLM, consume model tokens, or create a separate knowledge base.

How it happens: when Synth writes or ingests a page, it writes OKF frontmatter such as type and title, preserves unknown OKF keys, maintains knowledge/index.md as the OKF root marker, and keeps knowledge/log.md in OKF date-heading form. Export validates and packages the existing public knowledge files. Native v0.1 Projects remain usable and exportable without an automatic rewrite. Operators who want the current format explicitly preview and apply synth okf-migrate --target-version 0.2.

What You Can Do​

  • Validate v0.1, v0.2, undeclared, and future best-effort directories and ZIPs.
  • Download a Synth project as a validated OKF ZIP.
  • Import a validated OKF ZIP into an existing Synth project.
  • Preview imports before Synth writes files.
  • Explicitly migrate a legacy or v0.1 Project to v0.2 after preview.
  • Preserve unknown OKF frontmatter keys and safe supporting assets during import, migration, and export.
  • Resolve safe OKF absolute links such as /tables/customers.md, /index.md, and /log.md as bundle-relative knowledge links.

What Is Out Of Scope​

  • Remote OKF publishing.
  • OKF-specific MCP tools.

For continuous updates from an existing Git-backed wiki, use Sync an Existing OKF Wiki from Git. It is a deterministic, no-LLM watcher mode that merges exact authored pages into the same existing Project snapshot and retrieval index. The easiest setup is to paste the browser URL of the wiki's index.md; the ZIP workflow below is the one-time import option.

Download From The Web UI​

  1. Open Projects.
  2. Choose the project.
  3. Open the OKF drawer.
  4. Select Download OKF ZIP.

Pre-OKF Projects must be normalized before download. A native v0.1 Project can still download a v0.1 bundle; upgrading it to v0.2 is optional and explicit.

Import From The Web UI​

  1. Open Ingest.
  2. Choose OKF Bundle.
  3. Upload an OKF ZIP.
  4. Select Validate and review the preview.
  5. Select Apply Import only after the preview looks right.
  6. Select Search in Explore; the matching sealed snapshot is active before Synth reports success. KB and Graph remain available as secondary checks.

The import flow validates before mutation. Existing files are not overwritten unless you explicitly choose overwrite. Unrelated Project pages stay unchanged, byte-identical pages are reused, and new bundle pages are merged into the same sealed Project snapshot and index as existing knowledge.

No extraction, summarization, page generation, linking agent, or LLM runs during OKF import. After success, Explore, MCP, REST, the CLI, and the SDKs retrieve the imported pages together with the Project's existing knowledge.

CLI​

synth okf-validate ./docs-project/knowledge
synth okf-validate ./docs-project/knowledge --profile synth-native
synth okf-migrate --project docs --target-version 0.2 --dry-run
synth okf-migrate --project docs --target-version 0.2 --apply
synth okf-export --project docs --output ./exports
synth okf-import ./bundle.zip --project docs
synth okf-import ./bundle.zip --project docs --apply

Use okf-import without --apply first to preview the import plan. Use --overwrite only when replacing existing knowledge files is intentional. Import does not change the target Project's declared version. Omitting --target-version from okf-migrate preserves a v0.1 Project for backward compatibility, so always pass --target-version 0.2 when the intent is an upgrade.

These commands belong to the full Synth server distribution. They are not commands of the standalone synthkb-cli remote client.

REST API​

Project-scoped OKF routes live under /api/projects/okf:

  • GET /status
  • GET /status?validate=true
  • POST /validate
  • POST /export
  • GET /export/{job_id}/status
  • GET /export/{job_id}/download
  • POST /import/validate
  • POST /import/apply

Export and validation require project viewer access with read scope. Import requires project editor access with full_access, ingest:write, or knowledge:write.

Performance​

Synth does not run full-project OKF validation on normal Explore, search, graph, page reads, project navigation, or default project status. Normal writes normalize only the file being written. Full validation is explicit through validation, migration, export, or the OKF drawer's status check.

Safety​

OKF export excludes .synth, graph databases, search indexes, raw uploads, credentials, API keys, watcher state, local config, hidden paths, and runtime files.

OKF import rejects traversal, absolute ZIP members, hidden or system paths, symlinks, duplicate normalized ZIP paths, and oversized/file-heavy bundles. Supporting assets are content-addressed, non-executable, and excluded from Project pages, search, graph, and exact reads. Imported computation is never run. Uploads are capped while streaming to temporary storage.