Skip to main content
Run the same team many times over a list of inputs with a single call.

Quick Start

1

Run the team over a list of inputs

Each input dict fills the {{placeholder}} slots in your task templates.
2

Run it asynchronously

astart_for_each is the async twin — same inputs, same result shape.

How It Works

The team runs once per input dict, restoring its original templates afterwards so it stays reusable.

Result Shape

start_for_each returns a plain dict summarising the whole batch. Each entry in items has this shape:

Parameters


Error Handling

Choose whether a failing item stops the batch or is recorded and skipped.
Errors are captured per item; the batch runs to completion.

Common Patterns

Generate bios for many names in one call.
Run the same batch asynchronously.
Map rows from a CSV into inputs.

Best Practices

Placeholders use {{name}} (double braces). This runs through the team’s built-in variables interpolator, not Python’s str.format. Single braces are left untouched.
Use on_error="continue" for bulk jobs where one bad row shouldn’t stop the rest. Use on_error="fail_fast" for evaluation harnesses that must halt on the first failure.
token_usage_total comes from get_token_usage_summary() and reflects cumulative session usage, not just this batch. For finer accounting, reset the team between batches or inspect per-item outputs.
self.variables and the task templates are restored in a finally block after every batch, so you can call start_for_each again — or start() — on the same team without side effects.

AgentTeam

The team class behind batch runs.

Multi-Agent Execution

How teams execute tasks.

Dynamic Variables

How {{placeholder}} interpolation works.

Async Crew Kickoff

Running teams asynchronously.