A programming language where
AI agents write
correct software.
Contracts verified by Z3. Authorship tracked by the compiler. Intent-driven code generation. Transparent for humans.
@authored_by(agent: "claude", model: "kodo-pro")
@confidence(0.99)
fn process_payment(amount: Int, balance: Int) -> String
requires { amount > 0 }
requires { amount <= balance }
{
return "transfer_ok"
} Contracts Verified
100% static proof
Reliability Engineering
Why Kōdo?
AI agents generate millions of lines of code. Without guarantees, that code is a liability.
LEGACY WORKFLOW
Without Kōdo
-
No correctness guarantees
Agent-generated code compiles but may violate invariants at runtime. Bugs surface in production.
-
Opaque authorship
No way to know which agent wrote what, or how confident it was. Git blame shows a bot account.
-
Manual error repair
Agents parse compiler prose with regex. Errors are ambiguous. Repair loops take multiple attempts.
ARCHITECT MODE
With Kōdo
-
Z3 SMT Solver verification
Z3 SMT Solver proves every agent-written function at compile time.
-
Formal contracts as safe rails
Formal contracts act as ‘Safe Rails’ for LLM output.
-
Real-time confidence scores
Real-time confidence scores derived from verification depth.
Native Agent Primitives
Built for AI, readable by humans
Every feature is designed so agents produce correct, traceable, auditable software.
fn safe_divide(a: Int, b: Int) -> Int
requires { b != 0 }
ensures { result * b == a }
{
return a / b
} The Z3 solver proves b != 0 at every call site. Division by zero is impossible.
Error Repair
The closed-loop cycle
Agent writes code. Compiler returns structured JSON with machine-applicable patches. Fully automated — zero guessing.
Agent writes .ko
AI agent generates Kōdo source code with contracts, annotations, and intent blocks.
kodoc check --json
Compiler returns structured errors with unique codes, byte offsets, and FixPatch objects.
kodoc fix (auto)
All patches applied automatically in one command. No regex parsing, no prose interpretation.
Build succeeds
Native binary + compilation certificate. Contracts verified. Confidence scores persisted.
{
"code": "E0201",
"message": "undefined type `conter`",
"suggestion": "did you mean `counter`?",
"fix_patch": {
"start_offset": 42,
"end_offset": 48,
"replacement": "counter"
}
} Real Programs
Engineered for complexity
123 examples covering HTTP servers, JSON APIs, file processing, and data structures.
HTTP API Layer
Verifiably correct request parsing and schema validation with zero runtime overhead.
Config Validator
Eliminate configuration drift with compile-time checks for nested info dependencies.
Audit Log Engine
Cryptographically linked audit trails that prove temporal consistency via symbolic logic.
Ecosystem
Full ecosystem support
Everything you need to build, test, and deploy Kōdo programs. From editor integration to native MCP server support for AI agents.
2,269
Tests passing
128
Examples
v0.5.1
Latest release
Ready to build?
Get started in under a minute.
Install the compiler
# macOS (Apple Silicon)
curl -L https://github.com/rfunix/kodo/releases/latest/download/kodoc-macos-aarch64 -o kodoc
chmod +x kodoc && sudo mv kodoc /usr/local/bin/ Write hello.ko
module hello {
meta { purpose: "Hello world" }
fn main() { println("Hello from Kōdo!") }
} Build & run
kodoc build hello.ko -o hello $ kodoc build hello.ko -o hello
Successfully compiled `hello` → hello
$ ./hello
Hello from Kōdo!