quiet robot

Recipe: Agent team, a budget each

A writer and a tester work at once in one sandbox, each with its own turn and dollar cap, under a run-wide key budget and a locked network. What it does, when to use it, how to make it yours, and what a run costs.

View as Markdown

Runs two agents at the same time in one sandbox: a writer adds docs and a tester writes tests. Each has its own turn and dollar cap, the whole run has a budget on the Claude key, and the network is locked so nothing in the run can widen it.

At a glanceNotes
LevelAdvanced
CategorySafety
ShapeTwo agents at once, each capped, the key capped too
PlanFree and up
Needs a Claude keyYes
Limits it comes with1 loop, 900 seconds, $0.60
Claude key limit for a run$0.50 of Claude, 40 requests
InternetOff and locked, except Claude through your key
Agent team, a budget each, as it is on the canvas.Set up the module (Run command), Writer and tester (Agents together), Docs and tests there? (Decide), Done (Output). Arrows: Set up the module to Writer and tester; Writer and tester to Docs and tests there? on Done; Docs and tests there? to Done on Yes.DoneYes>_ RUN COMMANDSet up the module◉◉ AGENTS TOGETHERWriter and testerWriter: docs + Tester: tests◆ DECIDEDocs and tests there?⚑ OUTPUTDone
Agent team, a budget each, as it is on the canvas.
Try it nowSimulateRun

Opens it in the Playground as a flow of your own. Simulate shows what a run costs. Run asks before it starts.

The steps

StepBlockWhat it does
Set up the moduleRun commandWrites a small module with two functions, no docs and no tests.
Writer and testerAgents togetherStarts the writer and the tester together. Both must finish.
Writer: docsAgentWriter: adds docstrings and docs/slugs.md. Files only, 6 turns, $0.15 at most.
Tester: testsAgentTester: writes and runs tests/test_slugs.py. 8 turns, $0.20 at most. It's done when the tests pass.
Docs and tests there?DecideChecks the docs exist and the tests pass.
DoneOutputDone.

When to use it

  • Work splits into parts that can happen at once, like code, tests and docs.
  • You need each agent's spend capped, and the run's total capped again, however the agents behave.
  • Agents must not reach anything but their model.

Run it

The quick way: choose Try it now under the drawing. It opens the recipe in the Playground as a flow of your own, after you sign in if you aren't yet. Simulate opens it and shows the forecast, and Run opens it and asks before it starts, with what the run will likely cost. From the dashboard instead:

  1. In the dashboard sidebar, open Agent Playground → Recipes and find Agent team, a budget each. Choose Advanced to filter the list. 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 on the Secrets page. The builder offers Add a key… in the step's key list if it's missing.
  4. Choose Simulate to see the forecast, then Run.

What you'll see: Both agents work at once; open Writer and tester to see each one's turns and spend. If an agent reaches its cap it stops, and its part shows as failed.

Make it yours

  1. Give the team up to six members: agents, commands or code.
  2. Change each agent's caps on its step, under It stops at whichever comes first. The run's key limit is shown in the Policy panel and set in the flow's JSON under policy.keyBudgets. A flow's key limit can only tighten the key's own budget on the Secrets page, never raise it.
  3. Open the network to just what the agents need, for example your package registry, and keep Lock it on.

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.001$0.002$0.01
Claude, on your key$0.11$0.17the run's spend limit
How long it takesabout 2 minutesabout 2 minutes900 seconds

A typical run uses $0.0012 of sandbox time, so about 840 runs cost $1, and every plan includes $5 of usage a month. 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.60 or 900 seconds, whichever comes first.

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