---
title: "Connect and disconnect accounts"
description: "Connect an external account, read its status, test it, and remove it safely."
---

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

# Connect and disconnect accounts

A connection is one external account. Connecting it adds the account to the project. An agent you create cannot use it until you attach it to that agent. Built-in agents marked **system**, such as **Assistant**, can use every connection in the project.

> **Where to find it**
>
> In the sidebar, click **Agents**, then click the **Connections** tab. Gmail
> connects from the **Inbox**. See [Connect Gmail](/connections/gmail).

1. **Connect an account**

   1. In **Connections**, click the provider's card.
   2. Click **Connect** followed by the provider name, for example **Connect Notion**. For a provider that uses a key, click **Use API key** instead.

   ![The Notion detail dialog with the Connect Notion button.](/screenshots/connections/conn-connect-button.webp)

   3. Finish at the provider. For a sign-in provider, choose the account on the provider's page and approve access. For a key, paste it in **API key** and click **Connect**.

   When you return, the card is in the **Connected** section. Use a dedicated account with the least access that the job needs when the provider supports it. See [Browse connection providers](/connections/providers) for how each provider connects.

   Some sign-in providers can hold more than one account. In the dialog of a connected provider, click **Connect another account**. The dialog then shows how many accounts exist, and each agent picks one under its **Connections** settings.
2. **Read the status**

   1. In **Connected**, find the provider's card.
   2. Read the badge in the top right corner of the card.

   ![The Connected section with a status badge on each card: Reconnect, Connected, Token expired and Connection issue.](/screenshots/connections/conn-status.webp)

   | Badge | Meaning | What to do |
   | - | - | - |
   | **Connected** | The account works. | Nothing. |
   | **Token expired** | The saved sign-in no longer works. | Click the card, then click **Reconnect**. |
   | **Reconnect** | The provider rejected the saved credential when AI Agent last used it. | Click the card, then click **Reconnect**. |
   | **Connection issue** | AI Agent could not load the provider's tools, but the provider did not reject the credential. The cause can be a provider outage, a missing permission, or a billing issue at the provider. Reconnecting may not help. | Click the card, then click **Test**. Check the provider's own status and permissions. |
   | **Needs attention** | The provider reports an error for this account. | Click the card, then click **Reconnect**. |
   | **Coming soon** | AI Agent does not support this provider yet. | Nothing. |
3. **Test an account**

   1. Click the provider's card.
   2. Click **Test**. A message says **Working** with the number of tools available, or explains what failed.

   ![The HubSpot detail dialog with the Test button.](/screenshots/connections/conn-test-button.webp)

   **Test** appears for an account that AI Agent can check. It does not change anything at the provider.
4. **Disconnect an account**

   1. Click the provider's card.
   2. Click **Disconnect**.

   ![The HubSpot detail dialog with the Disconnect button.](/screenshots/connections/conn-disconnect-button.webp)

   Most providers disconnect at once and show **Disconnected**. Agents and workflows that use that exact account lose access, so check them first. A connection that belongs to a teammate's personal account shows **Personal to a teammate** instead of **Disconnect**.

   GitHub asks for confirmation first.

   3. In **Disconnect GitHub?**, click **Disconnect**.

   ![The Disconnect GitHub? confirmation with its Disconnect button.](/screenshots/connections/conn-github-disconnect.webp)

   Disconnecting GitHub removes the repositories attached to the project and turns off the Board sources that use the connection. Pull requests stop updating tickets until you reconnect and attach the repositories again. AI Agent also tries to delete the webhooks it created on those repositories and to revoke its access in GitHub. The rules for pull requests and tickets are in [Board and tickets](/core-concepts/board-and-tickets/#ticket-keys-and-pull-requests).

   For other providers, disconnecting in AI Agent stops its use in AI Agent only. To invalidate the grant at the provider as well, revoke AI Agent's access in the provider's settings.

   > **Review dependants before disconnecting**
   >
   > Agents and workflows that use the account lose access when you disconnect it.
   > Check shared automations before you confirm.

## Reuse a GitHub connection

A workspace that has no GitHub connection can reuse the GitHub account that another workspace in the same organization already has. You skip the sign-in at GitHub.

1. Open **Connections** in the workspace that needs GitHub, then click the **GitHub** card.
2. Click **Use** followed by the GitHub login and the other workspace, for example **Use octocat from Acme Store**. The dialog shows one button for each workspace that qualifies.

A toast reads **GitHub connected as** followed by the login, and the card moves to **Connected**. You can then attach repositories.

The buttons show only when all of these hold:

- You are an organization admin.
- The workspace has no active GitHub connection yet.
- The other workspace is in the same organization, you can use its connection, and the connection is active. A personal connection of a teammate does not count.

If the workspace already uses a different GitHub account, AI Agent refuses and asks you to disconnect it first. If the other workspace's connection expired, reconnect it there first. The two workspaces then hold separate connections, so disconnecting one does not remove the other from AI Agent.

## When a member leaves

When a member is removed from the workspace, their personal connections are disabled. Shared connections that they created stay in place.

## Next step

After you connect an account, attach it to the agents that need it and review the tools before you save. See [Control connection tool access](/connections/tool-access).

## Related

- [Control connection tool access](/connections/tool-access)
- [Connections overview](/connections)
- [Troubleshoot connections](/troubleshooting/connections)

Source: https://docs.aiagent.app/connections/connect-and-disconnect/index.mdx
