Github is a popular code hosting platform that allows you to collaborate with your team.

Create a file github_agent.py with the following code:

github_agent.py
from phi.agent import Agent
from phi.tools.github import GithubTools

agent = Agent(
    instructions=[
        "Use your tools to answer questions about the repo: phidatahq/phidata",
        "Do not create any issues or pull requests unless explicitly asked to do so",
    ],
    tools=[GithubTools(base_url="enter_base_url_here")],
)

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

Install libraries

pip install PyGithub
3

Set environment variables

export GITHUB_ACCESS_TOKEN=****
4

Run the agent

python github_agent.py