programming language for AI agents

ilo

The first language designed for machines, not people.
0.33× the tokens. 0.22× the characters. Type-verified before execution.

$ curl -fsSL https://raw.githubusercontent.com/ilo-lang/ilo/main/install.sh | sh
67%
fewer tokens
vs Python
78%
fewer characters
vs Python
type-verified
before execution

Same semantics. Fewer tokens.

A real function. Same logic. See the difference.

total.py ~30 tokens · 120 chars
def total(p: float, q: int, r: float) -> float:
    s = p * q
    t = s * r
    return s + t
total.ilo ~10 tokens · 38 chars
tot p:n q:n r:n>n;s=*p q;t=*s r;+s t

Designed for machines

Every feature exists to reduce total token cost.

Syntax

Prefix Notation

Operators before operands. No parentheses. No precedence ambiguity. 22% fewer tokens, 42% fewer characters vs infix.

+*a b c (a × b) + c
Safety

Verified Before Execution

Every program is type-checked before it runs. Agents get compact error codes, not stack traces. One token, not a paragraph.

ILO-T004: expected n, got t
Control

Guards

Flat conditionals. No nesting. No braces.

>=sp 1000 "gold"
Composition

Pipes

Chain functions left-to-right.

x>>dbl>>inc
Ergonomics

Auto-unwrap !

12 tokens down to 1. Error propagation without the ceremony.

inner! x
Integrations

MCP & HTTP Tools

Wire external APIs as typed functions. Type-checked at load time.

--tools tools.json

See it in action

Inline
$ ilo 'fac n:n>n;<=n 1 1;r=fac -n 1;*n r' 5
120
File
fac n:number > number
  <= n 1 1
  r = fac (- n 1)
  * n r
$ ilo fac.ilo fac 5
120
Factorial. Guard as base case, then recurse.
Inline
$ ilo 'cls sp:n>t;>=sp 1000 "gold";>=sp 500 "silver";"bronze"' 750
silver
File
cls sp:number > text
  >= sp 1000 "gold"
  >= sp 500  "silver"
  "bronze"
$ ilo cls.ilo cls 750
silver
Three-tier classifier. Guards fall through — no if/else needed.
Inline
$ ilo 'p r:L n>n;c=flt q r;s=sum c;+s 0 q x:n>b;>x 0' p 10,-3,7,-1,4
21
File
p r:List number > number
  c = filter q r
  sum c

q x:number > bool
  > x 0
$ ilo pipeline.ilo p [10,-3,7,-1,4]
21
Filter positives and sum. Higher-order functions as first-class builtins.
Inline
$ ilo 'dbl x:n>n;*x 2 inc x:n>n;+x 1 rn x:n>n;x>>dbl>>inc' rn 5
11
File
dbl x:number > number
  * x 2

inc x:number > number
  + x 1

run x:number > number
  x >> dbl >> inc
$ ilo pipes.ilo run 5
11
Pipe chains compose functions left-to-right. No nesting to untangle.
Inline
$ ilo 'sq x:n>n;*x x big x:n>b;>x 10 kp xs:L n>L n;flt big (map sq xs)' kp 1,2,3,4,5
16,25
File
sq x:number > number
  * x x

big x:number > bool
  > x 10

kp xs:List number > List number
  filter big (map sq xs)
$ ilo lists.ilo kp [1,2,3,4,5]
[16, 25]
Square a list, keep values over 10. Higher-order functions as first-class builtins.
Inline
$ ilo 'sf url:t>t;r=get url;?r{~v:v;_:"fallback"}' sf "https://api.example.com/data"
fallback
File
sf url:text > text
  r = get url
  ? r { ~v: v; _: "fallback" }
$ ilo sf.ilo sf "https://api.example.com/data"
fallback
HTTP GET with Result match fallback. Errors are values, not exceptions.

Named from Toki Pona for “tool”—a constructed language that captures all of human expression in ~120 words. ilo does the same for machine programmers.

Token-conservative Constrained Self-contained Language-agnostic Graph-native

Make your agents more efficient.