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

# List Agents.

> List all Agents for the authenticated account with pagination support.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json get /v1/agents
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/agents:
    get:
      tags:
        - agents
      summary: List Agents.
      description: List all Agents for the authenticated account with pagination support.
      operationId: listAgents
      parameters:
        - name: limit
          in: query
          description: The limit of items to return. Default is 20. Max is 5000.
          allowEmptyValue: true
          schema:
            type: integer
            format: int32
        - name: starting_after
          in: query
          description: >-
            Load the next page of data starting after the item with the given
            ID.
          allowEmptyValue: true
          schema:
            type: string
        - name: name
          in: query
          description: Filter agents by name (partial match supported).
          allowEmptyValue: true
          schema:
            type: string
        - name: is_public
          in: query
          description: Filter agents by public visibility.
          allowEmptyValue: true
          schema:
            type: boolean
        - name: search
          in: query
          description: Search by agent ID or name.
          allowEmptyValue: true
          schema:
            type: string
        - name: version
          in: query
          description: >-
            Filter by version. Use 'latest' to get the most recently created
            agent.
          allowEmptyValue: true
          schema:
            type: string
        - name: include_total_count
          in: query
          description: >-
            If true (default), includes total_count in the response. Set to
            false to skip the count query for better performance on large
            datasets.
          allowEmptyValue: true
          schema:
            type: boolean
      responses:
        '200':
          description: Successfully retrieved list of Agents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentListView'
        '401':
          description: Unauthorized. Invalid or missing authentication.
        '403':
          description: Forbidden. Account does not have devbox capability.
        '500':
          description: Internal server error.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Runloop from '@runloop/api-client';

            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const agentView of client.agents.list()) {
              console.log(agentView.id);
            }
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            page = client.agents.list()
            page = page.agents[0]
            print(page.id)
components:
  schemas:
    AgentListView:
      type: object
      description: A paginated list of Agents.
      properties:
        agents:
          type: array
          items:
            $ref: '#/components/schemas/AgentView'
          description: The list of Agents.
        has_more:
          type: boolean
          description: Whether there are more Agents to fetch.
        total_count:
          format: int32
          description: The total count of Agents.
          type:
            - integer
            - 'null'
      required:
        - agents
        - has_more
    AgentView:
      type: object
      description: An Agent represents a registered AI agent entity.
      properties:
        id:
          type: string
          description: The unique identifier of the Agent.
        name:
          type: string
          description: The name of the Agent.
        version:
          description: >-
            Optional version identifier for the Agent. For npm/pip sources this
            is typically a semver string (e.g. '2.0.65'). For git sources it can
            be a branch or tag. Omitted for object sources or when not provided.
          type:
            - string
            - 'null'
        create_time_ms:
          type: integer
          format: int64
          description: The creation time of the Agent (Unix timestamp milliseconds).
        is_public:
          type: boolean
          description: Whether the Agent is publicly accessible.
        source:
          description: The source configuration for the Agent.
          anyOf:
            - $ref: '#/components/schemas/AgentSource'
            - type: 'null'
      required:
        - id
        - name
        - create_time_ms
        - is_public
    AgentSource:
      type: object
      description: Agent source configuration.
      properties:
        type:
          type: string
          description: 'Source type: npm, pip, object, or git'
        npm:
          description: NPM source configuration
          anyOf:
            - $ref: '#/components/schemas/NpmSource'
            - type: 'null'
        pip:
          description: Pip source configuration
          anyOf:
            - $ref: '#/components/schemas/PipSource'
            - type: 'null'
        object:
          description: Object store source configuration
          anyOf:
            - $ref: '#/components/schemas/ObjectSource'
            - type: 'null'
        git:
          description: Git source configuration
          anyOf:
            - $ref: '#/components/schemas/GitSource'
            - type: 'null'
      required:
        - type
    NpmSource:
      type: object
      description: NPM-based agent source configuration.
      properties:
        package_name:
          type: string
          description: NPM package name
        registry_url:
          description: NPM registry URL
          type:
            - string
            - 'null'
        agent_setup:
          items:
            type: string
          description: Setup commands to run after installation
          type:
            - array
            - 'null'
      required:
        - package_name
    PipSource:
      type: object
      description: Pip-based agent source configuration.
      properties:
        package_name:
          type: string
          description: Pip package name
        registry_url:
          description: Pip registry URL
          type:
            - string
            - 'null'
        agent_setup:
          items:
            type: string
          description: Setup commands to run after installation
          type:
            - array
            - 'null'
      required:
        - package_name
    ObjectSource:
      type: object
      description: Object store agent source configuration.
      properties:
        object_id:
          type: string
          description: Object ID
        agent_setup:
          items:
            type: string
          description: Setup commands to run after unpacking
          type:
            - array
            - 'null'
      required:
        - object_id
    GitSource:
      type: object
      description: Git-based agent source configuration.
      properties:
        repository:
          type: string
          description: Git repository URL
        ref:
          description: Optional Git ref (branch/tag/commit), defaults to main/HEAD
          type:
            - string
            - 'null'
        agent_setup:
          items:
            type: string
          description: Setup commands to run after cloning
          type:
            - array
            - 'null'
      required:
        - repository
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````