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

# List Agents

> List all agents in the workspace

Required scope: `agents:read`, `agents:all`, or `all:all`



## OpenAPI

````yaml api-reference/openapi.json get /api/v1/agents
openapi: 3.0.0
info:
  title: OpenSink API
  description: API documentation for OpenSink
  version: 1.0.0
servers:
  - url: https://api.opensink.com
    description: Production Server
security:
  - bearerAuth: []
tags:
  - name: Sink
    description: Sink management endpoints
  - name: Sink Item
    description: Sink item endpoints
  - name: Cron Job
    description: Cron job scheduling endpoints
  - name: Cron Job Run
    description: Cron job execution history
  - name: Agent
    description: Agent management endpoints
  - name: Agent Config
    description: Agent configuration endpoints
  - name: Agent Session
    description: Agent session endpoints
  - name: Agent Session Input Request
    description: Agent session input request endpoints
  - name: Agent Session Activity
    description: Agent session activity log endpoints
paths:
  /api/v1/agents:
    get:
      tags:
        - Agent
      summary: List Agents
      description: |-
        List all agents in the workspace

        Required scope: `agents:read`, `agents:all`, or `all:all`
      operationId: listAgents
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      description: An AI agent with configurable settings
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique identifier
                        workspace_id:
                          type: string
                          format: uuid
                          description: Workspace ID
                        name:
                          type: string
                          minLength: 1
                          maxLength: 255
                          description: Agent name
                        description:
                          type: string
                          description: Agent description
                          nullable: true
                        config_id:
                          type: string
                          format: uuid
                          description: Current active config ID
                          nullable: true
                        status:
                          type: string
                          enum:
                            - running
                            - waiting_for_input
                            - completed
                            - failed
                          nullable: true
                          description: Agent status based on latest session
                        execution_endpoint:
                          type: object
                          nullable: true
                          properties:
                            url:
                              type: string
                              description: Endpoint URL
                            method:
                              type: string
                              enum:
                                - POST
                                - GET
                                - PUT
                                - DELETE
                              description: HTTP method
                            headers:
                              type: object
                              additionalProperties:
                                type: string
                              description: Request headers
                            body:
                              type: object
                              additionalProperties: true
                              description: Request body
                          required:
                            - url
                            - method
                          description: Execution endpoint configuration
                        created_at:
                          type: string
                          format: date-time
                          description: Creation timestamp
                        updated_at:
                          type: string
                          format: date-time
                          description: Last update timestamp
                  trail:
                    type: string
                    nullable: true
                    description: Pagination trail for next page
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Insufficient permissions
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication

````