Example

The following agent can manage Bitbucket repositories:
from agno.agent import Agent
from agno.tools.bitbucket import BitbucketTools

agent = Agent(
    instructions=[
        "You are a Bitbucket repository management assistant",
        "Help users manage their Bitbucket repositories, pull requests, and issues",
        "Provide clear information about repository operations",
        "Handle errors gracefully and suggest solutions",
    ],
    tools=[BitbucketTools(
        workspace="your-workspace",
        repo_slug="your-repository"
    )],
)

agent.print_response("List all pull requests for this repository", stream=True)

Toolkit Params

ParameterTypeDefaultDescription
server_urlstr"api.bitbucket.org"Bitbucket server URL (for Bitbucket Server instances).
usernameOptional[str]NoneBitbucket username. Uses BITBUCKET_USERNAME if not set.
passwordOptional[str]NoneBitbucket app password. Uses BITBUCKET_PASSWORD if not set.
tokenOptional[str]NoneAccess token. Uses BITBUCKET_TOKEN if not set.
workspaceOptional[str]NoneBitbucket workspace name (required).
repo_slugOptional[str]NoneRepository slug name (required).
api_versionstr"2.0"Bitbucket API version to use.

Toolkit Functions

FunctionDescription
get_issueGet details of a specific issue by ID.
get_issuesList all issues in the repository.
create_issueCreate a new issue in the repository.
update_issueUpdate an existing issue.
get_pull_requestGet details of a specific pull request.
get_pull_requestsList all pull requests in the repository.
create_pull_requestCreate a new pull request.
update_pull_requestUpdate an existing pull request.
get_pull_request_diffGet the diff/changes of a pull request.
get_pull_request_commitsGet commits associated with a pull request.
get_repository_infoGet detailed information about the repository.
get_branchesList all branches in the repository.
get_commitsList commits in the repository.
get_file_contentGet the content of a specific file from the repository.
You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources