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")
Create a virtual environment
Terminal
and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your Bitbucket credentials
export BITBUCKET_USERNAME=your-username
export BITBUCKET_PASSWORD=your-app-password
export OPENAI_API_KEY=xxx
Install libraries
pip install -U requests openai agno
Run Agent
python cookbook/tools/bitbucket_tools.py