Skip to main content
risky_changes lists the commits since a ref, then gives them to an agent step that decides which are risky to ship. Which diffs it reads depends on what each commit changed, so a fixed list of steps can’t do it.

Set up the agent step

The review step’s input tells the agent what to do and what to return:
  • prompt is the task, with the commits filled in from the step before.
  • tools lists the only tools the agent may call.
  • maxIterations caps the model rounds. Each round is one model call.
  • outputSchema is the shape of the answer, which later steps read as {{review.output}}.

Run it

The agent reads every commit’s changed files, then the diffs of the ones that look risky:
The answer matches outputSchema. iterations is how many rounds the agent took, and final is false when it ran out of rounds before answering:

Iterate with map and reduce

Run steps once per item instead of one agent over the list.

Agents

Write an agent file to reuse as agent__<name>.

Debug a plan

Step through a run in the workbench.