---
title: "Get an agent"
method: GET
path: "/agents/{agentId}"
tags: ["agents"]
---

# Get an agent

`GET /agents/{agentId}`

## Path parameters

- `agentId` string, required — Agent ID

## Query parameters

- `environmentId` string — Environment ID

## Headers

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

## Response `200`

Response with status 200

- TypeAgentsAgentResponse
  - `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

## Other responses

- `400` — Error response with status 400
- `404` — Error response with status 404

---

[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/versions/9d3a9979cd96/schema)
