---
title: Tutorial 1: Build your first flow · Agent Playground docs
description: Build a three-step flow that checks your website is up and showing the right page, run it, and read what happened. No code and no AI needed.
url: https://www.quietrobot.ai/docs/playground/tutorials/first-flow
---

# Tutorial 1: Build your first flow

Build a three-step flow that checks your website is up and showing the right page, run it, and read what happened. No code and no AI needed.

In this tutorial you'll build a small flow that checks your website: it fetches your homepage, looks for a phrase that should be there, and tells you whether all is well. It's a real job you can keep using, and it shows you the three things every flow is made of: **steps**, **arrows** and **checks**.

**Time:** about 10 minutes. **Plan:** Free. **Cost of a run:** a tiny fraction of a cent.

```flow
{"title": "What you'll build: fetch the page, check it, finish on one of two endings.", "nodes": [["fetch", "run", "Fetch my homepage"], ["check", "branch", "Is the page right?"], ["good", "end", "All good"], ["bad", "end", "Needs a look"]], "edges": [["fetch", "check", "Passed"], ["check", "good", "Yes"], ["check", "bad", "No"]]}
```

## 1. Start a blank flow

1. Sign in to the dashboard and choose **Agent Playground** in the menu.
2. Choose **New flow**. The builder opens with one step already on the canvas, called **Start**.
3. Click **Untitled flow** at the top and call it `Check my website`.

The builder saves as you go, so there's no Save button to remember. You'll see **Saved** next to the name.

## 2. Make the first step fetch your page

The **Start** step is a **Run command** step: it runs one command on the flow's sandbox, a small private computer that's yours for the run.

1. Click the **Start** box. Its settings open on the right.
2. Set **Name** to `Fetch my homepage`.
3. Set **Command** to the line below. Swap `https://example.com` for your own website's address.

```bash
curl -sSfL -o home.html https://example.com && echo "Got $(wc -c < home.html) bytes"
```

This downloads your homepage into a file called `home.html` and says how big it was. If the site doesn't answer, or answers with an error, the step **fails**.

Every step that runs something has two exits at the bottom of its box: **Passed** and **Failed**. The run follows the arrow from whichever exit happened.

## 3. Add a check: is it the right page?

A site can answer and still be wrong: a blank page, a hosting company's error page, last year's prices. A **Decide** step asks a yes or no question and takes a different arrow for each answer.

1. With **Fetch my homepage** still selected, click **Decide** in the Blocks panel on the left. The new box appears below it, already joined by an arrow from **Passed**.
2. Set **Name** to `Is the page right?`
3. Set **Condition** to look for a phrase that should always be on your homepage, like your business name or phone number:

```bash
grep -q "Example Domain" home.html
```

Put your own phrase between the quotes. If it's found, the answer is **Yes**. If not, **No**.

> [!TIP]
> To join two boxes yourself, drag from an exit (like **Passed**) to the other box. On a phone or tablet, tap the exit, then tap the box.

## 4. Add two endings

An **Output** block is where a flow finishes. Naming each ending makes a run easy to read at a glance.

1. Click **Output** in the Blocks panel (it's near the bottom) and name it `All good`.
2. Add a second **Output** and name it `Needs a look`.
3. Click **Is the page right?** again. Under **Where next** in its settings, set **Yes** to **All good** and **No** to **Needs a look**.

**Where next** is the easy way to draw arrows: every step has it, with one line for each exit.

Choose **Tidy up** (the bottom button of the zoom controls) to lay the boxes out neatly. Your flow should look like this:

<figure class="shot">
  <img class="art-light" src="/docs/playground/tutorials/first-flow-builder-light.webp" alt="The builder with a three-step flow: Fetch my homepage, then Is the page right?, which goes to All good on Yes and Needs a look on No." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/tutorials/first-flow-builder-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>Your first flow. At the top left, the builder says it's <strong>Ready to run</strong>.</figcaption>
</figure>

Notice that the **Failed** exit on **Fetch my homepage** has no arrow. That's fine: a failed step with nowhere to go ends the run as **Failed**. If your site is down, that's exactly what you'd want to know.

## 5. Set the limits

Every run has three limits, so it can never run away with your time or money. They're on the button in the toolbar that reads `5 loops · 300 s · $0.25`. Click it and set:

* **Loops:** 1. This flow doesn't repeat anything.
* **Time:** 60 seconds.
* **Spend:** $0.05. A run of this flow costs far less than a cent, so this is plenty.

The run stops at whichever limit it reaches first. You'll learn more about limits in [Tutorial 2](https://www.quietrobot.ai/docs/playground/tutorials/approvals-and-limits).

## 6. Simulate, then run

1. Choose **Simulate**. In a second or two, the panel on the right shows a **Forecast**: what a run will typically cost and how long it will take, and the most it could ever cost with your limits.
2. Choose **Run**.

Each box lights up as its step runs. A green check means the step passed. The arrows the run took turn solid, and the ones it didn't take fade.

<figure class="shot">
  <img class="art-light" src="/docs/playground/tutorials/first-flow-run-light.webp" alt="A finished run: all three boxes on the path have green checks, the run ended at All good, and the panel on the right lists each step with its output." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/tutorials/first-flow-run-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>A finished run. The panel on the right lists every step with what it printed, and compares the run with the forecast.</figcaption>
</figure>

## 7. Read the run

The panel on the right is the run's story, step by step:

* **Fetch my homepage** says how many bytes it got.
* **Is the page right?** says **Yes** and shows the check it ran.
* **All good** is where the run finished.

Under **Against the forecast**, you can see what the run actually cost and how long it took, next to what the forecast expected. Choose **Open full run** to see every step's full output, which is handy when something fails and you want to know why.

Try it the other way: change the phrase in **Is the page right?** to something that isn't on your page, and run again. This time the run ends at **Needs a look**.

## What you learned

* A **flow** is steps joined by arrows. Each step has exits, like **Passed** and **Failed** or **Yes** and **No**, and the run follows the arrow from the exit that happened.
* An exit with no arrow ends the run.
* **Simulate** shows the likely cost before you run, and the **limits** make sure a run can't go past what you set.

## Next

In [Tutorial 2](https://www.quietrobot.ai/docs/playground/tutorials/approvals-and-limits), you'll make a flow stop and wait for your OK before it does something that can't be undone, and approve it from your phone. Later, in [Tutorial 6](https://www.quietrobot.ai/docs/playground/tutorials/triggers), you'll make this website check run on its own every morning.
