---
title: Playground quickstart · Agent Playground docs
description: Run a ready-made flow in two minutes, then build your own loop that runs the tests, fixes what failed and tries again.
url: https://www.quietrobot.ai/docs/playground/quickstart
---

# Playground quickstart

Run a ready-made flow in two minutes, then build your own loop that runs the tests, fixes what failed and tries again.

You need a Quiet Robot account. [Sign up free](https://www.quietrobot.ai/app/signup?next=/dashboard/graphs) if you don't have one; the free plan is enough for everything on this page. A run of any recipe that doesn't use AI costs well under a cent.

## 1. Run a recipe

1. Open the dashboard and choose **Agent Playground** in the menu.
2. Under **Start from a recipe**, find **Fix until tests pass** and choose **Use this recipe**. The builder opens with the flow already drawn.
3. Choose **Simulate** in the toolbar. In a second or two, the **Forecast** shows what a run will likely cost, how long it will take, and how often a limit would stop it.
4. Choose **Run**.

```flow
{"title": "Fix until tests pass, the recipe you're about to run.", "nodes": [["setup", "run", "Set up project"], ["write", "run", "Write code"], ["test", "run", "Run tests"], ["fix", "run", "Fix failures"], ["save", "run", "Save result"]], "edges": [["setup", "write"], ["write", "test"], ["test", "fix", "Failed"], ["fix", "test"], ["test", "save", "Passed"]]}
```

Each box lights up as its step runs. The flow writes a small function, runs its tests, and fixes what failed. You'll see the arrow from **Run tests** go back to **Fix failures** a few times, then on to **Save result** once the tests pass.

<!-- SCREENSHOT: add the image files in public/docs/playground/, then remove this comment wrapper
<figure class="shot">
  <img class="art-light" src="/docs/playground/run-live-light.png" alt="A run in progress: Run tests has failed and the arrow back to Fix failures is lit, with the run's timeline on the right." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/run-live-dark.png" alt="" width="1440" height="900" loading="lazy">
  <figcaption>A run in progress. The timeline on the right shows each step's output as it happens.</figcaption>
</figure>
-->

When the run finishes, choose any step in the timeline to read its full output. That's it: you just ran an agent loop on a real computer.

> [!TIP]
> Recipes that use AI are marked **Needs a Claude key**. To run those, save your Anthropic key first: see [Add your Claude key](https://www.quietrobot.ai/docs/playground/ai-steps#add-your-claude-key).

## 2. Build your own flow

Now draw the same idea yourself, with a real AI agent doing the fixing.

### Start a blank flow

Go back to **Agent Playground** and choose **New flow**. Give it a name at the top, like "Fix my tests".

### Add the first step

Choose **Add a command step**. In the settings panel:

* **Name:** `Get the code`
* **Command:** `git clone https://github.com/you/your-project proj && cd proj && pip install -r requirements.txt`

Use your own project here. If it's private, start with a public one for now.

### Add the test step

Open **Blocks** and drag a **Run command** block onto the canvas, to the right of the first one.

* **Name:** `Run tests`
* **Folder:** `proj`
* **Command:** `python3 -m pytest -q`

Now connect them: drag from the **Passed** dot on **Get the code** to the **Run tests** box. An arrow appears.

### Add an agent to fix failures

An Agent block uses your own Claude key. If you haven't saved it yet, open **Policies → Secrets** in the dashboard, add a secret named `ANTHROPIC_API_KEY` with your key from the Anthropic Console, and let it be sent to `api.anthropic.com`. It takes a minute, and the key never enters the sandbox. [More on keys](https://www.quietrobot.ai/docs/playground/ai-steps#add-your-claude-key).

Drag an **Agent** block onto the canvas, below **Run tests**. Connect **Failed** on **Run tests** to the **Agent** box, then connect **Done** on the agent back up to **Run tests**. That arrow back up is your loop: test, fix, test again.

Now select the agent and fill in:

* **Goal:** `The tests in proj fail. Fix the code so they pass. Don't change the tests. Here is what they printed:` and then, from **Insert…** above the box, choose **Output of Run tests**. A [reference](https://www.quietrobot.ai/docs/playground/ai-steps#references) like `{{steps.run2.output}}` appears: when the run gets here, it's replaced with what the tests printed.
* **Check that it worked:** `cd proj && python3 -m pytest -q`. The agent only counts as done when this passes.

### Finish

Drag an **Output** block to the right of **Run tests** and connect **Passed** to it. Your flow now reads: get the code, run the tests, and if they fail, let the agent fix them and run them again, until they pass.

```flow
{"title": "The flow you just built. The dashed arrow is the loop.", "nodes": [["get", "run", "Get the code"], ["test", "run", "Run tests", "proj · pytest -q"], ["agent", "agent", "Fix my tests", "check: pytest -q"], ["done", "end", "Done"]], "edges": [["get", "test", "Passed"], ["test", "agent", "Failed"], ["agent", "test", "Done"], ["test", "done", "Passed"]]}
```

<!-- SCREENSHOT: add the image files in public/docs/playground/, then remove this comment wrapper
<figure class="shot">
  <img class="art-light" src="/docs/playground/own-flow-light.png" alt="A four-step flow: Get the code, Run tests, an Agent that loops back to Run tests on Failed, and an Output on Passed." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/own-flow-dark.png" alt="" width="1440" height="900" loading="lazy">
  <figcaption>Your first loop: on Failed the agent fixes the code, then the tests run again.</figcaption>
</figure>
-->

## 3. Set the limits and run it

Choose **Limits** in the toolbar. Set:

* **Loops:** 3. The agent gets three tries.
* **Time:** 600 seconds.
* **Spend:** $1.00.

The run stops at whichever comes first. Then choose **Simulate** to see the likely cost, and **Run**.

If the agent fixes the tests, the run ends at your Output block. If it doesn't within three tries, the loop limit stops it and the sandbox goes back to its last good checkpoint. Either way, you can open the run afterwards and read every command the agent ran. See [Runs, replay and compare](https://www.quietrobot.ai/docs/playground/runs).

## The builder at a glance

| Part | What it's for |
|---|---|
| **Blocks** | Every kind of step, grouped as Do, Decide, People and rules, Sandbox, and Start and finish. Drag one onto the canvas, or tap it to add it. |
| **Settings panel** | Opens when you select a box. Every block has a name, the settings it needs, and **Advanced** for the rest. With nothing selected, it shows whether the flow is ready to run and its forecast. |
| **Limits** | The run's limits: loops, time and spend. |
| **Policy** | What the sandbox may reach on the internet, and extra commands that need a person. Your organization's rules always apply too. |
| **History** | Earlier versions of the flow. Restore any of them. |
| **Simulate** | The likely cost and time of a run, before you start one. |
| **Run** | Starts a run. Each box lights up as it goes. |
| **Tidy up** | Lays the whole flow out neatly, top to bottom. |

Your flow saves as you go. Undo and redo work as you'd expect.

### Keyboard shortcuts

Press **?** in the builder to see these. On Windows and Linux use Ctrl where this says ⌘.

| Keys | What they do |
|---|---|
| ⌘ Z, ⌘ Shift Z | Undo, redo |
| ⌘ S | Save now |
| ⌘ D | Duplicate the selection |
| ⌘ Enter | Run |
| Delete | Delete the selection |
| Arrow keys | Move a selected step |
| Tab | Move between steps |
| Escape | Deselect, or close a panel |

### On an iPad or phone

The builder works on any screen. On a desktop, or an iPad held sideways, you get the toolbar, the Blocks panel and the settings panel side by side. On a phone, or a narrow iPad window, you get the canvas with a bar at the bottom, and settings open as sheets. Drag a box to move it, and drag from an exit dot to connect it, or tap the dot and then the box. Long-press a box for more.
