Back to Essays

Launching KL4A: From Raw SOPs to Verifiable Agent Action

Enterprises run on Standard Operating Procedures. They govern operations, compliance, and safety across most modern organizations. As companies race to deploy AI agents, they run into the same bottleneck every time: the procedures those agents need to follow remain buried in Word files, PDFs, and wikis, written for people to read, not machines.

Traditional retrieval-augmented generation can find a relevant document. It cannot show which specific instruction an agent received, where that instruction came from, or whether a domain expert actually verified it. Paste raw prose into an LLM prompt and you're trusting a wall of text with no accountability behind it. If the agent misreads a clause, there's no way to trace which sentence it misread, or who signed off on the version it was reading from.

Today we're launching KL4A, Knowledge Layer for Agents: a local-first, open-source pipeline and toolset built to close that gap. KL4A extracts obligation-shaped claims from source documents, grounds each one in the original text it came from, runs them through human review, and exposes the result through a Knowledge Access Layer that agents and applications can query directly.

The premise is simple: review the knowledge once, so you don't have to review every agent's answer forever.

The KL4A trust loop

KL4A manages the full lifecycle of a policy, from unstructured text to something an agent can act on and you can audit.

The pipeline runs five stages:

  1. Ingest normalizes raw document prose, whether it arrives as PDF, DOCX, or plain text.
  2. Extract mines obligation-shaped claims, the sentences using language like "must," "shall," or "should."
  3. Ground anchors every extracted claim back to the exact byte range of the source sentence it came from, so nothing gets attributed to text that isn't there.
  4. Review puts claims in front of a domain expert through a browser or native interface, who can approve, reject, defer, edit, or comment on each one.
  5. Connect exposes the approved bundle, structured on the Open Knowledge Format (OKF v0.2), to people and agents.

The pipeline ingests raw SOPs, extracts structured rules, grounds them with exact text-span evidence, routes them through expert review, and exposes the validated bundle downstream.

Standardizing on the Open Knowledge Format

KL4A's output is a static, local SOP Knowledge Bundle built on Google's Open Knowledge Format (OKF v0.2), not a proprietary schema. That gets you what a closed format can't:

Human-readable. The bundle is a folder of flat Markdown files and YAML frontmatter. No SQL database and no proprietary binary format. Anyone can open it in a text editor.

Git-diffable. Because the bundle is flat text, every edit, update, or review decision is trackable with standard Git. When a policy changes, git diff shows you exactly what changed.

No vendor lock-in. The bundle is self-contained. There's no hosted database or API service to keep running. It's a static, local artifact that sits alongside your code and travels with your application.

KL4A also takes OKF's v0.2 trust-signal fields and populates them with real data instead of placeholders. provenance tracks the source document and character span a claim was extracted from. verified records who reviewed the claim and when they approved it. lifecycle_status tracks whether a claim is active, superseded, retired, or in conflict, so an agent never executes a stale guideline without knowing it's stale.

KL4A implements the Open Knowledge Format for compatibility and structural transparency. The project is independent and not affiliated with or endorsed by the OKF project.

One bundle, multiple channels

Once a human approves a claim, it becomes usable knowledge, and that's where the Knowledge Access Layer matters. Instead of one integration path, KL4A gives agents and applications several ways to consume the same verified bundle:

The desktop app. Built on Tauri for Windows, macOS, and Linux, it's a local, code-free workbench. Policy owners and compliance officers can ingest documents, review claims next to their source text, and test the bundle against an embedded agent, without running a server or writing a line of code.

The Rust CLI (sopkb-cli). For developers and scripts. It initializes bundles, normalizes sources, runs local semantic search, and pulls structured, task-scoped context for an agent:

# Retrieve a task-scoped context block including rules, evidence, and conflict reports
$ sopkb-cli agent context demo-bundle --task eligibility-check

The MCP server (sopkb-mcp). For agents that speak the Model Context Protocol, sopkb-mcp exposes read-only tools like knowledge.search, evidence.get, and agent.context over JSON-RPC via stdio, no network port required. It tells the connecting agent how to ground its answers before the agent asks its first question.

Direct flat-file reads. Since the bundle is just Markdown and YAML, a lightweight local agent can read the files straight off disk. Zero dependencies, and it runs air-gapped on an edge device.

Semantic exports. For teams with an existing knowledge graph, KL4A compiles the bundle's claims and relations into Graph JSON or RDF/Turtle, so it feeds directly into a triplestore or semantic web stack.

Who this brings together

Shifting verification to authoring time, rather than leaving it to runtime, puts different roles around the same source of truth:

  • Knowledge engineers ingest a messy document directory, run the extraction pipeline, inspect what got proposed, and hand off a clean draft bundle.
  • Domain experts, compliance officers, legal counsel, clinicians, policy managers, audit the extracted rules in a browser or desktop UI, next to the original text, without writing code or learning to prompt a model.
  • Agent developers expose the validated bundle to their agent codebases through the CLI, flat files, or MCP, and get guidelines back with exact citations, not paraphrases.

Build with us

KL4A is in its v0.0.1-alpha experimental phase. The core pipeline, desktop app, and CLI are open-source under Apache-2.0.

The fastest way in is the desktop app, which ships as an installer for Windows, macOS, and Linux and needs no command line at all. If you would rather drive the pipeline yourself, sopkb-cli runs the same stages:

# Initialize a new bundle and scan your raw sources
sopkb-cli init demo-bundle
sopkb-cli scan sources --bundle demo-bundle

# Normalize document prose and mine claims using deterministic pattern matching
sopkb-cli normalize demo-bundle
sopkb-cli mine demo-bundle --provider fixture

# Approve a claim, validate the bundle, export for a knowledge graph
sopkb-cli review approve demo-bundle <claim-id> --rationale "checked against source"
sopkb-cli validate demo-bundle
sopkb-cli export demo-bundle --format graph-json

Start with one SOP. Ingest it, mine its claims, look at the resulting OKF files, and tell us where the format or the workflow falls short.

Run the quickstart guide, browse the GitHub source, or subscribe for fortnightly build notes.

About the Author
Dilip Ittyera

Dilip Ittyera

CEO and Founder, CogniSwitch·M.Sc. Mathematics

Dilip Ittyera is the Founder and CEO of CogniSwitch, where he leads the company's technical vision and product strategy. He founded CogniSwitch on a conviction that has been building for four decades: as organizations go hybrid — bringing AI agents into their workplaces alongside human workers — they need a digital twin of their enterprise knowledge to successfully onboard and activate those agents. Without it, AI beings cannot be given first-class treatment.