kleisli.io

Correctness infrastructure for the agentic era.

Formal methods, type theory, Nix.

The verification layer is missing. Agents generate code faster than any human process can check it. The bottleneck is not skill. It is architecture. Kleisli.IO builds the missing layers.

The verification layer.

Kleisli.IO builds nix-effects. Infrastructure validation as algebraic effects, in pure Nix. Every constraint is a suspended effect. Three handlers, same validation logic.

peers.nix
Peers = ListOf (refined "WireGuardPeer" Attrs
(p: p ? publicKey && p ? endpoint));

validate Peers [
{ publicKey = "dGVz..."; endpoint = "10.0.0.1:51820"; }
{ endpoint = "10.0.0.2:51820"; }
];
typecheck.strict
error in Peers[1]: missing publicKey
typecheck.collecting
2 violations: Peers[1] missing publicKey
typecheck.logging
pass Peers[0]  fail Peers[1]

The coordination layer.

Kleisli.IO builds kli. Append-only event logs, conflict-free replicated state, no central coordinator.

09:14task.createrotate-mesh-credentials
09:14session.joinagent-a
09:16observation12 WireGuard peers regenerated
09:18session.joinagent-b
09:20observationall WireGuardPeers pass under strict handler
09:21tool.calldeploy push 5 machines
09:22observationmesh converged, no runtime coordinator
09:23session.leaveagent-b (graceful)
in production

Kleisli.IO operates the complete technical infrastructure for the Lie-Størmer Center, Norway's national center for mathematics.

Built on the Kleisli stack. Operated from Tromsø.

Lie-Størmer-senteretUiT The Arctic University of NorwayAMTI

Going deeper.

nixFebruary 2026

Dependent Types in Pure Nix

nix-effects embeds a Martin-Löf Type Theory proof checker in pure Nix. Dependent functions, dependent pairs, identity types with J, cumulative universes, verified extraction of plain Nix functions from proof terms. The whole system runs at nix eval time.

nixFebruary 2026

Trampolining Nix with genericClosure

Nix has no loops and no tail-call optimization. builtins.genericClosure, the package dependency primitive, doubles as a general-purpose trampoline once you break the thunk chain.

event-sourcingFebruary 2026

Agent Coordination Is a Distributed Systems Problem

AI agent sessions are distributed processes: private state, independent failure, concurrent access to shared resources. Event sourcing gives sessions durable history; CRDTs give them convergent merge, with correctness guarantees that are purely algebraic, requiring no network model.

Agents write code.
Your team needs to know it is correct.