Code

cookbook/agent_concepts/tools/github_tools.py
from agno.agent import Agent
from agno.tools.github import GithubTools

agent = Agent(
    instructions=[
        "Use your tools to answer questions about the repo: agno-agi/agno",
        "Do not create any issues or pull requests unless explicitly asked to do so",
    ],
    tools=[GithubTools()],
    show_tool_calls=True,
)
agent.print_response("List open pull requests", markdown=True)

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.

2

Set your GitHub token

export GITHUB_TOKEN=xxx
3

Install libraries

pip install -U PyGithub agno
4

Run Agent