ksor README

The project's README from github.com/panaversity/ksor. As one markdown file: README.md.

KSoR — open, vendor-neutral knowledge infrastructure for AI-native organizations

Watch the video: KSoR Introduction

KSoR

Open, vendor-neutral knowledge infrastructure for predictable enterprise and education agentic systems.

A company cannot expect predictable AI-agent behavior if its agents operate from scattered, conflicting, or outdated knowledge.

An education institution cannot deliver an organized AI-assisted course if its tutors, teaching assistants, and assessment agents operate from different curricula, sources, or rules.

You cannot build predictable AI systems on an undefined source of truth.

A Knowledge System of Record (KSoR) solves that problem by giving an organization one governed, authoritative knowledge record that humans and AI agents operate from.

For an enterprise, that record can contain approved:

For an education institution, it can contain approved:

The AI can still reason, explain, personalize, and adapt. What it should not have to invent is which institutional or academic knowledge is authoritative.

Enterprise agents need a KSoR so they operate from the same governed institutional truth.
Education agents need a KSoR so they teach from the same governed academic truth.

KSoR does not make a probabilistic language model deterministic. It makes the knowledge environment governed, bounded, traceable, and testable: which source is authoritative, which version is current, who approved it, who may see it, which knowledge may be retrieved, and when an agent must abstain instead of improvising.

The framework reduces to three commitments:

One authoritative record.
One governance boundary.
Many open projections.

And one operating principle:

Govern knowledge once. Project it many ways.

The result is not merely a documentation site, knowledge base, vector database, RAG system, or MCP wrapper.

KSoR is an open knowledge infrastructure framework that makes governed knowledge usable by people, AI agents, and other knowledge systems without giving any one vendor ownership of the record.

KSoR in eight concepts — title slide: One Book Everyone Must Follow

KSoR in eight concepts →
17 slides, one hospital, plain language, no code. One authoritative record, what belongs in it, provenance, the governance boundary, abstention, citation, how new knowledge gets approved, and the many open projections that read it — the deck to open when you are introducing KSoR to a team.


Start here

All you need is Node 24 or newer. Use whichever package manager you already have — npm, pnpm, or bun — and the project it creates will use that same manager everywhere:

npm

npx @panaversity/ksor@latest init my-knowledge-sor
cd my-knowledge-sor && npm install && npm run dev

pnpm

pnpm dlx @panaversity/ksor@latest init my-knowledge-sor
cd my-knowledge-sor && pnpm install && pnpm dev

bun

bunx @panaversity/ksor@latest init my-knowledge-sor
cd my-knowledge-sor && bun install && bun run dev

Open http://localhost:3000. The site is running, and it reloads as you edit the Markdown files in knowledge/. What you have is a complete, ordinary project — a working website, a CI workflow, and instructions for coding agents — and it is entirely yours: nothing is downloaded at build time, and nothing phones home. The five documents in it are KSoR's own starters, there to be deleted as your knowledge arrives.

Ask it to publish and you meet the point of all this:

$ pnpm exec ksor build
ksor build: 6 document(s), 5 admitted to a machine surface

Six documents, five admitted. The one you just wrote is a draft, so it reaches no surface an AI agent reads — not llms.txt, not the markdown twins, nothing — until a human approves it. Approve it and the count moves.

Hello world walks that end to end in about fifteen minutes, from an empty directory to your own coding agent answering from your own document and naming which document and which publication it came from. Every command and output in it was run and pasted as it appeared.

The five so far, in reading order — pick by what you want from it:

read this if
00 · Introduction you want to understand why this exists — no technical background needed
01 · Hello world you want to see it work in fifteen minutes — Part 1 needs only Node; Part 2 adds a free Postgres and a free embedding key
02 · Make it yours you finished hello world and want a record that is only yours — a file in, a person's knowledge in, the samples out
03 · Governance in practice you have a record of your own and want to govern it — a second audience, a review, an effective date, a takedown and the refusals that fire
04 · Serve it — with a floor you want the headline claim by hand — measure the line under which your record declines, then watch an agent be refused

Next, open the project in the coding agent you already use (Claude Code, Cursor, Copilot — any of them) and tell it what this knowledge base is for. That is how you work with KSoR day to day: you write plain Markdown, in whatever language you write in, and the agent handles the checks and structure around it. The project ships AGENTS.md with the working rules, and the agent will interview you to replace the placeholder in instance.md — the file that says what this knowledge base covers.

Later, when you want AI agents to query your knowledge directly, you add a Postgres database and an embedding API key, then run three commands: pnpm provision once, pnpm refresh to publish, and pnpm serve. The full path is in Serve to AI Agents below.

The rest of this page explains why KSoR is built this way. To go straight to the practical reference, jump to Requirements.


Why KSoR Exists

Organizations already understand the value of a System of Record.

An accounting system is authoritative for financial transactions. A CRM is authoritative for customer records. An HRIS is authoritative for employee records.

When a spreadsheet disagrees with the accounting ledger, the ledger wins.

These systems answer:

What is the authoritative operational state of the organization?

AI agents create a second requirement:

What is the authoritative knowledge the organization allows them to operate from?

