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

# List sessions

> List Agent Vault sessions with the Node.js SDK.

`client.agentVault().sessions.list()` lists the [sessions](https://infisical.com/docs/documentation/platform/agent-vault/sessions) in an Agent Vault project. Admins can list every session, and members only their own.

## Parameters

**options** `object` *required*

**properties**

**projectId** `string` *required*

The ID of the [Agent Vault project](https://infisical.com/docs/documentation/platform/agent-vault/projects.md#find-the-project-id) to list sessions from.

**scope** `AgentVaultSessionScope`

Whose sessions to list, either `AgentVaultSessionScope.Mine` (`"mine"`) for your own sessions or `AgentVaultSessionScope.All` (`"all"`) for every session if you're an admin (defaults to `AgentVaultSessionScope.Mine`).

**statuses** `AgentVaultSessionStatus[]`

The statuses to include, from `AgentVaultSessionStatus.Active` (`"active"`), `AgentVaultSessionStatus.Revoked` (`"revoked"`), and `AgentVaultSessionStatus.Expired` (`"expired"`) (defaults to all three).

**search** `string`

Text to find in each session's [label](https://infisical.com/docs/documentation/platform/agent-vault/sessions#label-a-session-and-add-metadata), owner name, owner email, access bundle name, or the name or email of the user that the session was [created on behalf of](https://infisical.com/docs/documentation/platform/agent-vault/sessions-on-behalf-of-users.md).

**metadata** `object`

Only sessions whose [metadata](https://infisical.com/docs/documentation/platform/agent-vault/sessions#label-a-session-and-add-metadata) has every one of these keys with exactly these values (up to 20).

**limit** `number`

The maximum number of sessions to return, from 1 to 100 (defaults to `20`).

**offset** `number`

The number of sessions to skip (defaults to `0`).

## Returns

**result** `ListAgentVaultSessionsResponse`

The sessions in `sessions`, and the total number of matching sessions in `totalCount`.

```typescript Basic theme={"dark"}
const { sessions, totalCount } = await client.agentVault().sessions.list({
  projectId: "<project-id>",
});
```

```typescript With filters theme={"dark"}
import { AgentVaultSessionScope, AgentVaultSessionStatus } from "@infisical/sdk";

const { sessions, totalCount } = await client.agentVault().sessions.list({
  projectId: "<project-id>",
  scope: AgentVaultSessionScope.Mine,
  statuses: [AgentVaultSessionStatus.Active],
  search: "nightly deploy",
  metadata: { runId: "8812" },
  limit: 20,
  offset: 0
});
```

```json Response theme={"dark"}
{
  "sessions": [
    {
      "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "label": "nightly deploy",
      "actor": {
        "type": "machineIdentity",
        "id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
        "name": "deploy-bot"
      },
      "onBehalfOf": null,
      "status": "active",
      "expiresAt": "2026-12-02T13:00:00.000Z",
      "revokedAt": null,
      "createdAt": "2026-12-02T12:00:00.000Z",
      "accessBundle": {
        "id": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
        "name": "release"
      },
      "services": [],
      "metadata": { "runId": "8812" }
    }
  ],
  "totalCount": 1
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.