Project requirements
Before runningrelai init, consider reviewing the compatibility requirements. They cover supported languages, runtimes, dependency declarations, and the adapter capabilities that init can verify locally.
1
Optional — limit project inputs
Add a root-level
.relaiignore file for files and directories the CLI can ignore because they are not needed to import, configure, or simulate your agent. RELAI uses these patterns to keep matching project files out of agentic init model context and other generation snapshots. Replace placeholders with project-specific paths. See Controlling project inputs with .relaiignore for scope and examples.2
Initialize the repository
Run from the root of your git-tracked agent project. RELAI seeds and
validates the simulator harness under
.relai/simulator/, then registers
the agent. If init pauses for an answer, approval, external action, or
interruption, continue it with relai init --resume.3
Create a learning environment
From a prompt, or from a run log plus feedback. The input log can live anywhere — point
--log-file at your own path. The generated environment always lands in .relai/learning-envs/.4
Optional — register a benchmark
Reuse the same evaluation suite across simulation and optimization.
5
Simulate behavior
6
Optimize
Improves the agent against selected environments and benchmarks. When done, it may write changes in a separate worktree and open a GitHub PR if GitHub CLI (
gh) is available.The learning loop
The loop and the objects it uses, step by step.
Command reference
All flags, defaults, and failure modes for every command.