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

# List and disconnect agents

> List the agents connected under a person's Sigil and disconnect one.

export const waitlists = {
  earlyAccess: "",
  payments: "",
  openBanking: "",
  developers: "",
  verifiers: ""
};

<Note>
  **Private preview:** this is rolling out and may not be available on your account yet.{waitlists.earlyAccess ? <> <a href={waitlists.earlyAccess}>Request early access →</a></> : null}
</Note>

<Warning>
  **First-party only today.** These calls need a personal access token, which isn't yet open to third-party apps. See [Sign in](/sdk/agents/sign-in).
</Warning>

Each agent a person connects gets its own [agent identity](/concepts/agent-identities) under their Sigil. The person can see every one and disconnect any of them.

Only the person can do this. A request made on their behalf, such as one carrying a Stamped Mandate token, is refused, so one agent can't discover or disconnect another, or itself.

## List connected agents

```ts theme={null}
import { listAgentIdentities, unwrap } from "@sumvin/sdk";

const { data } = unwrap(await listAgentIdentities({ client }));
for (const agent of data) {
  console.log(agent.id, agent.client_id, agent.status, agent.created_at);
}
```

| Field        | Means                                                                                                                 |
| ------------ | --------------------------------------------------------------------------------------------------------------------- |
| `id`         | The agent identity's identifier. Use it to disconnect.                                                                |
| `client_id`  | The application the agent was connected through.                                                                      |
| `status`     | `pending` while it is being set up, `active` when live, `failed` if setup didn't finish, `retired` once disconnected. |
| `generation` | How many times this application has been connected. It goes up each time it is connected again after a disconnect.    |
| `created_at` | When it was connected, in epoch milliseconds.                                                                         |

## Disconnect an agent

```ts theme={null}
import { revokeAgentIdentity } from "@sumvin/sdk";

const { error } = await revokeAgentIdentity({ client, path: { external_id: agent.id } });
```

The agent stops being honoured straight away, including any access it already held. Disconnecting an agent that is already disconnected changes nothing.
