Skip to main content

OpenKOS

PyPI Python CI License

Open Knowledge Orchestration System — a local-first engine for the Open Knowledge Format.

OpenKOS turns your scattered text into a living, portable knowledge base your AI agents can actually use — compiled once, kept current, and stored as plain Open Knowledge Format files so it is never locked to any app, model, or vendor.

Project status: alpha. The Compiler and the Graph-and-Memory arcs (MVP 1 and MVP 2) are complete and shipped. The API may still change between releases, but OpenKOS is published and installable now. Early contributors and feedback are welcome — see Contributing.


Quickstart

Five steps from a fresh machine to your first cited answer. Everything runs on your computer: no accounts, no API keys, nothing leaves your machine.

1 · Install Ollama — the local AI runtime OpenKOS talks to. Download it, open it once, and it stays running in the background.

2 · Pull the two default models (one time, ~6 GB total):

ollama pull qwen3:8b   # chat model — extraction and answers (~5 GB)
ollama pull bge-m3     # embedding model — semantic search (~1.2 GB)

There is a third, optional model for naming relations during curation (ollama pull gemma2:27b, 15.6 GB). Skip it for now — if a command wants it, the error message tells you exactly what to pull.

3 · Install the engine (needs Python 3.12+ and git):

uv tool install openkos   # or: pipx install openkos — or: pip install openkos

To track the latest unreleased main instead: uv tool install git+https://github.com/jasonssdev/openkos.

4 · Check the setup before anything can fail:

openkos doctor

Every line should read [PASS] except Workspace initialized — you haven't created one yet. doctor is also the first thing to run whenever something misbehaves later.

5 · Create a knowledge base and run the loop:

mkdir ~/knowledge && cd ~/knowledge
openkos init                          # picks your models, scaffolds the workspace
openkos ingest ./meeting-notes.txt    # compile a source — a file, a folder, or a glob
openkos query "what did we decide?"   # an answer with citations, from your own knowledge

From here, openkos next always tells you the one thing worth doing, and openkos --help lists every command, grouped. The full reference is docs/cli.md; the end-to-end experience is docs/user-journey.md.

What init set up for you. raw/ holds your immutable sources; bundle/ is the pure-OKF knowledge base — plain markdown you can open in Obsidian, VS Code, or GitHub, and take anywhere; openkos.yaml is the engine config. The folder is also a git repository you never have to operate: every command commits its own changes, and git log / git diff / git revert are always there for inspection and undo.


The problem

Your AI assistant forgets everything between sessions, so you re-explain the same context every time and the insights you build together disappear into chat history. Meanwhile your notes pile up in folders nobody keeps current. Two powerful things — your knowledge and your models — sit side by side, disconnected.

Retrieval (RAG) doesn't fix this: it re-reads your raw documents on every question and rediscovers everything from scratch. Nothing accumulates. The cross-references are never drawn, the contradictions never reconciled.

The idea

Instead of retrieving from raw sources every time, an LLM can incrementally build and maintain a persistent, interlinked knowledge base that sits between you and your sources — Andrej Karpathy's LLM Wiki pattern. Knowledge is compiled once and then kept current. It compounds.

In June 2026 Google Cloud published a vendor-neutral specification for that pattern: the Open Knowledge Format (OKF) — a directory of markdown files with YAML frontmatter, portable across any tool. It is young (v0.1, still a draft) but open, minimal, and gaining adoption. Google's framing was: "What's missing is a format, not another service," and they invited the community to build producers and consumers.

OpenKOS is that producer and consumer, built for individuals and running entirely on your machine.

Before / after

Without OpenKOS With OpenKOS
Asking your AI about your own notes It re-reads raw files every time It answers from a compiled, cited knowledge base
New source Piles up unread Compiled into a Source plus typed knowledge objects, each linked to its source
Provenance "Where did this come from?" is a guess Every object links back to its immutable source
Facts that change Old claims quietly rot Freshness stamps keep the base honest over time
Portability Trapped in one app Plain OKF files — open in Obsidian, VS Code, GitHub, anything
Privacy Your knowledge leaves your machine Local-first, offline-capable, local models

