A small syntax surface.
Explicit function signatures. Familiar braces and loops. One supported-language reference your agent can query offline.
Read the language tourEXPERIMENTAL / NATIVE / OPEN SOURCE
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 →
// 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
}
01 / BUILT FOR THE EDIT–CHECK LOOP
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.
$ keel agent context . --symbol square --json
Supported language reference
Available commands + built-in API discovery
Current source revision
square: implementation + signature
Dependencies + callers + contracts + holesThe 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.
Explicit function signatures. Familiar braces and loops. One supported-language reference your agent can query offline.
Read the language tourCompile through C to a standalone executable. Your finished program needs neither a Keel installation nor Rust to run.
See how it compilesExplicit ownership and effects. Runtime contracts. Property tests, shrinking, and replay. JSON diagnostics for the next repair.
Explore the features02 / EXAMPLES IN MOTION
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.
Two coding agents rewrite their own advantage.
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.
Two players. Independent observations. One court.
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
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.
| Language | Relative measurement | Median (ms) |
|---|---|---|
| Keel | 12.03 | |
| C | 48.92 | |
| Rust | 182.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
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.
| Workflow | Tokens | Accepted |
|---|---|---|
| Keel / protocol baseline | 491,897 | 0/6 |
| Keel / full context upfront | 347,643 | 0/6 |
| Keel / compact context upfront | 328,051 | 0/6 |
| Keel / compact context + combined validation | 241,915 | 3/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 →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.
| Condition | Tokens | Accepted |
|---|---|---|
| C / conventional tools | 205,539 | 0/3 |
| C / improved JSON tools | 153,550 | 0/3 |
| Keel / text editing | 182,244 | 0/3 |
| Keel / compiler protocol | 216,011 | 0/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 report04 / SOMETHING REAL TO TRY
Keel is ready to experiment with. Explore the examples, inspect the code, and give your agent a concrete first task.
Start with a greeting. Build an executable. Keep runtime permissions explicit.
Open the example02 / DATA & OWNERSHIPBorrow, edit, and move integer lists. Handle optional values with exhaustive matching.
Open the example03 / LOCAL HTTPExplore routes and independent acceptance tests in a sequential localhost demo.
Open the exampleFunctions, 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 gaps05 / FROM ZERO TO HELLO
Install the compiler, create a project, and give your agent its starting context. No Keel-specific agent plugin required.
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/jakecyr/keel/master/scripts/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
keel doctorRequires macOS 15+ and a C compiler. Run xcode-select --install if needed. Add the PATH line to ~/.zshrc for new terminals.
keel init hello-keel
cd hello-keel
keel test --engine both
keel run --allow-stdoutYou'll see Hello from Keel!. Your program lives in src/main.keel; your tests live in tests/acceptance.keel.
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.