Agent Playground
Agent Playground
Draw what your AI agent should do as boxes and arrows, then run it on real sandboxes. Loops stop themselves, risky steps wait for you, and you see the likely cost before you press Run.
The Agent Playground is a canvas in your Sandboxes dashboard where you draw a job for an AI agent, the way you'd sketch it on a whiteboard. Each box is a step: run a command, ask an AI, wait for a person, try three ideas at once. Each arrow says what happens next, and an arrow can point back to an earlier box to make a loop. When you press Run, every step happens for real, on a sandbox (a small, private Linux computer) that is yours for the run.
What you can build
A few things people build in their first hour:
- A fixer that keeps trying. Run the tests. If they fail, let an AI agent fix the code, then run them again, until they pass or a limit is reached.
- A support helper. Have Claude sort each ticket into refund, bug, question or spam. Questions get a drafted reply, and refunds wait for a person.
- A bake-off. Copy the sandbox three times, try a different idea in each copy, and keep the one that scored best.
- A careful change. Rehearse a database change on a copy of the data, check nothing was lost, and ask a person before the real thing.
You don't have to start from a blank canvas. The Playground comes with 16 recipes, ready-made flows you can run as they are and then change to fit your work.
Why it's safe to let it run
An agent that loops can loop forever, spend money and do things you didn't expect. The Playground is built so that doesn't happen:
- Every run has limits. You set the most loops, the longest time and the most money a run may use. It stops at whichever comes first, even if you close the tab. See Limits and safety.
- You see the cost first. Simulate shows what a run is likely to cost and how long it is likely to take, and the most it could cost, before anything starts.
- Risky steps wait for you. An Approval block pauses the run until a person says yes. Your organization's approval rules apply to every command, and you can add more for one flow.
- Mistakes are easy to undo. The sandbox saves a checkpoint after each step that works. When a limit stops a run, the sandbox goes back to a clean checkpoint.
- Your keys stay out of reach. An AI step uses your own Claude key, and the key never enters the sandbox.
The words we use
| Word | What it means |
|---|---|
| Flow | A drawing of steps and arrows that you save and run. Flows keep their history, so you can go back to an earlier version. |
| Block | One box on the canvas: a step, a decision, an approval, a finish line. See Blocks. |
| Arrow | Connects one block to the next. Most blocks have two exits, like Passed and Failed, so the flow can take a different path when something goes wrong. |
| Run | One time a flow plays from start to finish, on real sandboxes. |
| Recipe | A ready-made flow to start from. |
| Template | The software a sandbox starts with, such as Python or Node. Every flow picks one. See Templates. |
| Limits | A run's caps on loops, time and money. |
| Checkpoint | A saved copy of the sandbox after a step that worked. You can go back to one or start a new sandbox from it. |
Where to go next
- Quickstart: run a recipe, then build your own flow in about ten minutes.
- Blocks: what each block does and when to use it.
- AI steps and agents: Ask AI, Agent and Agents together, with your Claude key.
- Graph shapes: branches, loops, parallel lanes and joins.
- Triggers: start a flow on a schedule, from a webhook or on GitHub events.
- Recipes: 16 worked examples.
Prefer text to boxes? Press JSON in the builder to edit a flow as JSON. Developers can do everything here from code too: see the Flows API, the SDK and CLI, and the MCP tools that let an AI app build and run flows for you.