> For the complete documentation index, see [llms.txt](https://docs.portainer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.ai/portainer-command/using-portainer-command/admin/connections.md).

# Connections

**Connections** lists every agent connection on the instance, across all users. Each connection lets an agent act as the person who created it, using their own Portainer credential. Users create and manage their own connections on [Connect your agent](/portainer-command/using-portainer-command/connect-your-agent.md).

## View connections

The summary cards show the number of **Active connections**, and how many active connections have **no expiry**. Click a card to filter the table.

The table shows each connection's **Owner**, its **Sessions** (active and total), when it was **Last used**, its **State**, and when it **Expires / ended**. Use the search box, the state filter, and the sort menu to narrow the list.

A **Cleanup pending** state means the connection has ended, but Portainer-Command is still taking back what it held. Portainer-Command keeps retrying until it's done.

<figure><img src="https://1938785147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fypmd3gtxKLcOeVHnIvOD%2Fuploads%2FNLbVwGnaGzMSTY6O4ITW%2Fcommand-connections-1.png?alt=media&amp;token=7934527f-a7da-4400-84d3-420eeb3f11ac" alt="Connections list"><figcaption></figcaption></figure>

## Connection details

Click a connection to see:

* **Details**: its ID, owner, creation and expiry times, and the Portainer access token it uses.
* **Sessions**: every read-only session it has held.
* **Proposals**: every proposal it has opened.
* **Timeline**: its activity.

If an AI Workspace uses the connection, you can open the workspace or read its conversation. Otherwise, the connection belongs to an agent running outside Portainer-Command, such as an editor or CLI.

Once a connection has ended, a **Teardown** card shows what was cleaned up: its sessions, its Portainer access token, and its workspace.

<figure><img src="https://1938785147-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fypmd3gtxKLcOeVHnIvOD%2Fuploads%2FjFWf6Ci6ztKgNAsL3LVW%2Fcomman-connection-details.png?alt=media&amp;token=1fe571e1-1fd6-4b00-9dcb-ec295839f19b" alt="Connection details"><figcaption></figcaption></figure>

## Revoke connections

Click **Revoke** on a connection's page, or select several connections in the table and click **Revoke**. Then confirm with **Revoke connection**.

Revoking a connection:

1. Stops the agent from authenticating immediately. It can't be reconnected; its owner would have to create a new connection.
2. Ends its sessions.
3. Deletes the Portainer access token Portainer-Command created for it.
4. Destroys a workspace running on it.

Progress is shown step by step. If something doesn't finish, Portainer-Command retries the remaining steps itself.

To revoke everything one person holds at once, use [Emergency halt](/portainer-command/using-portainer-command/admin/users.md#emergency-halt) on their user page.
