---
title: Tutorial 4: Try several ideas at once · Agent Playground docs
description: Copy a sandbox into three lanes that run side by side, get a shipping quote in each, and keep the cheapest. The pattern behind bake-offs, A/B tests and comparisons.
url: https://www.quietrobot.ai/docs/playground/tutorials/lanes
---

# Tutorial 4: Try several ideas at once

Copy a sandbox into three lanes that run side by side, get a shipping quote in each, and keep the cheapest. The pattern behind bake-offs, A/B tests and comparisons.

When you're not sure which way is best, you don't have to try them one after another. In this tutorial you'll split a run into three **lanes** that run at the same time, each with its own copy of the files, and then keep the best result. The example asks three shippers for a quote and books the cheapest, but the same shape works for comparing prompts, settings, suppliers or ideas.

**Time:** about 15 minutes. **Plan:** Pay as you go. This flow runs four sandboxes at once (the main one and three lanes), and Free runs up to three. **Cost of a run:** a fraction of a cent.

```flow
{"title": "What you'll build: write the order, ask three shippers at once, keep the cheapest, book it.", "nodes": [["order", "run", "Write the order"], ["fork", "fork", "Ask three shippers", "lanes A, B, C"], ["a", "run", "Quote from shipper A", "Lane A"], ["b", "run", "Quote from shipper B", "Lane B"], ["c", "run", "Quote from shipper C", "Lane C"], ["best", "judge", "Keep the cheapest", "lowest price"], ["book", "run", "Book it"]], "edges": [["order", "fork"], ["fork", "a"], ["fork", "b"], ["fork", "c"], ["a", "best"], ["b", "best"], ["c", "best"], ["best", "book", "Passed"]]}
```

## 1. Write the order

1. In **Agent Playground**, choose **New flow** and name it `Get three shipping quotes`.
2. Click the **Start** step, name it `Write the order`, and set its **Command** to:

```bash
echo '12 boxes, 140 lb, Indianapolis to Denver' > order.txt && cat order.txt
```

Every lane gets a copy of this file, so each shipper quotes on the same order.

## 2. Split into three lanes

1. With **Write the order** selected, click **Try in parallel** in the Blocks panel (under **Sandbox**). Name it `Ask three shippers`.
2. In its settings, set the lanes to `A`, `B` and `C`. You can name lanes anything short, like `Fast` and `Safe`.

When the run reaches this block, it copies the sandbox into three lanes, in about a second.

## 3. Get a quote in each lane

Add three **Run command** steps, one per lane. For each one, set **Run in** to its lane, and connect it from **Ask three shippers**.

| Name | Run in | Command |
|---|---|---|
| `Quote from shipper A` | Lane A | `echo 'Shipper A: $48.20' > quote.txt && cat quote.txt && echo '{"price": 48.20}'` |
| `Quote from shipper B` | Lane B | `echo 'Shipper B: $41.75' > quote.txt && cat quote.txt && echo '{"price": 41.75}'` |
| `Quote from shipper C` | Lane C | `echo 'Shipper C: $52.00' > quote.txt && cat quote.txt && echo '{"price": 52.00}'` |

These commands stand in for asking a real shipper. In your own flow, each lane would call that shipper's website or API, or use an [Agent](https://www.quietrobot.ai/docs/playground/tutorials/ai-steps) to fill in their quote form.

The important part is the last bit of each command: a line of JSON with the number to compare, here `{"price": 48.20}`. That's how the next block knows which lane did best.

## 4. Keep the cheapest

1. Add a **Keep the best** block (under **Sandbox**) and name it `Keep the cheapest`. Connect all three lanes to it.
2. Set **Number to compare** to `price`.
3. Set **Best is** to **Lowest**.

**Keep the best** reads each lane's number, keeps the winning lane as the main sandbox, and deletes the others. Only a lane that passed can win, so a lane whose step failed (say, a shipper's site was down) simply drops out.

Finally, add a **Run command** named `Book it`, connected from **Passed** on **Keep the cheapest**, with:

```bash
echo "Booking with $(cat quote.txt)"
```

It runs in the winning lane's sandbox, so `quote.txt` is the cheapest shipper's quote.

## 5. Run it

Set the limits to **Loops** 1, **Time** 120 seconds and **Spend** $0.05, and choose **Run**.

<figure class="shot">
  <img class="art-light" src="/docs/playground/tutorials/lanes-run-light.webp" alt="A finished run: three lanes ran side by side, Keep the cheapest kept lane B at 41.75, and Book it says Booking with Shipper B." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/tutorials/lanes-run-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>The three quotes run at the same time. Keep the cheapest picks shipper B, and Book it runs in that lane's copy.</figcaption>
</figure>

All three quotes run at the same time, so three take about as long as one. **Keep the cheapest** shows every lane's number and which one it kept: shipper B, at $41.75. **Book it** says `Booking with Shipper B: $41.75`.

## When to use lanes

* **Compare and pick:** three suppliers, three prompts for an AI, three settings for a report. Print the number you care about (`price`, `score`, `seconds`) and let **Keep the best** choose.
* **Try risky options safely:** each lane has its own copy, so a lane that makes a mess can't affect the others. The [Dependency upgrade bot](https://www.quietrobot.ai/docs/playground/recipes/dependency-upgrades) recipe tries three upgrade plans this way and keeps the boldest one that still works.
* **Make a wrong answer lose:** have each lane fail if its answer is wrong, so a fast or cheap wrong answer can never win. The [Try 3, keep the best](https://www.quietrobot.ai/docs/playground/recipes/try-three) recipe shows this.

Each lane is a sandbox, and you pay for each one's time, so three lanes cost about three times one. A short lane still costs a tiny fraction of a cent.

## What you learned

* **Try in parallel** copies the sandbox into lanes that run at the same time.
* **Run in** on each step picks its lane.
* **Keep the best** compares a number each lane prints as JSON, keeps the best lane that passed, and carries on in it.

## Next

In [Tutorial 5](https://www.quietrobot.ai/docs/playground/tutorials/ai-steps), you'll add AI to a flow: one step that drafts a reply with Claude, and an agent that works toward a goal on its own.
