The scripting language of AI agents: the agent writes it, you review it at a glance, and the program can only…
**Renyi is the scripting language of AI agents: the agent writes it, you
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
review it at a glance, and the program can only do what it declares.**
Why Renyi
Agents now write most of the code that runs on your behalf. The code they
write in today's languages has to be read line by line, or run blind.
Renyi is designed around that division of labour: the agent writes, the
person reviews, and the language makes the review a glance.
1. **What a program may do is in its signature.** Every function declares
its effects (needs filesystem.read("data"), network.http("api.example")),
scoped to a path or a host, budgeted (at most 60 per minute) and
guarded (only to). The compiler refuses what is not declared; the
runtime admits only that, for the program's dependencies too. The
signature of main is the whole program's grant.
2. **Every run is evidence.** A run can be recorded, replayed offline and
reproduced under its manifest (toolchain, code hash, dependencies,
grant, arguments, outcome); --explain narrates it in the words the
program's author wrote. You know what a run did, as data.
3. **Dependencies cannot widen what you allowed.** A package's effects are
computed from its sources, never written by hand; an update that would
let the program do more is refused, not noticed later.
4. **The tooling an agent needs is built in.** The project map, the
semantic diff and the chunks for retrieval by embedding are commands
(renyi index, --diff, --chunks), the toolchain is an MCP server
(renyi mcp), documentation is syntax (purpose:), and every error
carries a fix, so the agent's next attempt is right.
5. **Read in one pass, by anyone.** Regular English with one spelling per
concept, one canonical layout, no exceptions, no null, no anonymous
functions, no operator overloading. A reviewer who has never seen Renyi
reads what a program touches from its signature.
Renyi is a general-purpose language; its first users are people who run
automation with Claude Code, Codex and their like, and will not run an
agent's Python blind. The design record is
docs/design/08-positioning.md (decisions AH1 to AH4).
Against the alternatives
Each row is a claim the implementation keeps and the conformance suite
tests. The other languages were built for other jobs and do them well;
the comparison is for one job, a program an agent wrote and a person
must trust.
| For a program an agent wrote | Renyi | Python | TypeScript / Deno | Rust | Shell |
|---|---|---|---|---|---|
| What it may do, visible before it runs | in every signature, scoped and budgeted, checked by the compiler | not declared; a sandbox limits the whole process | --allow-* flags for the whole process | not declared; the type system is about memory, not effects | not declared |
| Its dependencies' effects | computed from their sources, locked, refused when they widen | not declared | not declared | not declared | not declared |
| What a run did | recorded, replayed, reproduced by the runtime | external tooling | external tooling | external tooling | set -x |
| What an error means | a fix on every diagnostic, by rule | a traceback | a message | a good message, for a programmer | an exit code |
| Reviewable without training | regular English, one spelling per concept | familiar to programmers | familiar to programmers | expert reading | terse |
| Speed on integer loops | machine code in the process | CPython | V8 | native, the fastest | n/a |
Python and TypeScript are the languages agents write best today, and
nothing in them says what a script will touch before it runs. Rust gives
guarantees about memory and data races at a cost in time and expertise
that a script does not repay, and says nothing about effects. Shell is
what agents reach for first, and it is the hardest to review of all.
The gap
Between "the agent wrote it" and "I ran it" there is a review that nobody
has time for. Sandboxes bound the process from outside and tell you
nothing about the program; type systems check shapes, not effects;
recordings and audit trails are bolted on afterwards, if at all. Renyi