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

# List an agent tasks

> Live tasks by default; archived=true for the archived list. status filters the archived list only.



## OpenAPI

````yaml /openapi.json get /api/v1/agents/{id}/tasks
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/agents/{id}/tasks:
    get:
      tags:
        - Agents
      summary: List an agent tasks
      description: >-
        Live tasks by default; archived=true for the archived list. status
        filters the archived list only.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
              - type: string
                enum:
                  - 'false'
              - type: string
                enum:
                  - '1'
              - type: string
                enum:
                  - '0'
            default: false
          required: false
          name: archived
          in: query
        - schema:
            type: string
          required: false
          name: status
          in: query
      responses:
        '200':
          description: The agent tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskList'
        '400':
          description: >-
            Bad request - a field is missing, malformed, or not allowed
            (VALIDATION_FAILED, BAD_REQUEST, INVALID_CURSOR)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such row that this caller can see (NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TaskList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        has_more:
          type: boolean
        total_count:
          type: integer
          description: Present only when include=total_count is set
      required:
        - object
        - data
        - has_more
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
    Task:
      type: object
      properties:
        id:
          type: string
          example: tsk_2b7c1d4e-...
        description:
          type: string
        status:
          type: string
          example: completed
        execution_mode:
          type: string
          enum:
            - investigate
            - remediate
        job_id:
          type: string
          nullable: true
        archived:
          type: boolean
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - description
        - status
        - execution_mode
        - job_id
        - archived
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````