> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Github Agent

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:

```python github_agent.py theme={null}
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

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install libraries">
    ```bash theme={null}
    pip install PyGithub
    ```
  </Step>

  <Step title="Set environment variables">
    ```bash theme={null}
    export GITHUB_ACCESS_TOKEN=****
    ```
  </Step>

  <Step title="Run the agent">
    ```bash theme={null}
    python github_agent.py
    ```
  </Step>
</Steps>
