> For the complete documentation index, see [llms.txt](https://docs.bito.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bito.ai/ai-architect/installation/install-ai-architect-self-hosted/connect-bito-ai-architect-to-github-create-a-github-app.md).

# Connect Bito AI Architect to GitHub — Create a GitHub App

This guide walks you through creating a **GitHub App** in your own GitHub account or organization. You will use three values from it while setting up AI Architect so it can securely read and index your repositories.

* ⏱️ **Time required:** about 10 minutes
* 🔐 **You stay in control:** the App and its private key belong to *you* and stay in your own AI Architect setup. You can revoke access at any time.
* 🌐 **Works on:** GitHub.com **and** GitHub Enterprise Server (self-hosted GitHub).

At the end you will have three values to use while setting up AI Architect:

<table><thead><tr><th width="121.79998779296875">#</th><th width="263.4000244140625">Value</th><th>Looks like</th></tr></thead><tbody><tr><td>1</td><td><strong>App ID</strong></td><td>A number, e.g. <code>123456</code></td></tr><tr><td>2</td><td><strong>Installation ID</strong></td><td>A number, e.g. <code>987654321</code></td></tr><tr><td>3</td><td><strong>Private key</strong></td><td>A file ending in <code>.pem</code></td></tr></tbody></table>

***

### ⚡ Quick start — jump straight to the creation page

Click the link that matches where your code lives:

* **Organization repos (recommended)** → `https://github.com/organizations/YOUR-ORG/settings/apps/new` *(replace `YOUR-ORG` with your organization name)*
* **Personal account repos** → [**https://github.com/settings/apps/new**](https://github.com/settings/apps/new)
* **GitHub Enterprise Server (self-hosted)** → `https://YOUR-GITHUB-HOST/settings/apps/new` *(replace `YOUR-GITHUB-HOST` with your internal GitHub address)*

> 💡 Not sure? Use the **organization** link if your repositories belong to a company or team. Use the **personal** link if they are under your own username.

Then follow Steps 2–7 below.

***

### Step 1 — Open the GitHub App creation page

1. Sign in to GitHub.
2. Open the correct **"New GitHub App"** page using a link from the Quick start above.

   *Manual path (if you prefer clicking through):*

   * **Organization:** Your org → **Settings** → left sidebar **Developer settings** → **GitHub Apps** → **New GitHub App**.
   * **Personal:** Profile photo (top-right) → **Settings** → **Developer settings** (bottom of left sidebar) → **GitHub Apps** → **New GitHub App**.

***

### Step 2 — Fill in the basic details

| Field                | What to enter                                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **GitHub App name**  | Any unique name, e.g. `Bito AI Architect` (names are global on GitHub, so add your company if it's taken, e.g. `Bito AI Architect – Acme`). |
| **Homepage URL**     | Your company website, or `https://bito.ai`. Any valid URL works.                                                                            |
| **Webhook → Active** | **Uncheck this box.** Bito does not need webhooks — leaving it off means there is nothing to configure and no callback into your network.   |

> Leave every other field on this page at its default. You do **not** need a "Callback URL", "Setup URL", or "Webhook URL".

***

### Step 3 — Set permissions (least privilege)

Scroll down to **Permissions → Repository permissions** and set only these:

| Permission   | Access        | Why                                                           |
| ------------ | ------------- | ------------------------------------------------------------- |
| **Contents** | **Read-only** | Lets AI Architect read and index your source code.            |
| **Metadata** | **Read-only** | Basic repo info. *(Selected automatically — leave it as-is.)* |

**Leave everything else set to "No access."** That's all AI Architect needs.

***

### Step 4 — Choose where the App can be installed

Scroll to the bottom, under **"Where can this GitHub App be installed?"**:

* Select **"Only on this account"**.

***

### Step 5 — Create the App and copy the App ID

1. Click the green **Create GitHub App** button.
2. You'll land on the App's settings page. Near the top you'll see **App ID** — a number like `123456`.
3. **📋 Copy the App ID and save it.** *(This is value #1 of 3.)*

***

### Step 6 — Generate the private key

1. Still on the App's settings page, scroll to the **Private keys** section.
2. Click **Generate a private key**.
3. GitHub immediately downloads a file named something like `your-app-name.YYYY-MM-DD.private-key.pem`.
4. **💾 Keep this `.pem` file safe.** *(This is value #3 of 3.)*

> ⚠️ GitHub shows the key **only once, at download time.** If you lose it, just generate a new one and delete the old — it's not a problem.

***

### Step 7 — Install the App and copy the Installation ID

1. On the App's settings page, click **Install App** in the left sidebar.
2. Click **Install** next to your account or organization.
3. Choose which repositories AI Architect may access:
   * **All repositories**, or
   * **Only select repositories** → pick the repos you want indexed.
4. Click **Install**.
5. After installing, look at the page's web address (URL). It ends in a number:

   ```
   https://github.com/settings/installations/987654321
                                              ^^^^^^^^^
                                          Installation ID
   ```

   *(For organizations it looks like `https://github.com/organizations/YOUR-ORG/settings/installations/987654321`.)*
6. **📋 Copy that final number — the Installation ID.** *(This is value #2 of 3.)*

> To find it again later: **App settings → Install App → the gear/Configure** button next to your account. The number at the end of that URL is the Installation ID.

***

### ✅ Step 8 — Use these three values while setting up AI Architect

When you configure AI Architect, provide:

* [ ] **App ID** (from Step 5) — e.g. `123456`
* [ ] **Installation ID** (from Step 7) — e.g. `987654321`
* [ ] **Private key file** (from Step 6) — the `.pem` file


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bito.ai/ai-architect/installation/install-ai-architect-self-hosted/connect-bito-ai-architect-to-github-create-a-github-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
