Philosophy
We believe AI agents will eventually modify their own code. This is not a question of if, but when. The question that matters is: how do you make self-modification safe?
Our answer is structural enforcement. Not prompts. Not fine-tuning. Not hope. We compile the safety rules into a Rust NIF that analyzes code at the AST level. The agent cannot negotiate with the analyzer any more than a program can negotiate with its compiler.
Why Elixir/OTP
We chose Elixir and the BEAM VM for three reasons:
- Fault tolerance: OTP supervision trees mean a failed evolution never crashes the agent. The BEAM was built for systems that must not go down.
- Hot code loading: The BEAM natively supports swapping running code. This is exactly what a self-evolving agent needs — the ability to upgrade skills without restarting.
- Concurrency: The actor model maps naturally to an agent architecture where the brain, memory, evolution pipeline, and security analyzer all run concurrently.
Why Rust for Narsil
The security analyzer must be fast, memory-safe, and impossible for the agent to corrupt. Rust provides all three. The NIF boundary creates a hard separation between the agent's mutable world and the immutable security core.
Open Source
KRAIT is open source under the Apache 2.0 license. We believe that safety-critical AI infrastructure should be transparent, auditable, and community-owned. If you are building with self-modifying agents, we want you to use, inspect, and improve KRAIT.