Skip to main content
Build an AgentTeam once and call start() as many times as you like — each call is a fresh run.

Quick Start

1

Run the same team twice

The second call re-executes every task, and task.context only holds the latest input (["Ticket B"]). Previously the second call returned the first run’s output.
2

Keep your own task variables

3

Change team variables between runs

The next start() after a start_for_each(...) batch also picks up the current team.variables.

How It Works

A start() after a finished run resets task state first; a start() after restore_session_state() resumes instead.
astart() follows the same rules. Building a new AgentTeam over the same Task objects is also safe — the inferred chain is idempotent and never duplicates context entries. See Task Graph.

Best Practices

Build the AgentTeam once, then call team.start(request) per request. Each call is isolated — no stale output, no stale context.
Change team.variables and the next start() picks up the new values automatically; copies propagated to tasks on the previous run are dropped first. Tasks with their own variables keep them.
It continues an interrupted run, not a re-execution. The next fresh start() after a resume still reruns and clears the previous inputs.

Batch Runs

Run the same team once per input with start_for_each

Team Checkpoint & Resume

Save and restore team progress across processes