That includes questions such as:

In education, the same authority problem appears in a different form:

Without a KSoR, this knowledge is commonly fragmented across documents, wikis, PDFs, slide decks, websites, instructor notes, repositories, prompts, RAG indexes, model context, and human memory.

A model can rank what looks relevant. It cannot reliably manufacture organizational or academic authority when the institution itself has not defined it.

The problem is not simply finding knowledge. The problem is establishing which knowledge wins.

KSoR exists to establish that authority and make it usable across human, AI, agent, and machine-facing surfaces.


Predictable AI Needs a Knowledge System of Record

The more autonomy an AI agent receives, the more important its knowledge boundary becomes.

KSoR separates two things that are often confused: model variability and knowledge authority. Models may vary in wording, reasoning paths, explanations, and personalization. The authoritative knowledge they are permitted to use should not vary arbitrarily.

KSoR makes that knowledge environment controlled and testable:

That distinction matters in both enterprises and education.

In an enterprise

Without a Knowledge System of Record, an agent may encounter several plausible sources:

                          AI Agent
                             │
        ┌────────────┬───────┼────────┬─────────────┐
        ▼            ▼       ▼        ▼             ▼
     old wiki     current   Slack    stale RAG   model memory
                  policy   message    chunks
        │            │       │        │             │
        └────────────┴───────┼────────┴─────────────┘
                             ▼
                  Which source should win?

The agent can rank relevance. It cannot manufacture organizational authority.

With a KSoR:

                    Governed KSoR
                         │
              authoritative knowledge
                         │
                 governance boundary
                         │
                         ▼
                      AI Agent
                         │
                         ▼
             predictable, bounded action

The agent may still reason probabilistically, but it reasons from a controlled institutional truth rather than choosing among conflicting versions of that truth.

A company cannot build predictable agentic operations on unpredictable knowledge.

In education

The same problem appears when AI agents become tutors, teaching assistants, assessment agents, or curriculum assistants.

Without an authoritative academic record, two students in the same course can be taught from different model memory, different web sources, different editions of course material, or outdated instructor notes. Personalization then becomes curricular inconsistency.

An education KSoR can govern the academic truth:

                       Education KSoR
                            │
          ┌─────────────────┼─────────────────┐
          ▼                 ▼                 ▼
      Curriculum         Pedagogy         Assessment
          │                 │                 │
          └─────────────────┼─────────────────┘
                            ▼
                    governed course record
                            │
              ┌─────────────┼─────────────┐
              ▼             ▼             ▼
           AI Tutor      Teacher AI    Assessment AI

The AI can still adapt:

But the KSoR can keep stable:

Personalization should vary the teaching path, not the authoritative curriculum.

An education institution cannot run an organized AI-assisted class if every tutor or teaching agent is free to choose a different source of truth.

So the same architectural principle applies in both settings:

Enterprise agents need a KSoR so they operate from the same governed institutional truth.
Education agents need a KSoR so they teach from the same governed academic truth.


The KSoR Framework: Nine Responsibilities

The product idea is simple:

The technical architecture implements that idea through an open, vendor-neutral knowledge infrastructure framework, built around three commitments:

One authoritative record.
One governance boundary.
Many open projections.

That model in one picture:

                      KSoR FRAMEWORK
      open, vendor-neutral knowledge infrastructure
                             │
                    AUTHORITATIVE CORE
                     Governed Markdown
                   (KSoR Profile of OKF)
                             │
                    GOVERNANCE BOUNDARY
                             │
      ┌──────────────┬───────┴───────┬──────────────┐
      │              │               │              │
      ▼              ▼               ▼              ▼
  Human site    AI discovery   Agent surface    Exchange
   Fumadocs       llms.txt          MCP       governed OKF
                                     │           bundles
                                     ▼
                              Retrieval layer
                            Postgres + pgvector

Identity (OAuth/OIDC) cuts across every surface. Publication integrity (SLSA/Sigstore) covers the published PACKAGE and not yet the record's own lock, and observability (OpenTelemetry) is bound and unbuilt — see below, where both are stated exactly.

The nine responsibilities

The framework separates nine responsibilities, so that no single product becomes the knowledge authority. Wherever an open format, convention, or protocol already owns a boundary, KSoR adopts it rather than competing with it:

Responsibility Open standard / reference binding What it means
Authoritative record Markdown in the KSoR Profile of OKF Markdown is the durable medium; the profile gives it open, portable structure
Retrieval Postgres + pgvector structured, lexical, and semantic search over the governed record
Human publication Fumadocs the reference human-readable site
AI discovery llms.txt tells AI systems what knowledge exists and where machine-readable pages are
Agent interaction MCP search, retrieval, citation, and abstention for agents
Knowledge exchange OKF the same native representation moves governed knowledge between systems
Identity OAuth / OIDC who is asking — KSoR governance then decides what they may see
Publication integrity SLSA / Sigstore (package only) proof of which source and build produced a published artifact
Observability OpenTelemetry (not yet emitted) what the infrastructure did, without becoming another knowledge store

