> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Retrieves all custom variables defined for the application. Use this endpoint to view and manage dynamic variables used in agent instructions.  **Variable types:** Custom variables can source values f

# List Custom Variables



## OpenAPI

````yaml get /ai-agents/agent-builder/agents/variables/custom
openapi: 3.0.0
info:
  title: AI Agents APIs
  description: API reference for CometChat AI Agents service
  version: '1.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: ai-agent
    description: ''
paths:
  /ai-agents/agent-builder/agents/variables/custom:
    get:
      tags:
        - Agent Builder
      summary: List Custom Variables
      description: >-
        Retrieves all custom variables defined for the application. Use this
        endpoint to view and manage dynamic variables used in agent
        instructions.


        **Variable types:** Custom variables can source values from message
        metadata, user metadata, or constant values. Each variable includes its
        source type, resolution path, and default value.
      operationId: AgentBuilderController_getAllCustomVariables
      parameters: []
      responses:
        '200':
          description: List of custom variables
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      example: 507f1f77bcf86cd799439011
                    appId:
                      type: string
                      example: my-app-id
                    name:
                      type: string
                      example: user.plan
                    description:
                      type: string
                      example: The user subscription plan
                    sourceType:
                      type: string
                      enum:
                        - message_metadata
                        - user_metadata
                        - constant
                      example: user_metadata
                    sourcePath:
                      type: string
                      example: metadata.plan
                    constantValue:
                      type: string
                      example: premium
                    defaultValue:
                      type: string
                      example: free
                    category:
                      type: string
                      enum:
                        - custom
                      example: custom
                    createdAt:
                      type: number
                      example: 1700000000000
                    updatedAt:
                      type: number
                      example: 1700000000000
              example:
                - _id: 507f1f77bcf86cd799439011
                  appId: my-app-id
                  name: user.plan
                  description: The user subscription plan
                  sourceType: user_metadata
                  sourcePath: metadata.plan
                  constantValue: ''
                  defaultValue: free
                  category: custom
                  createdAt: 1700000000000
                  updatedAt: 1700000000000
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key (i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````