# Give your agents their own sign-ins with service accounts

A service account is a sign-in that belongs to a workspace instead of a person. Agents use it to work in apps like Gmail, Linear and Jira. Here is how to add one, who can manage it, and what revoking does.

When an agent sends an email or files a ticket, it has to sign in to that app as someone. Without a service account, that someone is usually you: the agent borrows your personal connection. A service account is a sign-in that belongs to a workspace instead, so the team's agents work through an account the workspace controls.

## Where to find them

Open Settings, then Service accounts, under Organisation. The page has two parts:

- **Your integrations.** The apps you have connected for yourself. Their tools work in your own chats. This is the same list and the same gallery you get from Connect tools.
- **Agent identities.** The service accounts for one workspace. Pick the workspace at the top of the section, and you see the sign-ins that workspace's agents use.

If your plan does not include connected apps, the page explains service accounts instead and offers an upgrade. The plan comparison on the Billing page shows which plans include them.

## How a service account is set up

Each service account pairs an **agent role** with an **app**. The role is a short name you choose, such as "mailer" or "triage", and the list shows it as "mailer → gmail". An agent role gets one sign-in per app in a workspace, so you can always see which account an agent acts as.

To add one, a workspace owner or admin chooses **Connect via OAuth**, picks the app, types the agent role, and optionally a display name such as the shared address. GPTree gives you a link to the app's own sign-in page. Open it, approve access there, and the sign-in is added to the workspace.

**Register directly** is for the cases where you already hold a long-lived token for an app GPTree connects to itself. Apps that GPTree connects through a partner only connect through the OAuth flow.

## Who can do what

- Workspace **owners and admins** can add and revoke service accounts.
- Every **member** of the workspace can see the list, so anyone can check which accounts the agents use.
- Tokens are stored encrypted, and they are never shown back in the list.

Each row shows its status (active, expired or revoked), when it was last used and, if the app gave one, when the access expires.

## What revoking does

Choose **Revoke** on a row. From that moment agents stop using that sign-in. GPTree deletes the stored tokens and, where the app allows it, cancels the access on the app's side as well. The row stays on the list, marked revoked, so you can still see that it existed and when it was last used.

To use that app again, connect it again.

## Two common setups

**A shared mailbox.** Give a "mailer" role the team's Gmail account. An agent that sends email then sends from the team address, and replies come back to the team inbox rather than to yours.

**Issue triage.** Connect Linear or Jira to the workspace as the team's ops account. An agent that files or updates issues does it as that account, so the issue history shows the team account instead of a person.

## Client workspaces

If you run agents for clients, connect each client's apps to that client's workspace. An agent pointed at a client workspace uses only that workspace's sign-ins. It never falls back to your personal connections, so work for a client never reads from your own accounts. See "Running an agent for a client" for the full setup.
