---
title: "Get an agent task"
method: GET
path: "/api/v3/tasks/agents/{task_id}"
tags: ["tasks"]
---

# Get an agent task

`GET /api/v3/tasks/agents/{task_id}`

## Request

- Base URL: `https://{tenant_name}.benchling.com`
- URL: `https://{tenant_name}.benchling.com/api/v3/tasks/agents/{task_id}`
- Auth: HTTP bearer

Get an agent task

## Path parameters

- `task_id` string, required

## Headers

- `EARLY-ACCESS` string

## Response `200`

Task status and contents

- TasksAgentTaskGetResponse200
  - `artifacts` TasksAgentsTaskIdGetResponsesContentApplicationJsonSchemaArtifactsItems[]: Generated image files represented by file blocks in a completed agent response. Omitted while the task is in progress or when the response has no available generated images. Files that are missing or unavailable because of antivirus scanning are omitted.
    - `downloadUrl` string, uri, required: Short-lived presigned URL valid for at most 60 seconds after generation, Request the agent task status again to obtain a fresh URL.
    - `filename` string, required
    - `id` string, required
    - `mediaType` string, required
    - `type` 'file', required
  - `chatId` string, required
  - `content` TasksAgentsTaskIdGetResponsesContentApplicationJsonSchemaContentItems[], required
    - `content_type` 'text/markdown', required: MIME type of the content.
    - `text` string, required
  - `status` 'NOT_STARTED' | 'ACTIVE' | 'COMPLETED' | 'FAILED', required: Current task status.
  - `taskId` string, required

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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