Announcing v0.5.1

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.

payment_service.ko
PROD.RS — VERIFIED
@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"
}
Z3 Verified | 1.8ms
Confidence: 0.99

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.

Preconditions verified by Z3 SMT solver at compile time
fn safe_divide(a: Int, b: Int) -> Int
    requires { b != 0 }
    ensures  { result * b == a }
{
    return a / b
}
VERIFIED STATIC

The Z3 solver proves b != 0 at every call site. Division by zero is impossible.

Learn more

Error Repair

The closed-loop cycle

Agent writes code. Compiler returns structured JSON with machine-applicable patches. Fully automated — zero guessing.

01

Agent writes .ko

AI agent generates Kōdo source code with contracts, annotations, and intent blocks.

02

kodoc check --json

Compiler returns structured errors with unique codes, byte offsets, and FixPatch objects.

03

kodoc fix (auto)

All patches applied automatically in one command. No regex parsing, no prose interpretation.

04

Build succeeds

Native binary + compilation certificate. Contracts verified. Confidence scores persisted.

kodoc check --json-errors E0201
{
"code": "E0201",
"message": "undefined type `conter`",
"suggestion": "did you mean `counter`?",
"fix_patch": {
"start_offset": 42,
"end_offset": 48,
"replacement": "counter"
}
}

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.

VSCode Extension REPL MCP Server LSP Server CLI Toolchain

2,269

Tests passing

128

Examples

v0.5.1

Latest release

Ready to build?

Get started in under a minute.

1

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/
2

Write hello.ko

module hello {
    meta { purpose: "Hello world" }
    fn main() { println("Hello from Kōdo!") }
}
3

Build & run

kodoc build hello.ko -o hello
terminal
$ kodoc build hello.ko -o hello
Successfully compiled `hello` → hello

$ ./hello
Hello from Kōdo!