---
title: "List agents in a workbook"
method: GET
path: "/v2/workbooks/{workbookId}/agents"
tags: ["Workbooks"]
---

# List agents in a workbook

`GET /v2/workbooks/{workbookId}/agents`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/workbooks/{workbookId}/agents`
- Auth: HTTP bearer

List the Sigma agents defined in a workbook. Use the returned **agentId** and **workbookId** to [run a Sigma agent](https://help.sigmacomputing.com/reference/run-agent). To list agents across every workbook in the organization instead of one workbook, use [List agents](https://help.sigmacomputing.com/reference/list-workbook-agents). For a guide to calling Sigma agents from the API, see [Call Sigma agents with the API](https://help.sigmacomputing.com/docs/call-agents-with-the-api).

### Usage notes
- Retrieve the **workbookId** by calling the [/v2/workbooks](https://help.sigmacomputing.com/reference/list-workbooks) endpoint.

## Path parameters

- `workbookId` string, required

## Query parameters

- `versionTagName` string

## Response `200`

The response body.

- WorkbooksListAgentsInWorkbookResponse200
  - `entries` V2WorkbooksWorkbookIdAgentsGetResponsesContentApplicationJsonSchemaEntriesItems[], required: Array of results returned by the endpoint
    - `agentId` string, required: Unique identifier of the agent within a workbook.
    - `workbookId` string, required: Unique identifier of the workbook.
    - `agentName` string, nullable, required: Display name of the agent.
    - `agentDescription` string, nullable, required: Description of the agent.
  - `nextPageToken` string: A string that can be passed to the `pageToken` parameter in the next request to fetch the next page of results. Not present in the last page of results. **Must be treated as an opaque string.**

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
