Breaks the document into chunks and ranks them by similarity to the query. The chunk that comes back might be from the right section, or from a similar-sounding exception three pages away. Either way, the model gets text, not the rule the text belongs to.
Open Source · Local First · v0.0.1-alpha
What does your SOP actually say, and where did that come from?
Knowledge Layer for Agents is a local, open-source workbench for knowledge engineers turning SOPs, policies, and procedures into open, source-traced knowledge bundles, reviewable by domain experts, readable directly by agents. It installs as a desktop app for Windows, macOS, and Linux, with a Rust CLI alongside it for scripted runs.
Apache-2.0 · No database · No API key required to try it
sopkb-cli init demo-bundle
sopkb-cli scan sources \
--bundle demo-bundle
sopkb-cli normalize demo-bundle
sopkb-cli mine demo-bundle \
--provider fixture
sopkb-cli validate demo-bundleWhy This Exists
Enterprises run on SOPs. Agents still have to interpret them.
Procedures written for people remain buried in Word files, PDFs, and wikis. Retrieval can find a relevant document, but it does not by itself show which instruction the agent received, where it came from, or whether a domain expert agreed with it.
Knowledge Layer for Agents makes that knowledge explicit: extracted claims, retained source evidence, recorded review decisions, and agent-readable output in one portable bundle.
Retrieval finds a paragraph. It can't show you the rule.
Vector RAG chunks a document, turns the chunks into embeddings, and pulls back whatever text is closest to the query. That's enough to find a relevant paragraph. It won't tell you which rule the agent used to answer, or whether that was the right rule to apply.
Keeps the source material organized the way it was written: concepts linked to the indexes and rules that govern them. An agent walks that structure to find the rule that actually applies, and can point back to it afterward.
When something goes wrong, the access layer can name which rules the agent considered and which one it applied. A similarity score can't do that.
How It Works
- 01
Ingest
SOPs and policies
- 02
Extract
Claims, rules, concepts
- 03
Ground
Retained source evidence
- 04
Review
Domain-expert decisions
- 05
Connect
Desktop app for people. MCP for agents.
Everything reads from the same files on disk.
The desktop app writes into the bundle directory, and every other way in reads from that same directory. There is no separate hosted knowledge service to keep synchronized, and no opaque copy of the SOP hidden behind an API.
Install it and work without code
Windows · macOS · LinuxKL4A Workbench is a Tauri app you download and open. Ingest documents, read each proposed claim beside the source text it came from, and put the finished bundle in front of an embedded agent before anything downstream depends on it.
Script the same pipeline
sopkb-cli mine <bundle_dir> --provider fixturesopkb-cli ships alongside the app and covers the whole run: init, scan, normalize, mine, review, validate, and export. agent context returns task-scoped knowledge, decision rules, and evidence as JSON for whatever calls it.
Point an agent at the bundle
sopkb-mcp <bundle_dir>A standalone server that speaks JSON-RPC over stdio, so an MCP-capable client spawns it as a subprocess. Its tools are read-only by default: knowledge.search, knowledge.get, evidence.get, agent.context. Ask it why it returned an answer and it can point to the rule.
Read it with anything that reads a file
sopkb-cli export <bundle_dir> --format graph-json,rdfThe bundle is Markdown with YAML frontmatter on disk, so a text editor, a grep, or a git diff all work on it directly. For graph tooling, export writes Graph JSON and RDF/Turtle next to the canonical bundle.
Local by default: the MCP server uses JSON-RPC over stdio, exposes read-only tools unless it is started with --enable-review-notes, and reads the bundle from your filesystem. Your MCP client and model configuration determine where retrieved excerpts are sent. Read the MCP server documentation →
Human Review
Review the knowledge itself, not only the agent's answer.
The knowledge module itself is reviewable. A domain expert can inspect each proposed claim beside its source evidence, then approve, reject, defer, edit, or comment on it. This is knowledge review, not an audit of agent behavior.
You review the knowledge once, so you don't have to review every answer forever.
- For knowledge engineers
- Ingest a document set, inspect what got extracted and why, and hand off a clean bundle.
- For domain experts
- Review what was extracted without reading application code.
- For agent developers
- Expose the same inspectable artifact through the local MCP server.

The Output
A static SOP Knowledge Bundle.
The output is a static collection of plain Markdown and YAML based on the Open Knowledge Format. People can open it with a text editor and diff it with Git. The desktop app provides the review interface, and the local MCP server lets agents retrieve from the bundle. Graph JSON and RDF/Turtle exports are also available.
Approved claims carry the OKF v0.2 trust fields with real values rather than placeholders: provenance down to the source span it came from, verified naming the person who approved it and when, and lifecycle_status marking whether a claim is still current, superseded, retired, or in conflict.
sop-knowledge-bundle/
├── sources/ # document context
├── knowledge/ # structured claims
├── evidence/ # supporting spans
├── rules/ # decision logic
└── log.md # review historyThe Release Premise
A simple change can make the agent work better.Give the same agent reviewed, structured SOP knowledge instead of asking it to interpret documents at runtime, then measure the difference. This is the release hypothesis, not a blanket performance claim.
Build With Us
Start with one SOP.
Version 0.0.1-alpha is experimental. Try one procedure, inspect the resulting bundle, and tell us where the format or workflow falls short.
This project owns creating and exporting knowledge bundles. It does not own operationalizing them at enterprise scale. Runtime enforcement, auditing agent behavior, governed multi-tenant operation, and production monitoring are separate concerns. Read the open-core boundary →
Knowledge Layer for Agents · Fortnightly
Follow what we learn.
Build notes, worked SOP examples, releases, and lessons from practitioner testing.
Knowledge Layer for Agents implements the Open Knowledge Format. It is not affiliated with or endorsed by the OKF project.