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:
from phi.agent import Agent
from phi.tools.github import GithubTools
agent = Agent(
instructions=[
"Use your tools to answer questions about the repo: agno-agi/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
Create a virtual environment
Open the Terminal
and create a python virtual environment.
python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
Set environment variables
export GITHUB_ACCESS_TOKEN=****