quiet robot

Agent Playground

Data and evals recipes

Five worked examples for data and comparisons: scrape a flaky site with retries, research a question three ways, fix a spreadsheet analysis until it runs, try three ideas at once, and score prompts side by side.

View as Markdown

Each recipe below says what it does, shows its shape, walks through its steps, and ends with how to make it your own. See Recipes for how recipes work.

Scraper with retries

The pattern: a retry loop with a pause. Websites are often busy or slow; this one waits and tries again instead of giving up.

Scraper with retriesStart test site (Run command), Fetch page (Run code), Wait 3 s (Wait), Parse table (Run code), Save (Run command). Arrows: Start test site to Fetch page; Fetch page to Wait 3 s on Failed; Wait 3 s to Fetch page on Next; Fetch page to Parse table on Passed; Parse table to Save.FailedNextPassed>_ RUN COMMANDStart test site{ } RUN CODEFetch page◷ WAITWait 3 s{ } RUN CODEParse table>_ RUN COMMANDSave
Scraper with retries
StepBlockWhat it does
Start test siteRun commandStarts a small website inside the sandbox that answers "busy, try again" the first two times.
Fetch pageRun codeDownloads the page. Fails if the site is busy or can't be reached.
Wait 3 sWaitGives the site a moment, then goes back to Fetch page.
Parse tableRun codeReads the price table out of the page into prices.csv.
SaveRun commandShows how many rows were saved and the first one.

Limits: 5 loops, 240 seconds, $0.05.

What you'll see: Fetch page fails twice ("The site answered 503: will wait and try again"), passes on the third try, and three prices are saved.

Make it yours: delete Start test site and point Fetch page at the real page. Set the flow's Policy to Only these sites with just that site, so the scraper can't reach anything else. Raise Wait for sites that ask you to slow down, and keep Loops low so a site that's down for the day doesn't keep you trying.

Deep research report

The pattern: lanes that research a question three different ways, keep the best-sourced draft, then a loop that checks every claim has a source.

Deep research reportLoad the library (Run command), Fork ×3 (Try in parallel), Skim each page (Run command), Search for keywords (Run command), Read everything (Run command), Most sourced claims (Keep the best), Every claim sourced? (Run command), Find a source or cut it (Run code), Write the report (Run code). Arrows: Load the library to Fork ×3; Fork ×3 to Skim each page; Fork ×3 to Search for keywords; Fork ×3 to Read everything; Skim each page to Most sourced claims; Search for keywords to Most sourced claims; Read everything to Most sourced claims; Most sourced claims to Every claim sourced? on Passed; Every claim sourced? to Find a source or cut it on Failed; Find a source or cut it to Every claim sourced? on Passed; Every claim sourced? to Write the report on Passed.PassedFailedPassedPassed>_ RUN COMMANDLoad the library⑂ TRY IN PARALLELFork ×3Skim, Search, Deep>_ RUN COMMANDSkim each pageLane Skim>_ RUN COMMANDSearch for keywordsLane Search>_ RUN COMMANDRead everythingLane Deep★ KEEP THE BESTMost sourced claimshighest sourced>_ RUN COMMANDEvery claim sourced?{ } RUN CODEFind a source or cut it{ } RUN CODEWrite the report
Deep research report
StepBlockWhat it does
Load the libraryRun commandWrites four short articles about free shipping for a small shop: the research library.
Skim, Search, Read everythingRun command, one per laneThree ways to draft an answer, each with the network off. "Read everything" collects the most, including two claims with no source behind them.
Most sourced claimsKeep the bestKeeps the draft with the most claims that cite a source.
Every claim sourced?Run commandFails if any claim has no source, and lists them.
Find a source or cut itRun codeFor the first unsourced claim: cites the article that backs it, or cuts it.
Write the reportRun codeWrites report.md with numbered sources.

What you'll see: the deepest draft wins, but it has two unsourced claims. The check loop finds a source for one and cuts the other ("Free shipping always pays for itself within a month" has nothing behind it), and the report comes out with every claim cited.

Make it yours: load your own documents in the first step, and make each lane an Agent or Ask AI step that drafts from them in a different style, printing {"sourced": N} at the end. Keep the source check exactly as it is: it's what stops a made-up claim reaching the report.

Analyze my spreadsheet

The pattern: a loop that reads its own errors. Real spreadsheets have messy cells; the analysis crashes, reads why, and tries again.

