Skip to main content

KLM — Knowledge Layers Model

PyPI License

An open reference standard for attestable knowledge in language-model systems.

A language model answers, and you believe it or you don't. KLM exists to make a third option possible: read the answer back — where its knowledge entered, what it did, how it was judged — with every signal carrying an honest epistemic status. The deliverable is no longer the text; it is the text and its attestation.

Show me where this came from. Everything else follows from taking that question seriously.

The documents

Document Role
KLM-Manifesto.md The thesis, in nine commitments
KLM-White-Paper.md The argument, the layer model, a worked example (v0.3)
KLM-Specification.md Normative conformance detail, RFC-2119 (v0.3)
docs/KLM-Amendments-v0.3.md The v0.3 amendment set: what changed, why, and on what evidence
docs/KLM-Gamma-Unification.md Normative γ decisions: klm-gamma/1.0–1.1, label projections klm-label/1.0 (frozen) and 2.0
docs/KLM-Amendment-Attested-Parametric.md Accepted amendment (v0.2): mechanical parametric attribution
docs/KLM-Amendment-Honest-Null-Boundaries.md Accepted amendment (v0.2): honest nulls across serialization boundaries
docs/EVIDENCE-PACK.md What the standard caught in its author's own stack — and what it did not
docs/QUICKSTART.md Five minutes: validate, try to cheat, sign, chain, disclose
docs/FAQ.md What KLM is and deliberately is not
CONTRIBUTING.md Amendment process + implementation reports (the gap we most want filled)

The toolchain (schema/)

Deliberately stdlib-only Python — any third party verifies with nothing but a Python interpreter. No dependencies, no accounts, no trust in the emitter.

Tool What it does
klm-gamma.schema.json + validate_gamma.py The γ (epistemic vector) contract + validator
klm-attestation.schema.json + validate_attestation.py The attestation record + the KLM-0…5 conformance ladder
sign_attestation.py (+ ed25519_ref.py) Ed25519-signed envelopes; RFC 8032 fallback so verification needs zero deps
attestation_log.py Hash-chained append-only record log (tamper breaks the chain)
disclosure.py Selective disclosure views: user / auditor / operator (§12.1)
schema/examples/ Golden records — including adversarial ones that MUST fail

Quick start:

python3 schema/validate_attestation.py --level 3 schema/examples/attestation-worked-example.json
python3 schema/validate_attestation.py schema/examples/invalid/attestation-violations.json  # must FAIL

Conformance levels

KLM-0 Declared → KLM-1 Traceable → KLM-2 Grounded → KLM-3 Reflective → KLM-4 Attributable → KLM-5 Verifiable. Progress is not a feeling; it is passing the next level's test. See the Specification §8.

Status & invitation

KLM is a candidate standard: implemented end-to-end by a reference stack (SEDIM / Nage), with a cross-language second emitter passing the same validator — but its real test is a conforming implementation built on entirely different mechanisms, by someone else. Competing implementations, challenges to the conformance suite, and layers we got wrong are the point, not a threat.

License

Apache-2.0. Stewardship: Nage AI.

Metadata

Release files for klm-conformance 0.3.0

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

Source distribution (sdist)

Source distribution for klm-conformance 0.3.0
File Size Uploaded
klm_conformance-0.3.0.tar.gz 145.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for klm-conformance 0.3.0
File Interpreter ABI Platform
klm_conformance-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 296.0 kB

Release files / klm_conformance-0.3.0.tar.gz

Download URL klm_conformance-0.3.0.tar.gz
Size 145.3 kB
Tags Source
SHA-256 checksum
How to use checksums
64688890e91afd6e1f4a7e23919f68a99b0d7d39643c2f2c9bf1c7b93f0257d0
BLAKE2b-256 checksum
How to use checksums
336a6b7f8b3c5abbf1cefc766d15dd0d0e9cd614fe692438406ca3682c14bb19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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 / klm_conformance-0.3.0-py3-none-any.whl

Download URL klm_conformance-0.3.0-py3-none-any.whl
Size 150.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c061c2e7631386c11eda388c507607a49210412f95b056dabdff66c21438dea8
BLAKE2b-256 checksum
How to use checksums
040cf50146e58dd384f347ba4ee9c1b7aaef4fea7e3ab92a586b619faed02cff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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

This release

0.3.0 This release

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