Turn bug reports into fix pull requests
Label an issue as a bug, and an automation picks it up: it finds the root cause in the code, writes a test that reproduces the bug as reported, fixes the cause rather than the symptom, runs the test and the related regression tests, and opens a pull request that references the issue. If it can't fix the bug, it posts what it found as a comment on the issue, so the person who takes it over starts from there.
You build it from the Fix Bug template. The label is the gate: the automation works only on the issues someone decided are worth handing to an agent.
Before you start
Agree on a label for the issues the agent should take, for example,
bugorai-fix. A label that only some people add keeps the automation away from bugs that need a design decision.The agent proves its fix by running tests. If they need specific tools, services, or secrets, create an environment configuration for the repository first.
Set up the automation
Fix labeled GitHub or GitLab issues
On the Automations page, click New Automation. In Instructions, click Use Template and select Fix Bug under By Air.
Select the repository, or its environment configuration.
In Triggers, add , or , and enter the label in Label name.

Set checkout to the branch fixes are based on, and the change handling to Create a PR – Create an MR on GitLab.
Click Create.
Fix labeled Jira issues
Make sure that Jira is connected to Air Teams – see Connect Jira – and that you have a Jira connector, so the agent can read the issue and comment on it.
On the Automations page, click New Automation. In Instructions, click Use Template and select Fix Bug under By Air.
Select the repository with the code, or its environment configuration.
In Triggers, add , enter the label and the project key, and set the change handling to Create a PR. If your team hands work over by status rather than by label, use Issue status changed to instead.
In Connectors, add the Jira connector, and click Create.
Tell it how your team ships a fix
The template already insists on a reproducing test and a root-cause fix. Add what a fix needs in your repository at the end of the instructions. For example:
Go further
Label bugs automatically – an issue triage automation can set the
buglabel on new issues. Use a separate label for the fix, so a person still decides which bugs the agent takes.Review the fix – if you have a code review automation on , it reviews the fix pull request like any other.
Start from production errors – to fix an error your monitoring reports rather than a filed issue, start the automation from an incoming webhook and send the error in the payload, or add a connector such as Sentry so the agent reads the stack trace itself – see Incoming webhooks.