Alpha, private
Give agents instructions, not infrastructure
Rein is a strict, TypeScript-like language for agent decision flows. Write each decision as a small function, one file each. The agent answers the questions, then follows the pointers to its next step.
Agent systems turn into machines
Agent frameworks ask you to build the machine. You define graphs, nodes, edges, shared state and retry logic. The instructions end up spread across the wiring.
Rein does not build a harness or a graph. It gives the agent instructions for the decision it faces now.

Rein flips it
You do not wire the agent. You write what it should decide, and what it should do for each answer.
Four ideas make a flow

1. One decision, one file
Each decision is a small function. Each function sits in its own file and starts with a description of what it decides.

2. Inputs are questions
The inputs are questions the agent answers from what it sees. Each one is a yes or no, or one of a few options.
3. Two moves in the body
The body branches on an answer, or picks one case from a fixed set. Every case is written out. There are no loops, by design, for now.

4. Every path ends in one of two things
An instruction, written out or built from a template such as a delegated task. Or a pointer to the next function.
Start at main. Answer. Follow the pointers.
Every project has a main function. It is the agent's entry point. The agent answers only the questions on its path, and follows each pointer until it reaches an instruction.

A checker guards every flow
The checker reads your functions and reports gaps. It catches these three problems before a flow goes to an agent.
Every case is handled
A new option without a case fails the check. Nothing falls back to a silent default.
Every path returns
A path that ends without an instruction or a pointer fails the check.
Every pointer is real
A pointer to a function that does not exist fails the check.

Editor support
The language server shows these problems as you type. Editor support starts with VS Code.
Watch the concept
A concept video of about 70 seconds. It shows the four ideas and one flow.
Alpha notice
Rein is alpha and private
Rein is a proof of concept. Syntax, tools and behavior can still change. Request early access by email, and tell us which decision flow you want to build.
Use cases
Each page shows one flow, in concept terms.
- Decide the next step for each pull requestDecide whether a pull request merges, gets a review, or waits for CI.
- Route each alert to one clear next stepRoute a production alert to a person, a runbook, or a ticket.
- Answer tickets, or hand them to a personAnswer a support ticket, start a refund, or hand it to a person.
- Pick the right model for each delegated taskDelegate each task to a subagent, with the model that fits it.
- Ask a person, wait, then branch on the answerAsk a person a question, wait for the answer, then branch on it.