Analyze my spreadsheetLoad the spreadsheet (Run command), Look at the data (Run code), Write the analysis (Run command), Run the analysis (Run command), Read the error, fix it (Run code), Show the summary (Run command). Arrows: Load the spreadsheet to Look at the data; Look at the data to Write the analysis; Write the analysis to Run the analysis; Run the analysis to Read the error, fix it on Failed; Read the error, fix it to Run the analysis on Passed; Run the analysis to Show the summary on Passed.FailedPassedPassed>_ RUN COMMANDLoad the spreadsheet{ } RUN CODELook at the data>_ RUN COMMANDWrite the analysis>_ RUN COMMANDRun the analysisno network{ } RUN CODERead the error, fix it>_ RUN COMMANDShow the summary
Analyze my spreadsheet
StepBlockWhat it does
Load the spreadsheetRun commandWrites a small sales sheet with some messy amounts: "1,200.50", n/a and a blank.
Look at the dataRun codeCounts rows and columns and how many amounts aren't plain numbers.
Write the analysisRun commandWrites a first, simple analysis script.
Run the analysisRun commandRuns it with the network off. On a crash, prints the last line of the error.
Read the error, fix itRun codeReads that error and writes a better script.
Show the summaryRun commandShows sales by region and saves a bar chart as chart.svg.

Limits: 4 loops, 180 seconds, $0.05. If stopped, go back to: Write the analysis.

What you'll see: the first try crashes on 1,200.50, the second on n/a, and the third skips what it can't read and finishes: sales by region, the top region, and how many rows were left out.

Make it yours: upload your own sheet in the first step (or download it), and replace Read the error, fix it with an Agent whose goal is "The analysis crashed with this error: {output of Run the analysis}. Fix analysis.py." Its Check that it worked can be the analysis itself.

Try 3, keep the best

The pattern: parallel lanes, fastest correct answer wins.

Try 3, keep the bestSet 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
StepBlockWhat it does
Set upRun commandWrites a benchmark: 4,005 numbers to sort, with a few repeats.
Fork ×3Try in parallelCopies the sandbox into lanes A, B and C.
Insertion sort, Built-in sort, Dedupe + sortRun command, one per laneEach sorts the numbers its own way, checks the answer, and prints {"ok": ..., "ms": ...}.
JudgeKeep the bestNumber to compare: ms. Best is: Lowest.
Keep winnerRun commandRuns in the winning sandbox.

Limits: 1 loop, 180 seconds, $0.05.

What you'll see: lane C is fast but wrong (it drops the repeats), so it fails and drops out. Lanes A and B are both right, and B is far faster, so it wins.

Make it yours: put three approaches in the lanes: three libraries, three settings, three prompts to an agent. Each lane must print a JSON line with the number to compare, and fail if its answer is wrong, so a fast wrong answer can never win.

Eval harness

The pattern: parallel lanes, best score wins. The same as above, but with a score to maximize instead of a time to minimize.

Eval harnessLoad test set (Run command), Fork ×3 (Try in parallel), Terse prompt (Run command), Step by step (Run command), With examples (Run command), Best score (Keep the best), Report (Run command). Arrows: Load test set to Fork ×3; Fork ×3 to Terse prompt; Fork ×3 to Step by step; Fork ×3 to With examples; Terse prompt to Best score; Step by step to Best score; With examples to Best score; Best score to Report on Passed.Passed>_ RUN COMMANDLoad test set⑂ TRY IN PARALLELFork ×3lanes T, S, E>_ RUN COMMANDTerse promptLane T>_ RUN COMMANDStep by stepLane S>_ RUN COMMANDWith examplesLane E★ KEEP THE BESTBest scorehighest score>_ RUN COMMANDReport
Eval harness
StepBlockWhat it does
Load test setRun commandWrites six questions with known answers, and a scorer.
Fork ×3Try in parallelLanes T, S and E.
Terse prompt, Step by step, With examplesRun command, one per laneScores one prompt style against the questions and prints {"score": ...}.
Best scoreKeep the bestNumber to compare: score. Best is: Highest.
ReportRun commandNames the winning prompt. Its sandbox is kept.

What you'll see: "With examples" gets all six right and wins. The other two each miss at least one.

Make it yours: replace each lane with an Ask AI step (or a script that calls Claude through your key) that answers your test set with one prompt, followed by a Run code step that scores the answers and prints {"score": ...}. Run it again after each prompt change, and use Compare to see which answers changed.

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