"Every AI demo works perfectly... right until someone asks, 'Where did you get that fact?'"
Every week, a new language model appears. More parameters. Longer context windows. Higher benchmark scores. The race is impressive.
But after months of building applications on top of LLMs, we kept running into the same question. Not "Can the model answer this?", but "Can we trust the answer tomorrow?"
That question changes everything. Hallucinations are only one symptom. The real problems look like this: sources disappear, facts contradict each other, knowledge silently changes over time, two agents modify the same graph, nobody knows which version introduced the mistake. Those aren't language problems. They're infrastructure problems.
Twenty years ago, Git solved this for source code. We think AI needs something similar for knowledge. That's why we built Canonical Knowledge Structure (CKS).
Two weeks ago, it was mostly a structural validator. Today, it's become something much bigger — a verifiable knowledge laboratory.
CKS, Two Weeks Later
24 tools. 650+ tests. Offline semantic search. Version history.
Sandboxed experiments. Contradiction detection. Async runtime.
Telemetry. Security hardening. Zero API keys.
Not because we wanted a bigger feature list. Because every one of these solved a real problem we hit while building AI systems. Let's look at a few of them.
Experiment #1 — Can an LLM Search by Meaning Instead of Keywords?
Most semantic search systems start with an API key. We wanted something different. So we integrated FastEmbed — a lightweight ONNX runtime that downloads a ~90MB sentence-transformers model once and runs forever, offline. No API key. No cloud. No rate limits.
To see whether it actually understood meaning, we created a tiny graph with three objects: apple, banana, and car. Then we searched for fruit. The ranking was:
apple 0.705
banana 0.671
car 0.214
Exactly what you'd hope to see. The interesting part isn't that semantic search works — it's that it now works entirely on your machine. No OpenAI embeddings, no Hugging Face token, no remote inference. Meaning became local.
We wrote up the full experiment, with code and scores, in our local embeddings case study.
Experiment #2 — Can We Catch Contradictions Before Humans Do?
LLMs rarely produce obviously wrong knowledge. They produce almost correct knowledge, and that's harder to spot. Consider a graph where "Earth supports Theory X" and "Earth refutes Theory X" both appear. Each statement is structurally valid. Together they're nonsense.
So we introduced structural constraints: MutualExclusionRule and FunctionalRelationRule. They don't evaluate language — they evaluate consistency. Because inconsistent knowledge is still incorrect knowledge. The system flagged the contradiction immediately. We ran the full experiment with conflict detection and sandbox resolution, and documented it here.
Experiment #3 — Can We Rewrite History Safely?
Imagine an agent proposes "remove this relation." Should it? Maybe. Maybe not. Most systems force you to decide immediately. CKS doesn't. Instead it creates a sandbox — try the change, inspect the graph, compare versions, discard it or merge it. Nothing touches production until you decide.
It feels surprisingly similar to opening a Git branch, except the repository is knowledge itself. We tested this by forking a session, applying a destructive edit in the sandbox, and confirming the parent session remained untouched. Then we merged the fix back. The whole flow took three tool calls.
Experiment #4 — Can We Break It?
This became our favourite experiment. Instead of adding features, we spent days trying to destroy the system. Could forged provenance records sneak in? Not anymore. Could RDF/XML trigger Billion Laughs attacks? Blocked. Could document ingestion bypass SSRF protection? No. Could middleware leak stack traces? Also fixed.
Most release posts celebrate features. We're equally proud of the bugs users will never see. We ran a full security audit, patched every hole we found, and wrote regression tests so they stay fixed. The full changelog is on GitHub.
Making Infrastructure Invisible
As the project grew, something unexpected happened. The hardest problems were no longer algorithms — they were operations. How do background workers coexist with semantic search? How do multiple sessions evolve simultaneously? How do you know which tool suddenly became slow?
So CKS became fully asynchronous. The JSON-RPC server no longer blocks on I/O. Embedding generation runs in background tasks. PostgreSQL workers coordinate through atomic SKIP LOCKED claims. Telemetry tracks every tool invocation — latency, success rate, error distribution — because infrastructure should explain itself, not require guesswork.
Bigger Than a Validator
CKS started as a way to stop fake citations. It became something else. Today it can search knowledge by meaning, detect contradictions, validate provenance, evolve graphs safely, compare versions, branch experiments, monitor itself, and run completely offline. We didn't plan for that — it happened naturally. Every missing capability became another layer in what we now think of as a knowledge operating system for LLMs.
Why This Matters
The AI industry is obsessed with making models smarter. We think the next leap forward may come from making them more trustworthy — not through larger parameter counts, but through better infrastructure.
The future probably isn't bigger prompts or bigger context windows. It's software that can answer questions like: where did this fact come from? When did it change? What contradicts it? Can I reproduce this result? Can I verify it? Language models generate knowledge. But trust has to be engineered.
Getting Started
pip install cks-mcp
Find the absolute path to the executable:
which cks-mcp
Then add this to your claude_desktop_config.json (replace /absolute/path/to/cks-mcp with the output of which):
{
"mcpServers": {
"cks-mcp": {
"command": "/absolute/path/to/cks-mcp"
}
}
}
Restart Claude Desktop (Cmd+Q, then reopen). Done. No API keys, no cloud setup, no extra services. Just ask "Use cks-mcp to..." and start building knowledge you can actually verify.
GitHub · Documentation · PyPI
Git changed how we trusted source code. We think AI now needs the same thing for knowledge.
Top comments (0)