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

# List Agents

> List all registered agents, optionally filtered by query parameters.



## OpenAPI

````yaml openapi.json GET /agents
openapi: 3.1.0
info:
  title: Sb0 API
  version: 0.1.0
servers: []
security: []
paths:
  /agents:
    get:
      tags:
        - Agents
      summary: List Agents
      description: List all registered agents, optionally filtered by query parameters.
      operationId: agents_list
      parameters:
        - description: Task ID
          in: query
          name: task_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Task ID
            title: Task Id
        - description: Filter by namespace ID
          in: query
          name: namespace_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by namespace ID
            title: Namespace Id
        - description: Limit
          in: query
          name: limit
          required: false
          schema:
            default: 50
            description: Limit
            minimum: 1
            title: Limit
            type: integer
        - description: Page number
          in: query
          name: page_number
          required: false
          schema:
            default: 1
            description: Page number
            minimum: 1
            title: Page Number
            type: integer
        - description: Field to order by
          in: query
          name: order_by
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Field to order by
            title: Order By
        - description: Order direction (asc or desc)
          in: query
          name: order_direction
          required: false
          schema:
            default: desc
            description: Order direction (asc or desc)
            title: Order Direction
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AgentListItem'
                title: Response Agents List
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    AgentListItem:
      description: |-
        Minimal agent shape for discovery/listing.

        The /agents list endpoint is authorized via `discover` and must not leak
        read-level fields (e.g. description, registration metadata).
      properties:
        id:
          description: The unique identifier of the agent.
          title: Id
          type: string
        name:
          description: The agent name (unique within namespace).
          title: Name
          type: string
        namespace_id:
          description: The namespace ID this agent belongs to.
          title: Namespace Id
          type: string
        status:
          $ref: '#/components/schemas/AgentStatus'
          default: ACTIVE
          description: Agent status (ACTIVE/DELETED).
      required:
        - id
        - namespace_id
        - name
      title: AgentListItem
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentStatus:
      description: >-
        Agent status - runtime statuses (Ready/Failed/Unhealthy) now live on
        Deployment.
      enum:
        - ACTIVE
        - DELETED
      title: AgentStatus
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````