> ## Documentation Index
> Fetch the complete documentation index at: https://docs.therefrain.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Refrain?

> Self-healing browser automation framework. AI generates reproducible runbooks. Reruns cost zero AI tokens. AI agents self-heal your automation when UIs change.

## Overview

**Refrain** is a self-healing browser automation framework. AI generates reproducible runbooks, reruns execute with zero AI tokens, and AI agents auto-patch your automation when UIs change.

Traditional browser automation (Playwright, Selenium) breaks with every UI change. Autonomous AI agents produce different results every time. Refrain combines the best of both:

1. **AI generates** a reproducible runbook by exploring your web app
2. **Zero AI cost** on reruns — deterministic execution needs no tokens
3. **Self-healing** — when UIs change, AI agents detect selector drift and auto-patch your runbooks
4. **Human-in-the-Loop** — Slack / Teams / Discord approval workflows keep you in control

## Three interfaces

<CardGroup cols={3}>
  <Card title="CLI" icon="terminal">
    Generate and execute runbooks from the command line. Ideal for developers and CI/CD pipelines.
  </Card>

  <Card title="SDK" icon="code" href="/sdk/overview">
    TypeScript SDK for programmatic access. Embed browser automation into your applications.
  </Card>

  <Card title="Web Console" icon="browser">
    Web-based management UI. Create, schedule, and monitor runbook executions without code.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Set a goal">
    Tell AI what you want to accomplish: *"Log in and export the dashboard CSV"*
  </Step>

  <Step title="AI builds a runbook">
    AI explores your app, records each action, reviews the steps, and outputs a reproducible runbook.
  </Step>

  <Step title="Execute deterministically">
    The runbook executes with zero AI tokens. Whether you run it once or a hundred times, the cost stays at zero.
  </Step>

  <Step title="Self-healing when UIs change">
    When the target app updates its UI, AI agents detect selector drift and auto-patch your runbooks. No manual maintenance — your automation keeps running.
  </Step>
</Steps>

## Key features

| Feature                       | Description                                                                                                                                                                                           |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AI-built runbooks**         | Set a goal and AI autonomously builds reproducible browser operations. No code, no manual scripting.                                                                                                  |
| **Zero rerun cost**           | Generated runbooks execute without AI tokens. 100% cost reduction on every rerun.                                                                                                                     |
| **Reproducible & auditable**  | Runbooks are structured artifacts you can version-control, review in PRs, and audit. Same runbook, same result.                                                                                       |
| **Self-healing automation**   | When UIs change, AI agents detect selector drift and auto-patch your runbooks. Multi-layered self-healing keeps your automation running without manual intervention.                                  |
| **Human-in-the-Loop**         | Built-in Slack, Teams, and Discord approval workflows with native HITL governance.                                                                                                                    |
| **BYOK — Bring Your Own Key** | Use your own AI keys with Anthropic, OpenAI, Bedrock, Vertex AI, Azure OpenAI, or any compatible endpoint. Your data is never used for model training, and token consumption is dramatically reduced. |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get up and running in 5 minutes.
  </Card>

  <Card title="Plan & Pricing" icon="credit-card" href="/concepts/plan-tiers">
    Compare features across tiers.
  </Card>
</CardGroup>
