ilo
Token-minimal language for AI coding agents.
AI agents pay three costs per program: generation tokens, error feedback, retries. ilo cuts all three: 0.33× the tokens and 0.22× the characters of Python, type-verified before execution.
Why ilo makes agents more efficient
| Python | ilo | saving | |
|---|---|---|---|
| Token count | ~30 | ~10 | 67% |
| Characters | ~90 | ~20 | 78% |
- Shorter programs: 0.33× tokens, 0.22× characters vs Python
- Verified first: type errors caught before execution; agent gets
ILO-T004not a stack trace - Compact error codes: one token, not a paragraph; agents correct faster, fewer retries
- Prefix notation: eliminates parentheses; token-optimal form for AI generation
Install
Claude Code (CLI, recommended)
Cowork (web)
Browse Plugins → Add marketplace from GitHub → ilo-lang/ilo → install. Binary auto-installs via npm.
npm / npx (any platform with Node 20+)
Note: npm/WASM runs interpreter mode only. HTTP builtins (
get,$,post) are not available; use the native binary for network access.
macOS / Linux (one-liner)
|
Direct download
# macOS Apple Silicon
&&
# macOS Intel
&&
# Linux x86_64
&&
# Windows (PowerShell)
From source
# or from git:
What it looks like
Python:
= *
= *
return +
ilo:
tot p:n q:n r:n>n;s=*p q;t=*s r;+s t
0.33× the tokens, 0.22× the characters. Same semantics.
Real-world data pipeline: fetch JSON, parse, filter, sum:
fetch url:t>R ? t;r=($!url);rdb! r "json"
proc rows:L ?>n;clean=flt pos rows;sum clean
pos x:?>b;>x 0
Three functions, no boilerplate. $! auto-unwraps HTTP. rdb! auto-unwraps parse. >> chains transforms.
Teaching agents
Agent Skills (zero friction)
ilo ships as an Agent Skill. Install the plugin and the agent learns ilo automatically; no manual context loading needed.
| Surface | How to use ilo |
|---|---|
| Claude Code (CLI) | Add marketplace then install (see Install) |
| Claude Cowork (web) | Browse Plugins → install ilo (binary auto-installs via npm) |
| Claude API / Console | Run ilo help ai locally, paste output into system prompt |
Other agents (Codex, Cursor, Copilot, etc.): copy skills/ilo/ into your agent's skills directory. Any tool supporting the Agent Skills standard will pick it up.
Note: Sandboxed agents (Codex etc.) may lack filesystem/network access. Pre-install ilo in the container and use context loading instead.
Context loading
Fine-tuning
Train on ilo programs and error feedback loops. Best for production agents writing a lot of ilo. Not yet available as a hosted service.
Running ilo
First arg is code or a file path (auto-detected). Remaining args are passed to the first function. Name a function to select it in multi-function programs:
Higher-order functions: map, flt, fld take a function name as first arg:
Pipe >>: pass result of left as last arg to right:
# → [4, 16]
Pass list arguments with commas:
Interactive REPL:
Define functions, evaluate expressions, accumulate state. nvim-style commands: :q :w file.ilo :defs :clear :help.
Help & language spec:
Static verification: all programs verified before execution. Reports all errors at once with stable codes:
# error[ILO-T004]: undefined variable 'y'
# = note: in function 'f'
# error[ILO-T009]: '*' expects n and n, got t and n
# = note: in function 'f'
Language features
Prefix and infix notation:
+*a b c # (a * b) + c saves 4 chars, 1 token
>=*+a b c 100 # ((a + b) * c) >= 100 saves 7 chars, 3 tokens
Infix also works: a + b, x * y + 1. Across 25 expression patterns: 22% fewer tokens, 42% fewer characters with prefix vs infix. See the prefix-vs-infix benchmark.
Auto-unwrap ! eliminates Result matching boilerplate:
# Without !: 12 tokens
# With !: 1 token
# → 42
HTTP GET: get url or $url (terse alias), returns R t t:
Environment variables: env key returns R t t:
File I/O: format auto-detected from extension:
Data scripting:
Aggregation & reshape:
Imports:
# math.ilo: dbl n:n>n;*n 2
# main.ilo: use "math.ilo" run n:n>n;dbl n
Environment files: .env and .env.local loaded automatically. .env.local takes priority; existing env vars are not overwritten:
Output formats:
Formatter:
Other modes:
Run tests:
For integrators
Tool declarations: external calls wired to HTTP endpoints via a JSON config:
tools.json:
ilo serialises call args as {"args": [...]} and deserialises the JSON response back to ilo values.
MCP servers: connect any MCP server to give ilo access to its tools:
mcp.json uses Claude Desktop format. MCP tools are injected as tool declarations before verification, so types are checked end-to-end.
See examples/mcp.json for a working example.
Backends:
Documentation
| Document | Purpose |
|---|---|
| SPEC.md | Language specification |
| examples/ | Runnable example programs (also cargo test regression suite) |
| MANIFESTO.md | Design rationale |
| research/JOURNEY.md | Design journey: syntax variants, benchmarks, research index |
| skills/ilo/ | Agent Skill (for AI coding agents) |
| research/TODO.md | Planned work |
| research/OPEN.md | Open design questions |
Principles
- Token-conservative: every choice evaluated against total token cost: generation, retries, error feedback, context loading.
- Constrained: small vocabulary, closed world, one way to do things. Fewer valid next-tokens = fewer wrong choices = fewer retries.
- Self-contained: each unit carries its own context: deps, types, rules.
- Language-agnostic: structural tokens (
@,>,?,^,~,!,$) over English words. - Graph-native: programs express relationships navigable as a graph, not just linear text.
Guards instead of if/else: flat statements that return early and chain vertically. No nesting depth, no closing braces. Match instead of switch: no fall-through.
See MANIFESTO.md for full rationale.
Design journey
We explored 9 syntax variants before settling on the current design. See research/JOURNEY.md for the full comparison table, key findings, and all research documents.
Community
- r/ilolang — discussion, feedback, and updates
_ _ _
(_)| | ___ | | __ _ _ __ __ _
| || |/ _ \ | | / _` || '_ \ / _` |
| || | (_) | | || (_| || | | || (_| |
|_||_|\___/ |_| \__,_||_| |_| \__, |
|___/