← All integrations

Developer tools

Connect agents to Bitbucket Cloud.

Agents can use the Bitbucket Cloud REST API to read repositories, manage pull requests, and inspect builds. Workflows can start on supported webhook events, subject to the connection's permissions and filters.

5,000 free credits to start.

Agent reach

Bitbucket Cloud REST API

The full surface, searched at run time.

Connect with

  • API key
  • Your own OAuth app

Use an Atlassian API token, a Bitbucket access token, or your own Bitbucket OAuth consumer. Helios registers the webhook for trigger events when you save the connection.

Event triggers

Yes · 6 events

Plus manual, schedule, and signed webhook.

What the agent can do

What agents do with Bitbucket

Helios searches the Bitbucket Cloud REST API at run time. The agent finds the endpoint the task needs and calls it.

  • Call Bitbucket Cloud REST API endpoints with your connection's permissions.
  • Open, comment on, approve, decline, and merge pull requests.
  • Read diffs, commits, branches, and files at any ref.
  • Read build statuses and Bitbucket Pipelines runs, steps, and logs.
  • Create branches and tags, report build statuses, and run pipelines.
  • Start runs on supported pull request, comment, push, build status, and Pipelines trace events.

Examples

Tasks you can hand to a Bitbucket agent

Review every pull request as it opens

The agent reads the diff and the files around it, then leaves a review comment with the risks it found.

bitbucket · pull_request.created

On each new pull request into main: review the diff and comment with the review.

  1. bitbucket·read the pull request and its diff
  2. bitbucket·read the changed files at the source branch
  3. code·check the change against the tests
  4. bitbucket·comment with the review

Reviewed pull request #318

  • The retry loop has no upper bound
  • One new function has no test
  • The migration matches the model change

Explain a failed build

When a build fails, the agent reads the Pipelines logs and tells the author what broke on the pull request.

bitbucket · build_status.updated

When a build fails on a pull request branch, explain the failure on the pull request.

  1. bitbucket·read the failed pipeline and its steps
  2. bitbucket·download the step log
  3. bitbucket·find the open pull request for the branch
  4. bitbucket·comment with the cause

Explained the failure on pull request #322

  • `test_invoice_totals` fails after the rounding change
  • The fix is a one-line change in `totals.py`

Answer questions in pull request comments

When someone asks a question in a comment, the agent looks it up and replies on the same pull request.

bitbucket · pull_request_comment.created

When a pull request comment asks the agent a question, answer it.

  1. bitbucket·read the comment and the pull request
  2. bitbucket·search the code it mentions
  3. bitbucket·reply on the pull request

Replied on pull request #330

  • The config flag is read in `settings.py`
  • It defaults to off in production

Write release notes after a merge

When a pull request merges into main, the agent adds it to the draft release notes and tells the team.

bitbucket · pull_request.merged

When a pull request merges into main, add it to the release notes and post to Slack.

  1. bitbucket·read the merged pull request
  2. notion·append to the release notes draft
  3. slack·post a summary to #releases

Release notes updated

  • Added pull request #335 under Fixes
  • Posted to #releases

Event triggers

Start a run on Bitbucket events

Attach any of these events to a workflow and filter on the fields that matter. Manual, schedule, and signed webhook triggers work too.

EventWhat it means
pull_request.createdA pull request is opened. Filter by repository or destination branch.
pull_request.approvedSomeone approves a pull request, so the agent can check it is ready to merge.
pull_request.mergedA pull request is merged, so the agent can follow up on shipped work.
pull_request_comment.createdSomeone comments on a pull request, so an agent can answer or pick up the follow-up.
repository.pushedCommits or tags are pushed. Filter by branch so only `main` wakes the agent, or by tag for releases.
build_status.updatedA build status changes, such as a Bitbucket Pipelines run. Filter by build state to catch failures.

Works with

Bitbucket works with the rest of your stack

One agent, one run, several services. It reads from one tool and writes to the next in the same sandbox.

FAQ

Questions, answered

Put an agent on Bitbucket.

Connect it once and describe the task in chat. Then reuse the prompt as a workflow on a schedule or a webhook.