Default system agents for Agentic Pipelines

Bitbucket ships built-in agents that run from a system trigger, such as the agent that fixes a failed step and the agent that fixes a flaky test. You can turn these on for an entire workspace without writing any YAML. When a default system trigger is enabled, Bitbucket injects the trigger and a custom pipeline to your configuration for you.

Before you begin

All system agents are based on Agentic Pipelines, so Agentic Pipelines must be enabled for the workspace.

Enable a default system trigger

  1. Select the Settings cog on the top navigation bar.

  2. Select Workspace settings.

  3. Select AI, and then select AI features.

  4. Make sure the Agentic Pipelines toggle is on.

  5. Select AI, and then select Agentic Pipelines.

  6. Turn on the toggle for the trigger you want to enable.

Available default system agents

Agent name

System Trigger

Injected Custom Pipeline

Built-in agent it runs

Failed step fixer

fix-failed-step

bbc-system-failed-step-fixer

bitbucket-default-fix-failed-step-agent

Flaky test fixer

fix-flaky-test

bbc-system-fix-flaky-test

bitbucket-default-fix-flaky-test-agent

What Bitbucket adds to your configuration

For the fix failed step trigger, the added configuration is equivalent to this:

triggers: fix-failed-step: - condition: true pipelines: - bbc-system-failed-step-fixer pipelines: custom: bbc-system-failed-step-fixer: - step: config: default auth: system: scopes: - read:repository:bitbucket - write:repository:bitbucket - read:pipeline:bitbucket - read:pullrequest:bitbucket - write:pullrequest:bitbucket script: - agent: bitbucket-default-fix-failed-step-agent

The step uses config: default, so you can modify the step config by defining a default step config.

Your configuration always takes precedence

  • If your bitbucket-pipelines.yml already defines the trigger key, Bitbucket adds nothing for that trigger and your configuration runs as written.

  • If you define a custom pipeline with the same name as the one Bitbucket would add, but no trigger, Bitbucket adds only the trigger and it selects your pipeline.

  • The trigger Bitbucket adds uses condition: true, so it is available on every branch.

Turn a default trigger off for one repository

Define the trigger yourself and point it at no pipelines:

triggers: fix-failed-step: - condition: false pipelines: []

Turn a default trigger off for the whole workspace

Turn the toggle off. Bitbucket then adds nothing to any repository in the workspace, whatever the YAML says. Triggers you have written yourself keep working.

Dynamic Pipelines Providers

Dynamic Pipelines Providers always have the highest priority. The default trigger and its pipeline are added before your configuration is sent to the providers for transformation, so a provider can change or replace them. This is the same order the built-in agents already follow.


 

Still need help?

The Atlassian Community is here for you.