llms.txt: machine-readable documentation index. Markdown version of this page is also available.

JetBrains Air Help

Multi-step workflows

An automation does one job well: it reviews, fixes, or reports. To automate a process with several steps – triage a bug, fix it, review the fix – build each step as its own automation and connect them. Each step keeps its own instructions, repository, triggers, and change handling, so you can test, pause, or change one without touching the others.

Connect the steps

There are two ways to make one step start the next:

Connection

How it works

Use it when

Chain

The next automation has an Automation finished trigger. It starts when a run of the previous one finishes successfully and gets that run's summary, links, and pushed branch as input.

The next step needs to know what the previous one did, or the previous step leaves nothing in the repository to react to, such as a report.

Event

The previous step leaves something in the repository or the issue tracker – a pull request, a push, a label – and the next automation's event trigger reacts to it like to anyone else's.

The next step should also run for the same events from people, such as a code review for every pull request, not only the ones an automation opens.

A chain waits only for success: a step that fails or is stopped ends the chain there. An event doesn't check how the previous run ended – whatever it left behind is enough.

Add a step for a person

Some steps can't be done by an agent, such as approving a change, configuring access in an external service, or signing off a release. Make such a step an automation done by a person: when it starts, no agent runs. The run waits until someone does the work and submits a response, which the next step in the chain receives as input.

Nobody is notified when a person's run starts waiting, and it waits without a timeout. Agree on who checks the Automations page for waiting runs.

For a lighter gate, let a person start the next step with an event instead, for example, by adding the label the next automation's trigger waits for.

Example: from bug report to reviewed fix

Issue triage(agent)Person addsthe ai-fix labelFix bug(agent)Code review(agent)labels andcommentsIssue | LabeledPull request |Opened
  1. Issue triage starts on every new issue, sets its type and priority labels, and comments with the relevant files.

  2. A person reads the triage and adds the ai-fix label to the bugs an agent should take.

  3. Bug fix starts on that label, reproduces the bug in a test, fixes it, and opens a pull request.

  4. Code review starts on the new pull request, as on any other.

Every step here is connected by an event, so each one also works on its own: people can label bugs that triage never saw, and the review covers pull requests that people open. For a workflow connected by a chain, see Review the pull request after the tests are in.

Keep a workflow under control

  • Every step is a run – and every run spends AI credits. A workflow of four steps costs four runs each time it goes through.

  • Watch for loops – nothing stops two automations that start each other, through a chain or through events. A fix for a failed build opens a pull request whose build can fail again and start another fix – see Keep it to the builds that matter. Make sure every loop has a step that can end it, or pause one of the automations to break it – see Pause and resume an automation.

  • Follow a chain back – a chained run's page names the automation that started it and links to that run.

23 November 2026