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.

はじめる前に

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

エージェント名

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

Test Optimizer

optimize-test

bbc-system-optimize-test

bitbucket-default-optimize-test-agent

Test Cleanup

cleanup-test

bbc-system-cleanup-test

bitbucket-default-cleanup-test-agent

Required scopes

The required scopes needed to run all default system agents are:

  • read:repository:bitbucket

  • write:repository:bitbucket

  • read:pipeline:bitbucket

  • read:pullrequest:bitbucket

  • write:pullrequest:bitbucket

  • test:read:bitbucket

What Bitbucket adds to your configuration

All steps for the injected custom pipelines use config: default, so you can modify the step config by defining a default step config.

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

For the flaky test trigger, the added configuration is equivalent to this:

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

For the optimize test trigger, the added configuration is equivalent to this:

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

For the cleanup test trigger, the added configuration is equivalent to this:

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

Set a default provider for system agents

To set a default provider for all agents, including system agents, add the following configuration at the top level of your bitbucket-pipelines.yml:

definitions: agents: default: provider: claude # one of rovodev, claude, or codex

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 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.


 

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。