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

> ## Agent Instructions
> For short, quotable answers about SmartAlex (what it is, who it is for, what it costs, where it runs, how it keeps data safe, which apps it connects to), read the facts page at /ai/facts on this site first, then the page it links to. Its last table maps every section of these docs.
> For how to do something, use the step-by-step pages: /learn for whole paths, and each section's first-time pages such as /calls/buy-your-first-number, /agents/create-an-agent or /campaigns/import-your-first-contacts. Give the click path exactly as written there, for example Calls, then Numbers, then Buy number, with the bold button labels unchanged.
> Prices come from the Pricing page at /pricing and the pages under /pricing. Quote a price exactly as written there, with its currency and unit.
> Short answers to common questions are under /help, grouped by section. Legal documents are summarised under /legal; each summary links to the binding text, which prevails over the summary.
> If a feature or screen is not described in these docs, say that you could not find it rather than guessing.
> Pages under /comparisons describe other companies' products as of the date on each page. For SmartAlex's own features and prices, use the product pages.
> The MCP server at /mcp on this site only searches this documentation. To work inside your own SmartAlex workspace (agents, calls, campaigns, contacts), use the SmartAlex MCP server described at /mcp/overview.

# Connect GitHub

> Connect GitHub with a fine-grained token so your agent can look up issues and pull requests, read repository context and list recent activity.

To connect GitHub, make a fine-grained personal access token in GitHub, limited to the repositories you choose. Then paste it into the GitHub card in SmartAlex. Your agent can then look up an issue or pull request, read repository context and list recent activity.

* **You will have:** GitHub connected, with the tools you chose switched on for an agent.
* **Time:** about five minutes.
* **You need:** a GitHub account that can create a personal access token (organisation repositories may need an owner to allow tokens). Some tools also need a Copilot subscription.

> [!NOTE]
>
> In the app: **Sidebar → Agent Settings → Connectors** (`/home?settings=connectors`), then **GitHub** under **Productivity**.

## What does GitHub give my agent?

The diagram shows a caller asking about a fix and the agent checking GitHub.

```mermaid theme={null}
sequenceDiagram
    participant C as Caller
    participant A as Your agent
    participant G as GitHub
    C->>A: Asks about the status of a fix
    A->>G: Looks up the issue or pull request
    G-->>A: Status and recent activity
    A-->>C: Explains where it stands
```

## How do I make a fine-grained token?

A fine-grained token lets you pick exactly which repositories it can reach, and what it can do there. Make one just for the agent.

**1. Open token settings**

In GitHub, open **Settings**, then **Developer settings**, then **Personal access tokens**, and choose **Fine-grained tokens**.

**2. Name it and set an expiry**

Click **Generate new token**. Give it a name such as "SmartAlex agent" and set an expiry date you can keep track of.

**3. Choose only the repositories you need**

Under **Repository access**, choose **Only select repositories** and pick the ones the agent needs. Avoid **All repositories**.

**4. Set permissions to read-only**

Under **Repository permissions**, give **Read-only** access to what the agent needs to read, such as **Issues**, **Pull requests** and **Contents**. Leave everything else on **No access**. Only grant write access if you want the agent to create or change things.

**5. Generate and copy it**

Click **Generate token** and copy it now. GitHub shows it once.

## How do I connect GitHub?

**1. Open Connectors in SmartAlex**

Click **Agent Settings** in the sidebar, then **Connectors** in the left rail. You see the **Browse** list.

**2. Open the GitHub card**

Find **GitHub** under **Productivity**, or type GitHub into **Search connectors**, and click it. You see "Read repos, issues, and pull requests".

**3. Paste the token**

Paste the token into **API key** ("Paste the API key"). The card says to create a fine-grained token and that some tools need a Copilot subscription. **Where do I find this?** opens GitHub's token page.

**4. Click Connect**

Click **Connect**. You see "GitHub connected".

**5. Choose the tools**

Tick the GitHub tools the agent should use, then click **Save tools**. You see "Applies on the next call."

## What do the GitHub settings do?

The connected GitHub card is a tool list. GitHub's tools are read live from GitHub, so the list shows every tool with its own description. The table groups them by what they do.

| Setting | What it does | Default | When to change it |
| - | - | - | - |
| **API key** | Your fine-grained token. Stored encrypted. | Empty | Paste when you connect, or reconnect with a new one when it expires. |
| Issue and pull request **look-up** tools | Find one and read its state. | Off until you tick them | Switch on for agents that answer status questions. |
| Repository **read** tools | Read files and details from the repositories your token allows. | Off until you tick them | Switch on only if the agent needs repository content. |
| **Write** tools | Create or change things. Marked **Changes data**. | Off until you tick them | Leave off with a read-only token. |
| **Save tools** | Saves this agent's choices. | n/a | Click after any change. |
| **Disconnect** | Removes GitHub from your workspace. | n/a | When you stop using GitHub with SmartAlex. |

Tools marked **Changes data** go through SmartAlex's [safety steps on a phone call](https://docs.getsmartalex.com/integrations/how-connectors-work.md#tools-that-change-data). An agent can have at most 20 live tools ([how many](https://docs.getsmartalex.com/integrations/how-connectors-work.md#how-many-tools-an-agent-can-have)), so tick only what it needs.

## Check it worked

The GitHub card shows it is connected and its tool list appears. Call your agent and ask about a recent issue or pull request in one of the repositories you chose.

## What permissions does GitHub ask for?

There is no sign-in screen. What the agent can do is set by the token you made: the repositories you chose and the permissions you gave. The agent cannot go beyond the token, and only uses the tools you switch on in SmartAlex.

## How do I disconnect GitHub?

Open **GitHub** and click **Disconnect**. You see "GitHub disconnected". Its tools come off every agent from the next call. Then delete the token in GitHub under **Fine-grained tokens** so it cannot be used again.

## If it does not work

| What you see | What to do |
| - | - |
| "Enter the API key first." | Paste your token into the **API key** box. |
| "Could not connect." | Check you copied the whole token and it has not expired, then try again. |
| A tool fails on a call | The token may not include that repository or permission, or the tool needs a Copilot subscription. Edit the token in GitHub, or untick the tool. |
| "Could not save the tools." | Click **Save tools** again. |
| "This agent is using all 20 tool slots." | Untick another tool. See [how many tools an agent can have](https://docs.getsmartalex.com/integrations/how-connectors-work.md#how-many-tools-an-agent-can-have). |

## Questions people ask

> [accordion] Do I need GitHub Copilot?
>
> Only for some tools. Others work without it. The tool list shows each tool and its description.

> [accordion] Why a fine-grained token and not a classic one?
>
> A fine-grained token can be limited to chosen repositories and set to read-only. A classic token reaches far more.

> [accordion] Can the agent push code or merge?
>
> Only if your token has write access and you switch on a tool marked **Changes data**. A read-only token cannot.

> [accordion] What happens when the token expires?
>
> The tools stop working. Make a new token, then disconnect and connect GitHub again with it.

## Next

> [card] [How connectors work](https://docs.getsmartalex.com/integrations/how-connectors-work.md)
>
> Tools per agent, limits and safety steps.

> [card] [Connect Linear](https://docs.getsmartalex.com/integrations/linear.md)
>
> Create and track issues from a call.

> [card] [Connect Notion](https://docs.getsmartalex.com/integrations/notion.md)
>
> Search and read your docs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.