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

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Connect an integration

> Connect GitHub, Slack, Google, Jira, and other services to Guild agents by signing in with OAuth or entering an API key, step by step.

Connect a service once, and your agents can call it through Guild. Most integrations connect by signing in to the service with OAuth. Others take an API key or token. Either way, Guild stores the credential and adds it to each request server-side, so agents never see it.

## Before you begin

* **Pick an account.** Credentials belong to your personal account or to an organization. Connect in the account that owns the workspaces your agents run in.
* **Check your role.** In an organization, connecting a credential that everyone shares requires the **Admin** role. Any member can connect a credential for themselves.
* **Check the integration's page.** Some services need setup on their side first, such as an admin approving the app or an API key with the right permissions. Find your service in the [integrations overview](https://docs.guild.ai/integrations/overview.md).

## Connect an integration

> [tab] Organization
>
> 1. Go to your organization at [app.guild.ai](https://app.guild.ai).
> 2. Open **Access & setup > Credentials**.
> 3. Click **Connect** in the page header. The **Connect an integration** page opens.
> 4. Under **Integration**, click **Select an integration**, search for the service, and select it.
> 5. Choose who can use the credential:
>    * **Anyone in** your organization — a shared credential. Agents use it unless the person running them connected their own. Requires the **Admin** role.
>    * **Just me** — agents use it only when you run them, including triggers you create.
> 6. If you chose **Anyone**, choose where agents can use it: **Everywhere** in the organization, **One workspace**, or **One agent in one workspace**. Pick the workspace or agent when asked. Some integrations can't be limited to one agent.
> 7. Authorize the connection:
>    * **OAuth (sign-in)** — click **Continue to** *integration*. Sign in to the service and approve the access Guild requests. The service returns you to Guild. For a credential everyone shares, sign in with a shared service account rather than your personal one.
>    * **API key** — fill in the key fields the page shows, then click **Connect**.

> [tab] Personal account
>
> 1. Go to your personal account at [app.guild.ai](https://app.guild.ai).
> 2. Open **Access & setup > Credentials**.
> 3. Click **Connect** in the page header.
> 4. Click **Select an integration**, search for the service, and select it.
> 5. Choose where agents can use it: **All my workspaces** or **One workspace**.
> 6. Authorize the connection:
>    * **OAuth (sign-in)** — continue to the service, sign in, and approve the access Guild requests. The service returns you to Guild.
>    * **API key** — fill in the key fields the dialog shows, then click **Connect**.

The credential appears in the **Credentials** list. Agents that call the service now use it, with no change to the agent's code.

## Connect from a session

If an agent needs a service that isn't connected, it can ask for one. The session shows a card to connect the service, and the agent continues once you finish. In an organization, only an admin can complete the card. See [When a credential is missing](https://docs.guild.ai/platform/credentials.md#when-a-credential-is-missing).

## Reconnect or disconnect

To change the account a credential uses, disconnect it and connect again. Disconnecting takes effect immediately, including for sessions that are already running. See [Managing credentials](https://docs.guild.ai/platform/credentials.md#managing-credentials).

## Next steps

> [card] [Credentials](https://docs.guild.ai/platform/credentials.md)
>
> Scope credentials to a workspace, a member, or one agent, and see how Guild picks one.

> [card] [Credential policies](https://docs.guild.ai/platform/credential-policies.md)
>
> Limit what each credential is allowed to do.

> [card] [Integrations overview](https://docs.guild.ai/integrations/overview.md)
>
> Browse every service you can connect.

> [card] [Create an integration](https://docs.guild.ai/services/create-an-integration.md)
>
> Connect a service Guild doesn't list yet.
