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
Select the Settings cog on the top navigation bar.
Select Workspace settings.
Select AI, and then select AI features.
Make sure the Agentic Pipelines toggle is on.
Select AI, and then select Agentic Pipelines.
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 |
|
|
|
Flaky test fixer |
|
|
|
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-agentThe 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.ymlalready 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.
Was this helpful?