quiet robot

Agent Playground

Recipe: Try 3, keep the best

Copies one sandbox into three, tries a different approach in each, and keeps the fastest one that's right. What it does, when to use it, how to make it yours, and what a run costs.

View as Markdown

Copies one sandbox into three lanes, tries a different way of doing the same job in each, and keeps the fastest one that got the right answer. A wrong answer can never win, however fast it is.

At a glanceNotes
CategoryEvals
ShapeParallel lanes, fastest wins
PlanPay as you go (runs 4 sandboxes at once)
Needs a Claude keyNo
Limits it comes with1 loop, 180 seconds, $0.05
Try 3, keep the best, as it is on the canvas.Set up (Run command), Fork ×3 (Try in parallel), Insertion sort (Run command), Built-in sort (Run command), Dedupe + sort (Run command), Judge (Keep the best), Keep winner (Run command). Arrows: Set up to Fork ×3; Fork ×3 to Insertion sort; Fork ×3 to Built-in sort; Fork ×3 to Dedupe + sort; Insertion sort to Judge; Built-in sort to Judge; Dedupe + sort to Judge; Judge to Keep winner on Passed.Passed>_ RUN COMMANDSet up⑂ TRY IN PARALLELFork ×3lanes A, B, C>_ RUN COMMANDInsertion sortLane A>_ RUN COMMANDBuilt-in sortLane B>_ RUN COMMANDDedupe + sortLane C★ KEEP THE BESTJudgelowest ms>_ RUN COMMANDKeep winner
Try 3, keep the best, as it is on the canvas.
The Try 3, keep the best recipe in the builder after a run, with each step's result on the canvas and the run's steps listed on the right.
A real run of the recipe. The panel on the right lists every step with what it printed.

When to use it

  • Choosing between approaches, tools or settings by measuring them, not guessing.
  • Any comparison where speed matters, but only for correct results.
  • Learning how lanes and Keep the best work.

Run it

  1. Open Agent Playground in the dashboard and find Try 3, keep the best 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.

What you'll see: Lane C is fast but wrong (it drops the repeated numbers), so it fails and drops out. Lanes A and B are both right, and B is far faster, so Judge keeps it and Keep winner runs in its sandbox.

Make it yours

  1. Put three approaches in the lanes: three tools, three settings, three prompts to an agent.
  2. End each lane by printing a JSON line with the number to compare, like {"ms": 182}, and make the lane fail if its answer is wrong.
  3. In Judge, set Number to compare to your number and Best is to Lowest (for time or cost) or Highest (for a score).

Note

This recipe runs four sandboxes at once (the main one and three lanes), so it needs Pay as you go. Free runs up to three.

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.

NotesTypical1 in 10 runsAt most
Sandbox time$0.0004$0.0004$0.0092
How long it takes13 seconds14 seconds180 seconds

A typical run uses $0.0004 of sandbox time, so about 2,700 runs cost $1, and every plan includes $5 of usage a month. That includes all 4 sandboxes: the main one and each lane. At most is the most a run could cost with these limits: it stops at $0.05 or 180 seconds, whichever comes first.

  • Agent PlaygroundQuickstart: build and run your first flow
  • Agent PlaygroundBlocks
  • Agent PlaygroundRecipes
  • SandboxesQuickstart: your first sandbox
  • SandboxesMCP server
  • SandboxesAPI reference