---
title: "List agents"
method: GET
path: "/agents"
tags: ["agents"]
---

# List agents

`GET /agents`

## Query parameters

- `environmentId` string, required — Environment ID
- `isSystem` boolean
- `search` string
- `pageSize` integer — Number of logs to return in a page (default 20)
- `pageNumber` integer — Based on pageSize, which page of records to return

## Headers

- `Authorization` string, required
- `X-Disable-Hooks` 'true', required

## Response `200`

Response with status 200

- TypeAgentsListAgentsResponse
  - `data` TypeAgentsAgent[]
    - `topics` TypeEventsEventTopic[] — The topics the agent should listen for
    - `compiler` 'js' — The compiler of the agent
    - `source` string — The source of the agent
    - `sourceMap` string — The source map of the agent
    - `slug` string — The slug of the agent
    - `options` object — This field is deprecated and will be removed in the future. Use the `template` and `templateOptions` fields instead.
    - `template` 'constraints' | 'autobuild' | 'autocast' | 'webhook-egress' | 'action-listener' | 'automap' — The template of the agent
    - `templateOptions` union — The options for a templated agent.
      - object
        - `template` 'constraints', required — Discriminator value: constraints
        - `namespace` string
      - object
        - `template` 'autobuild', required — Discriminator value: autobuild
        - `namespace` string
        - `autobuildId` string, required
      - object
        - `template` 'autocast', required — Discriminator value: autocast
        - `namespace` string
        - `sheetSlug` string, required
        - `fieldFilters` string[]
        - `options` object
      - object
        - `template` 'webhook-egress', required — Discriminator value: webhook-egress
        - `namespace` string
        - `jobName` string, required
        - `url` string, required
      - object
        - `template` 'action-listener', required — Discriminator value: action-listener
        - `namespace` string
        - `jobName` string, required
        - `actionFunction` string, required
      - object
        - `template` 'automap', required — Discriminator value: automap
        - `namespace` string
        - `options` TypeAgentsAutomapOptions, required
          - `accuracy` string, required
          - `defaultTargetSheet` string, required
          - `matchFilename` string, required
    - `isSystem` boolean — Whether the agent is a system agent. This should be false for all agents created by users.
    - `namespace` string — The namespace this agent should be limited to. Right now, this is information only and not used to actually filter agents that run, so you must still specify the namespace filter in the agent code.
    - `packageVersions` object — Package versions information for the agent
    - `commitInfo` object — Commit information for the agent
    - `id` string, required — Agent ID
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `accountId` string, required — Account ID
    - `environmentId` string, required — Environment ID
    - `createdFrom` string — Agent ID
    - `lastPropagatedAt` string, date-time — The last time the agent template configuration was propagated to this agent
  - `pagination` TypeCommonsPagination — pagination info
    - `currentPage` integer, required — current page of results
    - `pageCount` integer, required — total number of pages of results
    - `totalCount` integer, required — total available results

---

[API](https://skmtc.net/flatfile/apis/api-reference.md) · [All operations](https://skmtc.net/flatfile/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flatfile/api-reference/revisions/9d3a9979cd96/schema)
