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

# List Rule Conditions

> List the condition sources available for building rules on this agent.

Returns each source with the operators and value types it accepts, grouped by
`source_type`. Use these to build a rule's condition.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json get /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/rules/available-conditions
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: simulation
    x-group: Simulation
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/rules/available-conditions:
    get:
      tags:
        - agent-settings
      summary: List Rule Conditions
      description: >-
        List the condition sources available for building rules on this agent.


        Returns each source with the operators and value types it accepts,
        grouped by

        `source_type`. Use these to build a rule's condition.
      operationId: >-
        get_rules_available_conditions_api_v1_workspaces__workspace_id__agents__agent_id__settings_rules_available_conditions_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            description: Tuner's internal numeric ID for the agent.
            title: Agent Id
          description: Tuner's internal numeric ID for the agent.
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableConditionsResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The agent has no settings record.
          content:
            application/json:
              example:
                detail: Agent 17 does not have settings
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    AvailableConditionsResponse:
      properties:
        sources:
          items:
            $ref: '#/components/schemas/AvailableConditionSource'
          type: array
          title: Sources
      type: object
      required:
        - sources
      title: AvailableConditionsResponse
      description: Response schema for available conditions.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AvailableConditionSource:
      properties:
        source_type:
          type: string
          title: Source Type
        items:
          items:
            $ref: '#/components/schemas/AvailableConditionSourceItem'
          type: array
          title: Items
      type: object
      required:
        - source_type
        - items
      title: AvailableConditionSource
      description: Available condition source group schema.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AvailableConditionSourceItem:
      properties:
        id:
          type: integer
          title: Id
        display_name:
          type: string
          title: Display Name
        available_operators:
          items:
            $ref: '#/components/schemas/Operator'
          type: array
          title: Available Operators
        input_datatype:
          $ref: '#/components/schemas/InputDataType'
        available_values:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Available Values
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
          description: >-
            Unit of measurement for the value (e.g. 'ms', 's', 'usd'). Null for
            non-numeric or unitless. Frontend may display as-is or convert for
            presentation.
      type: object
      required:
        - id
        - display_name
        - available_operators
        - input_datatype
        - available_values
      title: AvailableConditionSourceItem
      description: Available condition source item schema.
    Operator:
      type: string
      enum:
        - '='
        - '!='
        - '>='
        - <=
        - '>'
        - <
        - exists
        - not_exists
        - contains
        - starts_with
      title: Operator
      description: Supported operators for rule conditions.
    InputDataType:
      type: string
      enum:
        - list
        - decimal
        - text
        - boolean
      title: InputDataType
      description: Input data types for rule conditions.
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````