Deterministic Knowledge Engine Alpha
State the rule once. The engine keeps the conclusion true.
Attach DKE to your agent over MCP. It records what it learns, reads it back, reasons over it, and states the standing rules that keep its own conclusions current. The engine keeps all of it honest: every fact carries its source, every rule holds only while its premise does, and why returns the derivation behind any answer. You install it; your agent does the rest.
Your agent is stochastic. Nothing downstream of it is.
DKE is in alpha. The engine runs, the service is live, and you can build against it today. The published surface still moves between releases — nothing here is frozen yet. Beta is the next stage, and carries no date.
@rule
def needs_review():
for o in Order:
if o.total > 1000 and absent(o.shipment):
o.review = True
Declared once. From then on Order.o1.review is true exactly while the premise holds, and withdraws the moment logistics records a shipment — no job to schedule, no cache to invalidate. why(Order.o1.review) returns the claims it was built from.
What the engine gives you
Provenance is structural. Every write names a source. There is no unattributed fact.
Disagreement is kept. Two sources, two co-active claims. conflicts() lists them; agreement() counts them.
Time is built in. Write a validity window; read any cell as of any past instant.
Rules stand. Declare the condition and the conclusion; the engine maintains both directions.
What-ifs commit nothing. suppose() runs your rules against a fact that isn't true, then discards it.
Every program terminates. Bounded iteration, no recursion. Guaranteed, not encouraged.
The argument
Why any of this should exist
An answer you can't check is a rumour with better grammar. Most systems resolve contradictions before you see them, discard the question of who said what, and can't tell you what a record said last March. DKE refuses all three — structurally, not as policy.
Provenance has to be structural, not optional.
A system that can record an unattributed fact eventually will. DKE has no verb that writes a value without naming its source — not as policy, as grammar. An unattributed fact isn't disallowed; it's unsayable.
Disagreement is information.
When two sources contradict each other, most systems resolve it before you ever see it — usually by whichever ranked higher. That is the most valuable thing the store was holding, discarded silently. DKE keeps both claims live, counts the sources behind each, and makes you decide.
Time is not metadata.
“What did this record say last March” is the question audits are made of. It shouldn't require a separate warehouse to answer. In DKE, writes carry a validity window and reads carry an as-of instant — the history is the store, not a copy of it.
A system that can't be made to halt can't be relied on.
DKE's language has no while, no recursion, no unbounded loop. Every program terminates, and the same program over the same store gives the same answer. Not a feature — a property you can't switch off. Nothing an agent emits can hang the engine, because there is no unbounded loop to emit.
We publish the contract and keep the engine.
The language specification is MIT and versioned. Write a linter, a formatter, a language server, a competing compiler — the published document is the whole surface, and we're held to it. Your programs, and everything you build around them, outlive any decision we make.
The uncomfortable question
“An LLM writes to my knowledge store.”
It's an alarming sentence, and it should be. Here is the answer — not a promise, a list of shipped features:
Erasing is a separate permission from writing. A key issued to read and write can remember new facts and update existing ones — an update supersedes the old value rather than silently overwriting it — but it cannot permanently remove anything. Erasure takes an explicit delete grant on the store, so an agent can build knowledge up without the power to destroy it.
Every agent write is attributed. src is mandatory, so agent-recorded claims are stamped as such and sit beside human-sourced facts — distinguishable, never silently merged.
All-or-nothing when it matters. with branch(...) gives the agent a transaction; a failure rolls the store back.
It can reason without committing. suppose() runs your rules against a fact that isn't true and discards it.
Nothing persists by accident. An inline run executes and stores nothing — throwaway work leaves no trace. A rule takes effect only once it's compiled and stored, so standing logic is never a side effect of casual agent work; making something persist is an explicit step, visible in the verb.
A design choice, stated
Why it's Python-shaped.
Python is the language an LLM writes most fluently — it saturates the model's training, so the DKE Python your agent emits is idiomatic and correct by default. And it's a real language, not a fixed API: your agent programs the question dynamically — parameters, computed values, standing rules, data and logic in, an answer back — where a JSON endpoint offers only the operations we anticipated. That a human can also read what the agent wrote, on sight, is the bonus. That's the answer to “why not just a JSON API.”
Who it's for
For work that has to be checkable.
DKE is for teams putting a stochastic agent in front of a system of record — where an answer has to be traceable to its sources, a contradiction can't be quietly resolved away, and every write has to say who made it. If your agent's output feeds a decision someone is accountable for, the engine is the part of the stack that doesn't guess.
Try it
Test the engine. Check the work.
An account gives you a dashboard: create a store, issue a key that reaches exactly that store at exactly the access you choose, and hand the key to your agent. You can see when each key was last used and which clients have presented it, change what a key may do, or revoke it outright.
Alpha is a working service, not a waiting list — an account works today. It also means you are early: expect the surface to change between releases rather than be surprised by it. Anything that breaks is worth an email.