1. Install
Pick the install path that matches your environment.
# macOS / Linux via Homebrew
brew install GoodVenturesLab/r1/r1
# any platform via the install script
curl -fsSL https://raw.githubusercontent.com/RelayOne/r1-agent/main/install.sh | bash
# from source
go install github.com/RelayOne/r1/cmd/r1@latest
Verify:
$ r1 --version
r1 0.9.0 (build 2026-04-23, spec 1.0)
2. Provide model keys
R1 needs at least two model families to run cross-family review by default. Set the keys for the two you have.
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
# Optional: a Claude Code Pro session token also works as the implementer.
export CLAUDE_CODE_TOKEN=...
R1 inherits any keys already exported. Nothing is written to disk.
3. Initialise a workspace
$ cd ~/code/my-project
$ r1 init
✓ wrote .r1/config.toml
✓ created .r1/memory/ (L0..L3 tier directories)
✓ registered local skills
The workspace stays inside .r1/. The legacy .stoke/ directory continues to work in read-only mode during the rename window.
4. Run your first session
$ r1 run "Add a rate-limit middleware to the /auth endpoint. 100 req/min per IP."
[PLAN] drafting plan; 4 subtasks identified
[PLAN] gate: scope-fit allow
[EXECUTE] implementer: claude-3.5
[EXECUTE] tools: edit_file, run_tests
[VERIFY] reviewer: gpt-4o (cross-family allow)
[VERIFY] gate: tests pass; lint pass; secrets pass
[COMMIT] artifact written; receipt signed
shipped · 28.4s · receipt at .r1/receipts/2026-04-24T08-13-09Z.json
5. Inspect the receipt
$ r1 receipt verify .r1/receipts/2026-04-24T08-13-09Z.json
✓ signature valid (kid: local-dev)
✓ canonicalisation matches
✓ 41 events, 4 phases, 1 artifact
✓ cross-family pair: claude-3.5 + gpt-4o
Open the receipt in any JSON viewer to see the full event graph. Every THOUGHT, TOOL_CALL, MEMORY_*, and GATE_DECISION is there. Run r1 inspect <receipt> for a TUI.
Next
Read the concepts page for the harness state machine, or jump to the CLI reference for every flag.