Agent Kalki: An Admission-Controlled Kernel for Recursive Self-Improvement of Coding Agent Harnesses
Coding agents now run multi-hour sessions in which a model edits code, runs tools, and revises its own prompts, skills, guidance, and memory. We present Agent Kalki, a harness written in Rust that separates the agent proposing a change from the component admitting it. The agent may edit a genome of prompt notes, skills, guidance, and memory, and a gate outside its write and read sets admits a candidate only when eight ordered predicates hold. A kernel below both records each event in a CRC32C-framed append-only log, enforces a deny-first policy, and loads a genome version only when an admission record names its hash. The gate compares candidate and incumbent with k live runs per case from matched starting states, rejects any loss on a protected set beyond a Bonferroni-corrected flake margin, and requires gains to exceed a measured noise ceiling tau at a token cost bounded by kappa. We contribute the formal admission rule, a write-barrier specification with five invariants, a threat model mapped to MITRE ATT&CK, MITRE ATLAS, and the OWASP Top 10 for LLM applications, and five falsifiable hypotheses with an evaluation protocol. The log, blob store, policy engine, and three provider wires run today in 5,621 lines of Rust with 89 passing tests; the gate, sandbox, and context compiler are designed and unmeasured, and this paper reports no Agent Kalki benchmark measurement. Code is available at https://github.com/KalarisLabs/kalki.
Authors
- Sayan Chowdhury (ORCID: https://orcid.org/0009-0004-8421-0087)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-11
- DOI
- https://doi.org/10.5281/zenodo.24144782
- Primary Topic
- Security and Verification in Computing
- Type
- preprint