Skip to main content
Kalki separates proposing a change from admitting it. The agent may edit its genome. Only the gate, which sits outside the agent’s read and write sets, can admit a new genome version, and the kernel loads a version only when an admission record names its hash.

Layers

The kernel

  • Every event is written to an append-only log framed with CRC32C checksums, with rotation and crash recovery.
  • Large tool output is stored by hash in a blob store and kept out of the model’s context.
  • A deny-first policy engine checks each bash command against named rules; the first match wins.

The admission gate

The gate admits a candidate genome only when eight ordered predicates hold. In outline, from the Agent Kalki paper:
  • Candidate and incumbent are compared with k live runs per case, from matched starting states.
  • Any loss on a protected set of cases that pass today, beyond a Bonferroni-corrected flake margin, rejects the candidate.
  • Gains must exceed a measured noise ceiling τ.
  • Token cost must stay within a bound κ.
  • Held-out tasks guard against overfitting to the cases behind the change.
The paper also specifies a write barrier with five invariants and maps the threat model to MITRE ATT&CK, MITRE ATLAS and the OWASP Top 10 for LLM applications.

Repository layout

Contributing

Run cargo xtask ci, sign off commits with git commit -s, and open an ADR before changing the protocol, the log format, the policy engine or the gate.
Last modified on November 15, 2026