EXPERIMENTAL / NATIVE / OPEN SOURCE

A small language.
A better-informed
agent.

Give your coding agent the language guide, the right code, and a way to check its work. All from the Keel CLI.

Readable syntax. Explicit ownership. Native executables.
Fewer agent tokens: see the measured workflow improvement →

hello-keel / src/main.keelKEEL 0.1
// Small enough to understand.
pub fn square(value: Int) -> Int
    requires value >= -1000
        && value <= 1000
    ensures result >= 0
{
    return value * value
}

test "squares a number" {
    assert square(12) == 144
}
$ keel test --engine bothTESTED
Example source · contracts checked at runtime
12.03 msmedian CLI check / local fixture 32.8 KiBminimal stripped executable 1 commandlanguage + project context

01 / BUILT FOR THE EDIT–CHECK LOOP

Context is part
of the toolchain.

An agent shouldn't have to guess which syntax exists. Keel ships its supported-language guides with the compiler and exposes project context as JSON.

THE AGENT'S WORKBENCHILLUSTRATIVE WALKTHROUGH
$ keel agent context . --symbol square --json

Supported language reference
Available commands + built-in API discovery
Current source revision
square: implementation + signature
Dependencies + callers + contracts + holes

The CLI supplies the context. Your agent chooses how to use it. Implementation snippets can be bounded; the full response has no total token-budget guarantee.

[ A ]

A small syntax surface.

Explicit function signatures. Familiar braces and loops. One supported-language reference your agent can query offline.

Read the language tour
[ B ]

Native from the start.

Compile through C to a standalone executable. Your finished program needs neither a Keel installation nor Rust to run.

See how it compiles
[ C ]

Checks in the loop.

Explicit ownership and effects. Runtime contracts. Property tests, shrinking, and replay. JSON diagnostics for the next repair.

Explore the features

02 / EXAMPLES IN MOTION

Agents write the code.
Then the game changes.

Explore two open-source game examples: AI coding agents evolving their abilities, and Jev making decisions for competing Pong players. Both use native Keel servers with browser interfaces.

AI CODE GENERATION

The self-evolving arena

Two coding agents rewrite their own advantage.

Silent recording of a live OpenAI session: two generated Keel abilities passed sampled tests and activated during the match. The interface shows active source, stats, and validation feedback.

OpenAI coding agents generate Keel ability functions using separate player state and memory. Native workers compile and test each proposal; accepted code activates at the next round boundary.

The evolving code chooses power, reach, armor, and speed within a fixed budget. Keel's referee owns the rules and checks the actual output during play.

AI DECISION-MAKING

Jev-powered Pong

Two players. Independent observations. One court.

Silent replay of one recorded live Jev session: 20 consecutive paddle returns, 0 misses, and 20 API calls (10 per player) over 74.5 seconds. Playback uses the saved run and makes no API calls.

Each player asks Jev where to move its paddle, using its own observation and decision history. Separate native Keel workers request decisions while the game continues between responses.

Keel runs the physics, collisions, scoring, and API endpoints. The browser renders the court and lets you inspect a rally with replay controls.

A Keel backend, from requests to files. Both examples serve their HTML, CSS, JavaScript, and game APIs through http.serve_app. Their server logic and AI workers are written in Keel.

Run locally in offline demo mode, or use your own API credentials for live agents. These experimental examples demonstrate behavior; they are not agent-efficiency benchmarks.

Start with the static-file and JSON API example →

03 / OPEN NUMBERS, OPEN QUESTIONS

Fast feedback.
See the evidence.

Explore the recorded Keel, C, and Rust results. These are local measurements on a narrow fixture, not a claim that Keel is faster for every program.

Timing statistic

CLI check

Milliseconds · lower is better
Recorded benchmark comparison
LanguageRelative measurementMedian (ms)
Keel12.03
C48.92
Rust182.85

Fresh compiler processes with warm OS caches, after a function-body edit. C provides fewer static guarantees; Rust supports a much broader language.

Apple M1 · 16 GiB RAM · macOS 27.2 ARM64
7 samples · 2,500 tiny functions / ~10,000 source lines
Recorded October 3, 2026 UTC

Unused functions can be eliminated. Timings are sensitive to cache state, startup, and system load. No representative-application or general performance advantage is established.

NEW / MEASURED KEEL WORKFLOW IMPROVEMENT

50.8% fewer agent tokens.

Compact context and combined edit/validation cut reported tokens versus the Keel protocol baseline in a six-task development experiment. All 24 results passed independent correctness checks; the improved workflow met the token budget on 3 of 6 tasks.

Six tasks per workflow · one repetition · total reported input + output tokens
WorkflowTokensAccepted
Keel / protocol baseline491,8970/6
Keel / full context upfront347,6430/6
Keel / compact context upfront328,0510/6
Keel / compact context + combined validation241,9153/6

Reserved-task validation: 61.8% fewer reported tokens; 2/4 accepted versus 0/4 for the Keel protocol baseline. Two different tasks, two repetitions each, with the guided compact workflow frozen before validation.

These are Keel-to-Keel workflow comparisons, using an experimental context adapter. Each trial had 180 seconds and 32,000 tokens. Totals include cached input and failed attempts. A token or dollar-cost advantage over C, Rust, or other languages is not established.

Inspect the experiments, iterations, and raw evidence →
Original pilot: how did Keel compare with C?

Not in the recorded pilot. Keel's compiler-protocol condition used more reported tokens than the improved C baseline. All 12 repairs passed native assertions, but all exceeded the registered token budget. None counted as accepted.

Three tasks per condition · total reported input + output tokens
ConditionTokensAccepted
C / conventional tools205,5390/3
C / improved JSON tools153,5500/3
Keel / text editing182,2440/3
Keel / compiler protocol216,0110/3

One repetition per task; 180 seconds and 32,000 tokens per trial. Totals include cached input and failed attempts. Actual dollar costs are unavailable and tool-condition isolation wasn't enforced. The cost advantage remains UNKNOWN; the 25% improvement target is a goal, not a result.

Inspect the pilot's acceptance report

04 / SOMETHING REAL TO TRY

Start small.
Make it work.

Keel is ready to experiment with. Explore the examples, inspect the code, and give your agent a concrete first task.

What is supported today?

Functions, checked 64-bit integers, booleans, text, specialized integer lists, Option/Result, exhaustive matching, explicit ownership, effects, runtime contracts, and native/reference tests.

Keel is experimental and not feature-complete. General records, unions, generics, imports, async, and a package manager remain future work. The web example is a small demonstration, not a production framework.

Read the release gaps

05 / FROM ZERO TO HELLO

Your next project
starts here.

Install the compiler, create a project, and give your agent its starting context. No Keel-specific agent plugin required.

01

Install Keel

curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/jakecyr/keel/master/scripts/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
keel doctor

Requires macOS 15+ and a C compiler. Run xcode-select --install if needed. Add the PATH line to ~/.zshrc for new terminals.

All installation options · Review the installer
02

Create a project

keel init hello-keel
cd hello-keel
keel test --engine both
keel run --allow-stdout

You'll see Hello from Keel!. Your program lives in src/main.keel; your tests live in tests/acceptance.keel.

03

Bring your agent

Read AGENTS.md and run `keel agent context . --json` before editing.
Use Keel's built-in guides for supported syntax and APIs.
Preserve approved acceptance tests.
After changes, format, check, lint, and run `keel test . --engine both`.
Report failures or incomplete results.

Paste this into your coding agent, then describe your task. Keel creates AGENTS.md and CLAUDE.md for you.