---
title: Recipe: First look at an alert · Agent Playground docs
description: Pulls the logs for an alert, asks Claude for likely causes, runs read-only checks, and asks a person before any restart. 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/alert-first-look
---

# Recipe: First look at an alert

Pulls the logs for an alert, asks Claude for likely causes, runs read-only checks, and asks a person before any restart. What it does, when to use it, how to make it yours, and what a run costs.

Takes the first look at an alert the way a careful person would: pulls the recent logs, asks Claude for the likely causes, runs checks that can't change anything, and asks a person before the one step that can, a restart. Either way, it writes a summary.

| At a glance | |
|---|---|
| **Category** | Safety |
| **Shape** | AI, checks, and a person before a restart |
| **Plan** | Free and up |
| **Needs a Claude key** | Yes |
| **Limits it comes with** | 1 loop, 900 seconds, $0.10 |

```flow
{"title": "First look at an alert, as it is on the canvas.", "nodes": [["logs", "run", "Pull the logs"], ["causes", "model", "Likely causes"], ["diag", "run", "Run read-only checks", "no internet"], ["needed", "branch", "Is a restart needed?"], ["restart", "run", "Restart the worker", "no internet · asks a person first"], ["leave", "run", "Leave it running"], ["summary", "code", "Write the summary"]], "edges": [["logs", "causes"], ["causes", "diag", "Either way"], ["diag", "needed"], ["needed", "restart", "Yes"], ["needed", "leave", "No"], ["restart", "summary", "Either way"], ["leave", "summary"]]}
```

<figure class="shot">
  <img class="art-light" src="/docs/playground/recipes/alert-first-look-light.webp" alt="The First look at an alert recipe open in the builder, ready to run." width="1440" height="900" loading="lazy">
  <img class="art-dark" src="/docs/playground/recipes/alert-first-look-dark.webp" alt="" width="1440" height="900" loading="lazy">
  <figcaption>The recipe in the builder. It needs your Claude key before it can run.</figcaption>
</figure>

## When to use it

* An alert fires at 2 a.m. and you'd like the first ten minutes of looking done before anyone wakes up.
* You want AI to suggest causes, but nothing changed on a real system without a person's OK.
* A monitoring tool can call a webhook when it alerts.

## Run it

1. Open **Agent Playground** in the dashboard and find **First look at an alert** 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. If you haven't yet, [save your Claude key](https://www.quietrobot.ai/docs/playground/ai-steps#add-your-claude-key) under **Policies → Secrets**. The builder offers **Go to Secrets** if it's missing.
4. Choose **Simulate** to see the forecast, then **Run**.
5. 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:** Claude lists three likely causes, the read-only checks find a stuck job, and the run waits before **Restart the worker**. Whether you approve or deny, **Write the summary** writes up the alert, the likely causes, the checks and what was done, because the arrow from the restart uses **Either way**.

## Make it yours

1. Fetch your real logs and status in **Pull the logs**, using a key saved under **Policies → Secrets** for any service it calls, so the key never enters the sandbox.
2. Keep every check in **Run read-only checks** read-only.
3. Keep **Ask a person first** on **Restart the worker**, and on anything else that changes a system.
4. Start it from your monitoring tool with a **Webhook** trigger, and pass the alert in. Claude can read it as `{{trigger}}`.
5. Send the summary to your team chat or ticket system.

## 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.0002 | $0.0003 | $0.03 |
| **Claude, on your key** | $0.0022 | $0.0022 | the run's spend limit |
| **How long it takes** | 20 seconds | 23 seconds | 900 seconds |

A typical run uses $0.0002 of sandbox time, so about 4,000 runs cost $1, and every plan includes $5 of usage a month. 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. Claude is billed by Anthropic to your own key, at their usual prices. The run counts it toward its spend limit, so it can't overspend, but we don't charge you for it. **At most** is the most a run could cost with these limits: it stops at $0.10 or 900 seconds, whichever comes first.

## Related

* [Tutorial 5: Add AI to a flow](https://www.quietrobot.ai/docs/playground/tutorials/ai-steps)
* [Tutorial 2: Ask a person before anything real happens](https://www.quietrobot.ai/docs/playground/tutorials/approvals-and-limits)
* [Safety recipes](https://www.quietrobot.ai/docs/playground/recipes/safety)
* [All recipes](https://www.quietrobot.ai/docs/playground/recipes)
