Skip to content

For agents

Aleph is written mostly by agents, so the first reader of this page is a model.

The complete language fits in one file, llms.txt, under 2,000 tokens. It is generated by the compiler from its own tables, so it cannot drift from what the compiler accepts, and its examples all pass aleph check.

Terminal window
aleph llms > context.txt

Put it in the agent’s context, system prompt or a skill. Nothing else is needed to write valid programs.

  1. Write the whole file: use lines, then type, then fn items sorted by name, main last.
  2. Run aleph check FILE --json.
  3. Read each diagnostic: code, node, expected, found. If there is a fix, apply it to that node.
  4. Repeat until check is clean. Examples run as part of check.
  5. Run aleph explain FILE and show it to the person: it is what they approve.
  • Every function except main needs at least one ex line, unless it calls an effectful builtin.
  • Calls have fixed arity and no parentheses: + fib - n 1 fib - n 2 is fib(n-1) + fib(n-2).
  • ok, err and none need an expected type; inside a function returning res T E that is automatic.
  • Bindings are immutable and may not shadow anything (T005).
  • There are no loops in v0.1: use recursion, range, map, filter and fold.