---
title: Recipe: Dependency upgrade bot · Agent Playground docs
description: Tries three upgrade plans in separate copies, keeps the boldest one whose tests still pass, and asks a person before the pull request. What it does, when to use it, how to make it yours, and what a run costs.
url: https://www.quietrobot.ai/docs/playground/recipes/dependency-upgrades
---

# Recipe: Dependency upgrade bot

Tries three upgrade plans in separate copies, keeps the boldest one whose tests still pass, and asks a person before the pull request. What it does, when to use it, how to make it yours, and what a run costs.

Tries three upgrade plans at the same time, each in its own copy of the project: patches only, patches and minor versions, and everything to the latest. It keeps the boldest plan whose tests still pass, then asks a person before opening a pull request.

| At a glance | |
|---|---|
| **Category** | Coding |
| **Shape** | Parallel lanes, then a person |
| **Plan** | Pay as you go (runs 4 sandboxes at once) |
| **Needs a Claude key** | No |
| **Limits it comes with** | 1 loop, 900 seconds, $0.05 |

```flow
{"title": "Dependency upgrade bot, as it is on the canvas.", "nodes": [["setup", "run", "Check out the app"], ["outdated", "run", "List what's out of date", "no internet"], ["fork", "fork", "Fork ×3", "lanes Patch, Minor, Latest"], ["patch", "run", "Patches only", "Lane Patch · no internet"], ["minor", "run", "Patches and minors", "Lane Minor · no internet"], ["latest", "run", "Everything to latest", "Lane Latest · no internet"], ["judge", "judge", "Most upgrades, tests pass", "highest upgraded"], ["approve", "approval", "Open the pull request?"], ["pr", "code", "Draft the pull request"], ["held", "end", "Not opened"]], "edges": [["setup", "outdated"], ["outdated", "fork"], ["fork", "patch"], ["fork", "minor"], ["fork", "latest"], ["patch", "judge"], ["minor", "judge"], ["latest", "judge"], ["judge", "approve", "Passed"], ["approve", "pr", "Approved"], ["approve", "held", "Denied"]]}
```

<figure class="shot">
  <img class="art-light" src="/docs/playground/recipes/dependency-upgrades-light.webp" alt="The Dependency upgrade bot recipe in the builder after a run, with each step's result on the canvas and the run's steps listed on the right." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/recipes/dependency-upgrades-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>A real run of the recipe, waiting at the approval for a person.</figcaption>
</figure>

## When to use it

* Keeping a project's libraries up to date without breaking it.
* Any choice between a careful option and a bold one, where you'd rather try both than guess.
* A weekly schedule that does the upgrade homework, so a person only reviews the result.

## Run it

1. Open **Agent Playground** in the dashboard and find **Dependency upgrade bot** under **Start from a recipe**. In the builder, **Recipes** in the toolbar lists them too.
2. Choose **Use this recipe**. It becomes a flow of your own, so changing it never changes the recipe.
3. Choose **Simulate** to see the forecast, then **Run**.
4. When the run waits for a person, approve or deny it from the banner, from **Approvals**, or from the approval email.

**What you'll see:** **List what's out of date** finds three upgrades. In the lanes, **Everything to latest** breaks the tests (a library changed in a major version) and drops out. **Patches and minors** upgrades more than **Patches only**, so it wins and becomes the main sandbox. The run then waits at **Open the pull request?**.

## Make it yours

1. Change **Check out the app** to clone your project and install it.
2. In each lane, use your package manager's commands, such as `npm update` for patches and minors or `npm install pkg@latest` for the latest, then your test command, then print `{"upgraded": N}` with the number of libraries it upgraded.
3. Keep **Most upgrades, tests pass** as it is: highest `upgraded` wins, and a lane whose tests failed can't win.
4. Make **Draft the pull request** open a real pull request with a token saved under **Policies → Secrets**, and keep the approval before it.
5. Add a weekly **Schedule** trigger so it runs by itself.

> [!NOTE]
> Each lane is its own sandbox, so this recipe runs four at once: the main one and three lanes. Free runs up to three, so it needs **Pay as you go**.

## What a run costs

These are the builder's own forecast for the recipe as it comes, with its limits, rounded. **Simulate** shows the same numbers for your version, and they change as you change the flow.

| | Typical | 1 in 10 runs | At most |
|---|---|---|---|
| **Sandbox time** | $0.0018 | $0.0025 | $0.06 |
| **How long it takes** | about 2 minutes | about 3 minutes | 900 seconds |

A typical run uses $0.0018 of sandbox time, so about 540 runs cost $1, and every plan includes $5 of usage a month. That includes all 4 sandboxes: the main one and each lane. The time includes a person taking a minute or two to answer the approval. The clock, and the sandbox, keep running while the run waits. **At most** is the most a run could cost with these limits: it stops at $0.05 or 900 seconds, whichever comes first.

## Related

* [Tutorial 4: Try several ideas at once](https://www.quietrobot.ai/docs/playground/tutorials/lanes)
* [Try 3, keep the best](https://www.quietrobot.ai/docs/playground/recipes/try-three)
* [Coding recipes](https://www.quietrobot.ai/docs/playground/recipes/coding)
* [All recipes](https://www.quietrobot.ai/docs/playground/recipes)
