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

# Lister les agents

> Listez tous les agents de votre compte avec un filtrage optionnel.

Recuperez une liste paginee des agents associes a votre compte. Prend en charge le filtrage par statut et chaine.

## Parametres de requete

<ParamField query="page_num" type="integer" default="1">
  Numero de page (indexe a 1).
</ParamField>

<ParamField query="page_size" type="integer" default="20">
  Nombre d'elements par page. Maximum : 100.
</ParamField>

<ParamField query="status" type="string">
  Filtrer par statut de l'agent. Valeurs : `active`, `inactive`.
</ParamField>

<ParamField query="chain" type="string">
  Filtrer par identifiant de chaine CAIP-2 (par ex., `eip155:84532`).
</ParamField>

## Reponse

<Expandable title="Champs de la reponse">
  <ParamField body="data" type="array">
    Tableau d'objets agent. Chaque agent inclut `id`, `agent_name`, `wallet`, `status` et `created_at`.
  </ParamField>

  <ParamField body="total" type="integer">
    Nombre total d'agents correspondant a la requete.
  </ParamField>

  <ParamField body="has_more" type="boolean">
    Indique si d'autres pages sont disponibles.
  </ParamField>
</Expandable>

## Exemple

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.agentwallex.com/api/v1/agents?page_num=1&page_size=20&status=active&chain=eip155:84532" \
    -H "X-API-Key: awx_your_api_key"
  ```

  ```typescript TypeScript theme={null}
  const { agents, pagination } = await aw.agents.list({
    limit: 20,
    offset: 0,
    status: "active",
  });
  ```

  ```python Python theme={null}
  result = await aw.agents.list(limit=20, offset=0, status="active")
  ```
</CodeGroup>

```json Response theme={null}
{
  "data": [
    {
      "id": "agent_abc123",
      "agent_name": "research-bot",
      "wallet": {
        "address": "0x1234...5678",
        "chain": "eip155:84532"
      },
      "status": "active",
      "created_at": "2025-06-01T10:00:00Z"
    }
  ],
  "total": 3,
  "has_more": false
}
```


## OpenAPI

````yaml GET /api/v1/agents
openapi: 3.1.0
info:
  title: AgentWallex API
  description: >-
    REST API for managing AI agent wallets, on-chain transactions, spending
    policies, webhooks, and x402 micropayments.
  version: 1.0.0
  contact:
    name: AgentWallex Support
    url: https://agentwallex.com
servers:
  - url: https://api.agentwallex.com
    description: Production
  - url: https://api-sandbox.agentwallex.com
    description: Sandbox
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Agents
    description: Create and manage AI agent wallets.
  - name: Transactions
    description: Send payments and query transaction history.
  - name: Policies
    description: Configure spending limits and access controls.
  - name: Webhooks
    description: Register and manage webhook endpoints.
  - name: x402
    description: x402 micropayment negotiation and session management.
paths:
  /api/v1/agents:
    get:
      tags:
        - Agents
      summary: List Agents
      description: >-
        Retrieve a paginated list of agents associated with your account.
        Supports filtering by status and chain.
      operationId: listAgents
      parameters:
        - $ref: '#/components/parameters/PageNum'
        - $ref: '#/components/parameters/PageSize'
        - name: status
          in: query
          description: Filter by agent status.
          schema:
            type: string
            enum:
              - active
              - inactive
        - name: chain
          in: query
          description: Filter by CAIP-2 chain identifier (e.g., `eip155:84532`).
          schema:
            type: string
      responses:
        '200':
          description: Paginated list of agents.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    PageNum:
      name: page_num
      in: query
      description: Page number (1-indexed).
      schema:
        type: integer
        default: 1
        minimum: 1
    PageSize:
      name: page_size
      in: query
      description: Number of items per page.
      schema:
        type: integer
        default: 20
        minimum: 1
        maximum: 100
  schemas:
    PaginatedResponse:
      type: object
      description: Standard paginated response wrapper.
      properties:
        data:
          type: array
          items: {}
          description: Array of resource objects.
        total:
          type: integer
          description: Total number of items matching the query.
        has_more:
          type: boolean
          description: Whether more pages are available.
    Agent:
      type: object
      description: An AI agent with an MPC-secured wallet.
      properties:
        id:
          type: string
          description: Unique agent identifier (e.g., `agent_abc123`).
        agent_name:
          type: string
          description: Agent display name.
        agent_description:
          type: string
          description: Agent description.
        wallet:
          $ref: '#/components/schemas/Wallet'
        status:
          type: string
          enum:
            - active
            - inactive
          description: Agent status.
        metadata:
          type: string
          description: JSON-encoded metadata string.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 creation timestamp.
    Wallet:
      type: object
      description: An on-chain wallet associated with an agent.
      properties:
        address:
          type: string
          description: On-chain wallet address.
        chain:
          type: string
          description: CAIP-2 chain identifier.
    ErrorResponse:
      type: object
      description: Standard error response.
      required:
        - code
        - type
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - authorization_error
            - not_found_error
            - rate_limit_error
            - internal_error
          description: Error type category.
        message:
          type: string
          description: Human-readable error description.
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: invalid_request
            type: invalid_request_error
            message: The request body is missing required fields.
    Unauthorized:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: authentication_failed
            type: authentication_error
            message: The provided API key is invalid or expired.
    Forbidden:
      description: Insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: insufficient_permissions
            type: authorization_error
            message: You do not have permission to perform this action.
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: rate_limit_exceeded
            type: rate_limit_error
            message: Too many requests. Please retry after a short delay.
    InternalError:
      description: Server-side error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: server_error
            type: internal_error
            message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication. Keys are prefixed with `awx_`.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT bearer token authentication.

````