Renyi

The scripting language of AI agents.

The agent writes it, you review it at a glance, and the program can only do what it declares.

Install Cheat sheet GitHub

What a program may do is in its signature.

public function active_adult_emails(path: Path)
  returns List of Email
  or fails with FileError or JsonError
  needs filesystem.read
  purpose: Read users from a JSON file and return the e-mails of active users who are at least 18.

  let text be filesystem.read_text(path) otherwise fail
  let users: List of User be json.parse(text) otherwise fail
  let emails be
    for each user in users
    where user.is_active and user.age is at least 18
    sorted by user.name
    collect user.email
  return emails
end
  1. returns: what it gives
  2. or fails with: how it fails
  3. needs: what it may do

Four promises the implementation keeps today.

01

Effects are capabilities

Scoped, budgeted and guarded; the compiler refuses what is not declared.

The signature is the grantA function head with three lines: returns Config, or fails with FileError, needs filesystem.read scoped to data/. What is declared is admitted; the rest is refused. public function load(path: Path) returns Config or fails with FileError needs filesystem.read("data/") declared: admitted the rest: refused
02

Every run is evidence

Recorded, replayed offline and reproduced under its manifest.

The run is evidencerenyi record writes run.json with its manifest; renyi run --replay and renyi reproduce answer every effect from it, offline. record replay reproduce run.json+ manifest offline
03

Dependencies cannot widen

Effects computed from sources; an update that would widen them is refused.

Dependencies cannot widenThe locked version 1.0.0 needs console; the offered 1.1.0 adds network.http. renyi update refuses it unless --accept-effects is given and main declares the new capability. LOCKED 1.0.0console OFFERED 1.1.0console+ network.http renyi updaterefused: the effects widen unless --accept-effects and main declares it
04

Tooling built in

Project map, semantic diff, an MCP server, a fix on every error.

One toolchainA source file goes through the front end, written in Rust and again in Renyi and held equal, to bytecode, which the VM runs on its interpreter, its template tier and Cranelift. FRONT END.ry Rust =Renyi .ryc THE VM interpreter template Cranelift

How it works

Between “the agent wrote it” and “I ran it” there is a review that nobody has time for.

The effects are types, the grant is a signature, the run is data.

A session at the terminal
todo
$ renyi check todo.ry
todo.ry:10:15: error [capability-missing]: `read_text` needs `filesystem.read`, which `main` does not declare
  fix: add `needs filesystem.read` to the signature of `main`
$ sed -i 's/needs console/&, filesystem.read/' todo.ry
$ renyi check todo.ry
$ renyi record --to run.json todo.ry
3 items
renyi: recorded 2 calls to run.json
$ rm todo.txt
$ renyi run --replay run.json --explain todo.ry
Print how many items the list holds. (main)
  filesystem.read read_text(path: "todo.txt") -> "milk\neggs\nbread\n"
  console "3 items"
$ 

Install

Every release carries binaries for Linux, macOS and Windows; both installers verify the archive’s checksum.

An agent starts from the starter pack: a skill file, the MCP configuration and five workflows that do real work.

Linux, macOS
Shell
curl -fsSL https://raw.githubusercontent.com/renyi-lang/renyi/main/install.sh | sh
Windows PowerShell
PowerShell
irm https://raw.githubusercontent.com/renyi-lang/renyi/main/install.ps1 | iex
With Cargo
Shell
cargo install renyi