How to Connect GitHub to an AI Agent: Step-by-Step Guide

· DoubleX

Quick answer

To connect GitHub to an AI agent, add the GitHub connector, authorize your account, choose whether the connection is personal, team, or company-wide, and set which actions the agent may run. In DoubleX Agentes, you do this in the Connectors screen, then test with a read-only request.

Connecting GitHub to an AI agent lets the agent read your repositories, issues, and pull requests without anyone copying and pasting links into a chat. The setup takes a few minutes, and the most important decisions are who can use the connection and what the agent is allowed to do. This guide covers the configuration and the first test.

What can an agent do with the GitHub connector?#

With the GitHub connector, an agent can read repositories, issues, and pull requests, and it can open and comment on pull requests. A connector is a system linked to the platform so that agents can use its tools. Reading and writing are separate permissions, so you decide how far the agent goes.

CapabilityWhat the agent doesNeeds write access?
Read repositoriesLooks at files and project structureNo
Read issuesFinds, summarizes, and sorts issuesNo
Read pull requestsSummarizes changes and open discussionNo
Comment on pull requestsPosts a comment with its findingsYes
Open pull requestsCreates a PR with proposed changesYes

For example requests and recurring routines, see GitHub with an AI Agent: Example Requests and Routines.

What do I need before connecting?#

You need a DoubleX Agentes account, a GitHub account that can access the repositories you want, and at least one agent to use the connection. Creating an account is free and requires no card.

Before you start, check these items:

  • A GitHub account with access to the repositories the agent should see.
  • An agent already created, or the result of your first diagnostic turned into a team of agents. If you are new, the Quickstart walks through that flow.
  • A decision on who should use the connection: only you, a team, or the whole company.
  • A decision on whether the agent should only read or also comment and open pull requests.

How do I connect GitHub in the Connectors screen?#

Open the Connectors screen, add GitHub, and authorize your account. After that, the agents you allow can use the GitHub tools.

  1. Open the Connectors screen in DoubleX Agentes.
  2. Find GitHub in the list (it is in the development category) and start the connection.
  3. Sign in to GitHub and authorize access when prompted.
  4. Choose the connection scope: personal, team, or company.
  5. Open the Agents screen, pick the agent that will use GitHub, and enable the connector for it.
  6. Set which GitHub actions that agent can run (see the permissions section below).
  7. Run a first test from a new conversation.

Credentials for connections, such as tokens and keys, are stored encrypted with AES-256-GCM.

Personal, team, or company connection: which should I choose?#

Choose personal if the connection should only work for you, team if a group shares it, and company if everyone should use the same one. A personal connection is tied to one person, such as your own email account. Team and company connections are shared by more people.

ScopeWho can use itBest for
PersonalOnly youTrying the connector, or work in your own repositories
TeamMembers of a teamAn engineering team reviewing issues and pull requests together
CompanyThe whole companyShared repositories that several areas need to read

Roles also matter: the platform has owner, administrator, and member roles, plus teams and sharing by person, team, or company. If you are unsure, begin with a personal connection and widen it later.

How do I limit what the agent can do (read-only or write)?#

For each agent, you choose which systems it uses and, inside each system, which actions it can run. To make GitHub read-only, leave the actions that change data turned off. To let the agent comment or open pull requests, turn on only those actions.

A practical way to decide:

  • Read-only: best for the first week, for summaries, triage, and questions about the code and issues.
  • Read and comment: the agent can post its findings on pull requests, but it cannot create new ones.
  • Read, comment, and open pull requests: only for agents with a narrow, well-defined job.

Before the agent sends, deletes, or changes anything in your systems, it asks for confirmation and shows the step-by-step of what it did. Permissions and confirmation work together, so even an agent with write access does not act unnoticed.

If you manage connections through code, the Connectors API reference describes how to handle them with API keys.

How do I run the first test and check the history?#

Ask the agent a simple read-only question, then open the Tasks screen to see exactly what it did. Every request to an agent becomes a task with a full history: the request, each tool the agent used, and the result.

Copy-ready requests for your first test:

  • "List the open issues in the repository [name] and group them by topic."
  • "Summarize the latest open pull request in [repository]: what changed and what is still under discussion."
  • "Read the README of [repository] and tell me how a new developer should set it up."
  • "Which pull requests in [repository] have been open the longest?"

Then open Tasks and check three things: who made the request, which GitHub tools the agent called, and whether the result matches what you see on GitHub. If something looks wrong, adjust the agent's instructions or permissions and test again. For other connection walkthroughs, see How to Connect Jam to an AI Agent.

Frequently asked questions#

Does the agent change my code by default?#

No. You choose which GitHub actions each agent can run, and actions that change data can stay off, so the agent only reads. Even when writing is on, the agent asks for confirmation before changing anything.

Can several agents share one GitHub connection?#

Yes. A connector can be enabled for more than one agent, and each agent has its own permissions. One agent can be read-only while another is allowed to comment on pull requests.

Is my code used to train AI models?#

No. Company content is not used to train models, and requests only go to AI providers that do not use what they receive for training. You can also choose zero retention in the Models screen.

Who can see what the agent did?#

Everything is recorded in the task history, including the request, each tool used, and the result. You can see who asked, what was done, and when.

Do I need to write code to connect GitHub?#

No. You connect it in the Connectors screen and describe what you need in your own words. If you want to go further, there is a REST API, a CLI, and an MCP server, described in the Introduction.

Related guides

More GitHub guides