Philosophy

  • Local-first and private by default. Runs on your machine, works offline, built for local models. The cloud is optional, never required.
  • Standard-aligned, not bespoke. We adopt OKF rather than invent a format, and adopt its definitions rather than restate them. An open, vendor-neutral specification is the most agnostic choice there is.
  • Living knowledge, honest over time. Sources are immutable; concept documents evolve as you learn; fast-changing facts carry freshness stamps so nothing silently becomes a lie.
  • The human curates; the engine maintains. You source, explore, and ask. OpenKOS does the bookkeeping — extraction, linking, freshness, indexing.
  • Reconstructible and explainable. Every index, embedding, and graph rebuilds from the canonical bundle plus sources. Answers always cite.

How OpenKOS relates to the ecosystem

We build on the shoulders of prior work rather than competing with it:

  • Karpathy's LLM Wiki — the seminal pattern. OpenKOS is a concrete engine that instantiates it.
  • Open Knowledge Format (Google Cloud) — the standard we store and exchange in. Google's reference stack targets enterprise cloud data (BigQuery); OpenKOS is its local-first, personal counterpart.
  • Obsidian-based tools (obsidian-mind, obsidian-second-brain) — excellent, but tied to Obsidian and packaged as prompt/skill conventions. OpenKOS is a standalone, app-agnostic engine whose output is portable OKF.

The wedge, in one line: the local-first, personal producer-consumer-runtime for OKF that nobody else has built.

Roadmap at a glance

OpenKOS ships in three MVP arcs, each usable on its own. Full detail in docs/roadmap.md.

  • MVP 1 — The Compiler. (Complete.) The Karpathy loop, locally, over text: ingest → OKF concepts with provenance → cited query → freshness lint. Useful in an afternoon.
  • MVP 2 — The Graph and Memory. (Complete.) Entity/relationship extraction and reversible merge, a typed knowledge graph (an OpenKOS layer over OKF's untyped links — other tools still read the bundle fine), hybrid retrieval (lexical and semantic, rank-fused), a fail-closed sensitivity filter (confidential concepts never leave the machine — held back from any backend that is not verifiably local), a guided curation loop, reference-aware forget plus an irreversible purge (right-to-be-forgotten), and answers that file back into the base (the two-output rule).
  • MVP 3 — The Runtime and Interoperability. An MCP server and APIs so agents use OpenKOS as durable memory; full OKF import/export with the wider ecosystem.

Beyond that: a desktop app, graph visualization, richer memory, and federation — explored only after the MVPs prove out with real users.

Documentation

Contributing

OpenKOS is early, which is the best time to shape it. The clearest entry points are the "community can contribute" notes under the current MVP in the roadmap. Please open an issue to discuss anything larger than a small change before sending a PR, so we can make sure it fits and can be merged.

See CONTRIBUTING.md for how to get involved and CODE_OF_CONDUCT.md for community standards. Maintainers: see MAINTAINERS.md for how contributions are reviewed and decided.

License

Apache License 2.0 — see LICENSE.

Release files for openkos 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openkos 0.2.4
File Size Uploaded
openkos-0.2.4.tar.gz 537.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openkos 0.2.4
File Interpreter ABI Platform
openkos-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / openkos-0.2.4.tar.gz

Download URL openkos-0.2.4.tar.gz
Size 537.4 kB
Tags Source
SHA-256 checksum
How to use checksums
789c10240ba14cb3e8a455c4baa429ad136f02982cd1dfbc47516bc52c16774d
BLAKE2b-256 checksum
How to use checksums
7def63e6ac5003e3831d70718df6602ba3a591fd28cd15e2baa397231c7c763d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / openkos-0.2.4-py3-none-any.whl

Download URL openkos-0.2.4-py3-none-any.whl
Size 581.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ab1c1f1cad398067381f6fb44153211585df281f3bcc73ff5204ec7e5b60884
BLAKE2b-256 checksum
How to use checksums
4a322e4f6d58bf32a981bffa2675df101c984910154900299a5c3f42cdf3bf1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page