One of the nine is a binding with nothing behind it yet, and one is half built — both say so here. ksor build writes build.lock.json but signs nothing — SLSA/Sigstore attestation of that lock is out of scope in specs/ksor/build/spec.md §6 and will land separately. No telemetry is emitted today either: there is no OpenTelemetry code in the tree, and the row above records which standard owns that boundary rather than a surface that runs. When it does land, one constraint is already decided by the row's own wording — without becoming another knowledge store. Default auto-instrumentation would break it immediately, because pg captures statement text and a trace backend is a different security boundary from the MCP response; for a non-public audience that is a governance bypass through the observability layer. What would survive careless instrumentation added later is an allowlist span processor — attributes not explicitly permitted are dropped, so traces would carry decisions and counts and never content.

The same architecture can be explained as a dependency stack. This is not a second list of responsibilities; it shows how the pieces relate, and why OKF sits under KSoR rather than beside it:

Markdown is the authoritative medium.
OKF makes that record open and portable.
KSoR governance makes it authoritative.
Postgres + pgvector make it retrievable.
Fumadocs serves humans.
llms.txt lets AI discover it.
MCP lets agents interact with it.
OAuth/OIDC establishes identity; KSoR governs access.
SLSA/Sigstore proves what package was published; the record's lock is next.
OpenTelemetry will tell us what happened.

Governance is deliberately not one of the nine. It is the boundary the nine are arranged around: no knowledge crosses a serving or publication boundary without first passing the applicable governance decision. For a static build that decision runs once per audience-specific build; for dynamic retrieval it runs per request; the policy is the same either way.

The governance boundary is what turns a set of useful technologies into a Knowledge System of Record. Without it, the components above would merely form another knowledge stack.

And the boundaries — not the products — are the standard. Postgres + pgvector and Fumadocs are reference implementation choices; a conformant alternative may replace them. What may not vary is the governance semantics: one policy, every surface.

The full specification — the profile, the conformance classes, the governance requirements — is the KSoR Standard Proposal (KSP-001), an open standard written so that anyone can implement a conformant KSoR. It defines five conformance classes — a corpus (A), a publisher (B), a retrieval layer (C), an agent surface (D), and exchange (E) — plus optional profiles for identity, publication integrity, and computation attestation. A complete KSoR im

ksor (panaversity/ksor)

Searching Database…

230 ·GitHub
这是什么?KSoR 是一个开源框架/SDK,用于构建单一的、受治理的权威知识记录,供人类和 AI 智能体共同读取,从而让智能体不再基于零散或冲突的信息即兴发挥。它同时面向企业(政策、流程)和教育机构(课程、评分规则)。
它与只是搭一个向量数据库或 RAG 流水线有什么不同?它不只是向量数据库或 RAG 封装。它把 Markdown 知识文件与治理层(版本、审批、受众、拒答规则)、Postgres 加 pgvector 检索、面向智能体的 MCP 服务器以及 Fumadocs 站点结合在一起,构建在开放标准之上,而不是绑定某个单一厂商的格式。
我怎么让项目跑起来?安装 Node 24+,用 npm、pnpm 或 bun 脚手架生成新项目,然后打开开发服务器——它会提供一个在你编辑 knowledge/ 目录中的 Markdown 文件时实时刷新的站点。“Hello world”指南会带你从空目录开始,在大约 15 分钟内实现智能体基于你自己的文档回答问题。
我需要 Postgres 和嵌入 API 密钥吗?只有当你想让 AI 智能体直接查询你的知识时才需要:你添加一个免费的 Postgres 数据库和一个免费的嵌入 API 密钥,然后运行“pnpm provision”、“pnpm refresh”和“pnpm serve”。如果只是编写和预览 Markdown,Node 是唯一要求。
框架还有哪些部分没有完成?在九项架构职责中,发布完整性(SLSA/Sigstore)目前只覆盖已发布的包,而不包括记录自身的 lock 文件;可观测性(OpenTelemetry)已作出规范但尚未真正输出。
它是给公司用的、学校用的,还是两者都适用?两者都适用。README 将 KSoR 定位为面向企业的基础设施(其智能体需要遵循相同的已批准政策),也面向教育机构(其辅导和评估智能体需要依据相同的课程和评分规则进行教学)。
我的知识数据会被发送到别处吗?不会——脚手架生成的项目是自包含的:构建时不下载任何东西,也不偷偷联网上报,你的 Markdown 知识留在你自己的基础设施上。
在 KSoR 中“拒答”(abstention)是什么意思?它是指当记录中没有任何受治理的来源支持某个问题时,智能体必须拒绝回答而不是猜测——这条规则由围绕权威记录的治理边界来强制执行。
我可以用任何编程智能体配合它吗?可以——项目附带一个包含工作规则的 AGENTS.md 文件,README 展示了它与 Claude Code、Cursor 和 Copilot 互换使用的情形。
为什么用 Markdown 而不是数据库作为源格式?Markdown 被视为权威记录的持久、可移植载体,通过“KSoR Profile of OKF”加以结构化,使同一套受治理的知识可以在不同系统之间迁移而不被厂商锁定。
Size
34.9 MB
Stars
230
Age
2mo
Commits · 90 Days