@guildai-services/guildai~bitbucket package provides agents with access to the Bitbucket Cloud REST API through Guild’s OAuth 2.0 integration.
Authentication
- Type: OAuth 2.0
- Token expiration: 1 hour (auto-refreshed)
- Note: Only Bitbucket Cloud is supported — not Bitbucket Server or Data Center
Setup
1
Open Credentials
Go to Credentials in Guild.
2
Connect Bitbucket
Click Bitbucket and authorize Guild to access your account.
3
Grant access
Select the workspaces and repositories to authorize.
Usage
Selecting specific tools
Agents perform better with fewer tools. Usepick() to include only what your agent needs. Tools are named with the bitbucket_ prefix.
API endpoints
Workspaces
Workspaces
Repositories
Repositories
Branches
Branches
Commits
Commits
Pull requests
Pull requests
Issues
Issues
Source & diffs
Source & diffs
Webhook events
Bitbucket uses a trigger-scoped webhook model — each trigger gets its own dedicated webhook with a unique secret.
Triggers require a
workspace_slug and optionally a repo_slug to scope webhooks to a specific workspace or repository.
Package version
The@guildai-services/guildai~bitbucket package is on the 2.x release line. The 2.x package is a code-generated client built directly from Bitbucket’s OpenAPI specification, replacing the hand-maintained 1.x package.
If you are migrating an agent that was written against the 1.x package, review your tool names — some operation identifiers changed between versions. All operations follow the same bitbucket_<method>_<path> naming convention as before, but paths may have been normalized.
Limitations
- Only Bitbucket Cloud is supported (not Bitbucket Server or Data Center)
- Each trigger creates a separate webhook on the repository