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

# List Agents

> List all agents for an organization



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml get /agents
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - description: V2 API
    url: https://odyssey.asteroid.ai/agents/v2
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
  - name: Execution
  - name: Files
  - name: Agent Profiles
  - name: Agent Profile Pools
  - name: Workflows
  - name: Schema
  - name: Documentation
  - name: Context
paths:
  /agents:
    get:
      tags:
        - Agents
      summary: List Agents
      description: List all agents for an organization
      operationId: AgentList
      parameters:
        - explode: false
          in: query
          name: organizationId
          schema:
            $ref: '#/components/schemas/Common.uuid'
        - $ref: '#/components/parameters/Common.Pagination.pageSize'
        - $ref: '#/components/parameters/Common.Pagination.page'
        - $ref: '#/components/parameters/Agents.Agent.Search'
        - explode: false
          in: query
          name: sortField
          schema:
            $ref: '#/components/schemas/Agents.Agent.SortField'
        - explode: false
          in: query
          name: sortDirection
          schema:
            $ref: '#/components/schemas/Common.SortDirection'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  items:
                    items:
                      $ref: '#/components/schemas/Agents.Agent.Base'
                    type: array
                  page:
                    format: int64
                    type: integer
                  pageSize:
                    format: int64
                    type: integer
                  total:
                    format: int64
                    type: integer
                required:
                  - items
                  - page
                  - pageSize
                  - total
                type: object
          description: The request has succeeded.
        '400':
          content:
            text/plain:
              schema:
                enum:
                  - Invalid request parameters.
                type: string
          description: The server could not understand the request due to invalid syntax.
        '404':
          content:
            text/plain:
              schema:
                enum:
                  - Organization not found.
                type: string
          description: The server cannot find the requested resource.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.Error'
          description: An unexpected error response.
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Agent.SortField:
      enum:
        - name
        - created_at
      type: string
    Common.SortDirection:
      enum:
        - asc
        - desc
      type: string
      x-go-type: sort.Direction
      x-go-type-import:
        name: sort
        path: github.com/asteroidai/agents/go/common/sort
    Agents.Agent.Base:
      properties:
        createdAt:
          format: date-time
          type: string
        id:
          $ref: '#/components/schemas/Common.uuid'
        name:
          type: string
        organizationId:
          $ref: '#/components/schemas/Common.uuid'
        userId:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - id
        - name
        - createdAt
        - userId
      type: object
    Common.Error:
      properties:
        code:
          format: int32
          type: integer
        message:
          type: string
      required:
        - code
        - message
      type: object
  parameters:
    Common.Pagination.pageSize:
      explode: false
      in: query
      name: pageSize
      schema:
        default: 50
        format: int32
        type: integer
    Common.Pagination.page:
      explode: false
      in: query
      name: page
      schema:
        default: 1
        format: int32
        type: integer
    Agents.Agent.Search:
      explode: false
      in: query
      name: searchName
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Asteroid-Agents-Api-Key
      type: apiKey

````