You give it a URL and a goal ("log in and export the sales dashboard"). An AI agent explores the site in a headless browser, records each action, and outputs a YAML runbook. After that, the runbook replays on its own.
When UIs change and selectors break, multi -stage recovery pipeline kicks in — tries deterministic fixes first, falls back to AI only when needed, then patches the runbook so the next run is deterministic again.
I built this because I was using AI agents for recurring browser tasks but couldn't justify the per-run cost and non-determinism. Traditional RPA didn't fit either — I wanted something I could npx and iterate on in my editor.
`npx @refrainai/cli generate --url https://example.com --goal "..." --context context.md --output runbook.yaml` `npx @refrainai/cli execute --runbook runbook.yaml --context context.md`
Runbooks are plain YAML — version-controllable, reviewable in PRs. BYOK (Anthropic, OpenAI, Google, Azure, Bedrock, Vertex).