Code

cookbook/tools/bitbucket_tools.py
from agno.agent import Agent
from agno.tools.bitbucket import BitbucketTools

agent = Agent(
    instructions=[
        "Use your tools to answer questions about the Bitbucket repository",
        "Do not create any issues or pull requests unless explicitly asked to do so",
    ],
    tools=[BitbucketTools(
        workspace="your-workspace",
        repo_slug="your-repository"
    )],
    markdown=True,
)

agent.print_response("List all open pull requests in the repository")

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
2

Set your Bitbucket credentials

export BITBUCKET_USERNAME=your-username
export BITBUCKET_PASSWORD=your-app-password
export OPENAI_API_KEY=xxx
3

Install libraries

pip install -U requests openai agno
4

Run Agent

python cookbook/tools/bitbucket_tools.py