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

# Create Agent Response Test

> Creates a new agent response test.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/agent-testing/create
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/agent-testing/create:
    post:
      summary: Create Agent Response Test
      description: Creates a new agent response test.
      operationId: create_agent_response_test_route
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/CreateResponseUnitTestRequest'
                - $ref: '#/components/schemas/CreateToolCallUnitTestRequest'
                - $ref: '#/components/schemas/CreateSimulationTestRequest'
              title: Test Request
              description: Create Chat Response Test Request Information
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAgentTestResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateResponseUnitTestRequest:
      properties:
        from_conversation_metadata:
          anyOf:
            - $ref: '#/components/schemas/TestFromConversationMetadata-Input'
            - type: 'null'
          description: >-
            Metadata of a conversation this test was created from (if
            applicable).
        dynamic_variables:
          additionalProperties: true
          type: object
          title: Dynamic Variables
          description: Dynamic variables to replace in the agent config during testing
        chat_history:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptCommonModel-Input
          type: array
          maxItems: 200
          title: Chat History
        conversation_initiation_source:
          anyOf:
            - $ref: '#/components/schemas/ConversationInitiationSource'
            - type: 'null'
          description: >-
            Simulate the test as if the conversation originated from this
            channel.
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
          description: >-
            The environment to resolve environment-specific variable values
            against when running this test (URL, headers, auth connections). If
            not provided, defaults to 'production'. For simulation tests,
            simulation_environment takes precedence when set.
        type:
          type: string
          const: llm
          title: Type
          default: llm
        success_conditions:
          items:
            type: string
          type: array
          maxItems: 30
          title: Success Conditions
          description: >-
            List of prompts that evaluate whether the agent's response is
            successful. If provided, all criteria are evaluated and merged into
            a final result. Capped at the maximum number of evaluation criteria.
        success_examples:
          items:
            $ref: '#/components/schemas/AgentSuccessfulResponseExample'
          type: array
          maxItems: 5
          title: Success Examples
          description: >-
            Non-empty list of example responses that should be considered
            successful
        failure_examples:
          items:
            $ref: '#/components/schemas/AgentFailureResponseExample'
          type: array
          maxItems: 5
          title: Failure Examples
          description: >-
            Non-empty list of example responses that should be considered
            failures
        name:
          type: string
          title: Name
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
          description: >-
            The ID of the parent folder. If not provided, the test will be
            created at the root level.
      type: object
      required:
        - name
      title: CreateResponseUnitTestRequest
    CreateToolCallUnitTestRequest:
      properties:
        from_conversation_metadata:
          anyOf:
            - $ref: '#/components/schemas/TestFromConversationMetadata-Input'
            - type: 'null'
          description: >-
            Metadata of a conversation this test was created from (if
            applicable).
        dynamic_variables:
          additionalProperties: true
          type: object
          title: Dynamic Variables
          description: Dynamic variables to replace in the agent config during testing
        chat_history:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptCommonModel-Input
          type: array
          maxItems: 200
          title: Chat History
        conversation_initiation_source:
          anyOf:
            - $ref: '#/components/schemas/ConversationInitiationSource'
            - type: 'null'
          description: >-
            Simulate the test as if the conversation originated from this
            channel.
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
          description: >-
            The environment to resolve environment-specific variable values
            against when running this test (URL, headers, auth connections). If
            not provided, defaults to 'production'. For simulation tests,
            simulation_environment takes precedence when set.
        type:
          type: string
          const: tool
          title: Type
          default: tool
        tool_call_parameters:
          anyOf:
            - $ref: '#/components/schemas/UnitTestToolCallEvaluationModel'
            - type: 'null'
          description: >-
            How to evaluate the agent's tool call (if any). If empty, the tool
            call is not evaluated.
        check_any_tool_matches:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Check Any Tool Matches
          description: >-
            If set to True this test will pass if any tool call returned by the
            LLM matches the criteria. Otherwise it will fail if more than one
            tool is returned by the agent.
        name:
          type: string
          title: Name
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
          description: >-
            The ID of the parent folder. If not provided, the test will be
            created at the root level.
      type: object
      required:
        - name
      title: CreateToolCallUnitTestRequest
    CreateSimulationTestRequest:
      properties:
        from_conversation_metadata:
          anyOf:
            - $ref: '#/components/schemas/TestFromConversationMetadata-Input'
            - type: 'null'
          description: >-
            Metadata of a conversation this test was created from (if
            applicable).
        dynamic_variables:
          additionalProperties: true
          type: object
          title: Dynamic Variables
          description: Dynamic variables to replace in the agent config during testing
        chat_history:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptCommonModel-Input
          type: array
          maxItems: 200
          title: Chat History
        conversation_initiation_source:
          anyOf:
            - $ref: '#/components/schemas/ConversationInitiationSource'
            - type: 'null'
          description: >-
            Simulate the test as if the conversation originated from this
            channel.
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
          description: >-
            The environment to resolve environment-specific variable values
            against when running this test (URL, headers, auth connections). If
            not provided, defaults to 'production'. For simulation tests,
            simulation_environment takes precedence when set.
        type:
          type: string
          const: simulation
          title: Type
          default: simulation
        success_conditions:
          items:
            type: string
          type: array
          maxItems: 30
          title: Success Conditions
          description: >-
            List of prompts that evaluate whether the simulation was successful.
            If provided, all criteria are evaluated and merged into a final
            result. Capped at the maximum number of evaluation criteria.
        simulation_scenario:
          type: string
          title: Simulation Scenario
          description: >-
            Description of the simulation scenario and user persona for
            simulation tests.
          default: ''
        simulation_max_turns:
          type: integer
          maximum: 50
          minimum: 1
          title: Simulation Max Turns
          description: Maximum number of conversation turns for simulation tests.
          default: 5
        simulation_environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Simulation Environment
          description: >-
            The environment to use when running this simulation test. If not
            provided, defaults to 'production'.
        tool_mock_config:
          $ref: '#/components/schemas/SimulationToolMockBehaviorConfig'
          description: Configuration for which tools to mock and fallback behavior.
        tool_mock_overrides:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ToolResponseMockConfig'
            type: array
          type: object
          title: Tool Mock Overrides
          description: >-
            Test-specific response mocks, keyed by tool ID. Applied ahead of the
            tool's shared mocks and only within this test. Only take effect for
            tools that are mocked (see tool_mock_config).
        evaluation_model:
          anyOf:
            - $ref: '#/components/schemas/LLM'
            - type: 'null'
          description: LLM model to use for evaluating simulation results.
          default: claude-sonnet-4-6
        simulated_user_model:
          anyOf:
            - $ref: '#/components/schemas/LLM'
            - type: 'null'
          description: LLM model for the simulated user.
          default: claude-sonnet-4-6
        name:
          type: string
          title: Name
        parent_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Folder Id
          description: >-
            The ID of the parent folder. If not provided, the test will be
            created at the root level.
      type: object
      required:
        - name
      title: CreateSimulationTestRequest
    CreateAgentTestResponseModel:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: CreateAgentTestResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TestFromConversationMetadata-Input:
      properties:
        conversation_id:
          type: string
          title: Conversation Id
        agent_id:
          type: string
          title: Agent Id
        branch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch Id
        workflow_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Node Id
        original_agent_reply:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptCommonModel-Input
          type: array
          title: Original Agent Reply
      type: object
      required:
        - conversation_id
        - agent_id
      title: TestFromConversationMetadata
    ConversationHistoryTranscriptCommonModel-Input:
      properties:
        role:
          type: string
          enum:
            - user
            - agent
          title: Role
        agent_metadata:
          anyOf:
            - $ref: '#/components/schemas/AgentMetadata'
            - type: 'null'
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        multivoice_message:
          anyOf:
            - $ref: '#/components/schemas/ConversationHistoryMultivoiceMessageModel'
            - type: 'null'
        tool_calls:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Input
          type: array
          title: Tool Calls
        tool_results:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input
          type: array
          title: Tool Results
        feedback:
          anyOf:
            - $ref: '#/components/schemas/UserFeedback'
            - type: 'null'
        llm_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Override
        producing_llm:
          anyOf:
            - type: string
            - type: 'null'
          title: Producing Llm
        time_in_call_secs:
          type: integer
          title: Time In Call Secs
        conversation_turn_metrics:
          anyOf:
            - $ref: '#/components/schemas/ConversationTurnMetrics'
            - type: 'null'
        rag_retrieval_info:
          anyOf:
            - $ref: '#/components/schemas/RagRetrievalInfo'
            - type: 'null'
        llm_usage:
          anyOf:
            - $ref: '#/components/schemas/LLMUsage'
            - type: 'null'
        interrupted:
          type: boolean
          title: Interrupted
          default: false
        ignored_as_backchannel:
          type: boolean
          title: Ignored As Backchannel
          default: false
        original_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Message
        reasoning:
          items:
            $ref: '#/components/schemas/ConversationReasoningModel'
          type: array
          title: Reasoning
        source_medium:
          anyOf:
            - $ref: '#/components/schemas/ChatSourceMedium'
            - type: 'null'
        source_event_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Event Id
        used_static_kb_document_ids:
          items:
            type: string
          type: array
          title: Used Static Kb Document Ids
        user_identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: User Identifier
        triggered_guardrails:
          items:
            $ref: '#/components/schemas/TriggeredGuardrailCommonModel'
          type: array
          title: Triggered Guardrails
      type: object
      required:
        - role
        - time_in_call_secs
      title: ConversationHistoryTranscriptCommonModel
    ConversationInitiationSource:
      type: string
      enum:
        - unknown
        - android_sdk
        - node_js_sdk
        - react_native_sdk
        - react_sdk
        - js_sdk
        - python_sdk
        - widget
        - sip_trunk
        - twilio
        - exotel
        - genesys
        - avaya
        - audiocodes
        - swift_sdk
        - whatsapp
        - twilio_sms
        - flutter_sdk
        - zendesk_integration
        - slack_integration
        - telegram_integration
        - intercom_integration
        - freshdesk_integration
        - salesforce_integration
        - template_preview
        - genesys_bot_connector
        - subagent_tool
      title: ConversationInitiationSource
      description: Enum representing the possible sources for conversation initiation.
      default: unknown
    AgentSuccessfulResponseExample:
      properties:
        response:
          type: string
          title: Response
        type:
          type: string
          const: success
          title: Type
      type: object
      required:
        - response
        - type
      title: AgentSuccessfulResponseExample
    AgentFailureResponseExample:
      properties:
        response:
          type: string
          title: Response
        type:
          type: string
          const: failure
          title: Type
      type: object
      required:
        - response
        - type
      title: AgentFailureResponseExample
    UnitTestToolCallEvaluationModel:
      properties:
        parameters:
          items:
            $ref: '#/components/schemas/UnitTestToolCallParameter'
          type: array
          title: Parameters
          description: >-
            Parameters to evaluate for the agent's tool call. If empty, the tool
            call parameters are not evaluated.
        referenced_tool:
          anyOf:
            - $ref: '#/components/schemas/ReferencedToolCommonModel'
            - type: 'null'
          description: The tool to evaluate a call against.
        verify_absence:
          type: boolean
          title: Verify Absence
          description: Whether to verify that the tool was NOT called.
          default: false
        workflow_node_transition:
          anyOf:
            - $ref: >-
                #/components/schemas/UnitTestWorkflowNodeTransitionEvaluationNodeId
            - type: 'null'
          description: >-
            Configuration for testing workflow node transitions. When set, the
            test will verify the agent transitions to the specified workflow
            node.
      type: object
      title: UnitTestToolCallEvaluationModel
    SimulationToolMockBehaviorConfig:
      properties:
        mocking_strategy:
          $ref: '#/components/schemas/MockingStrategy'
          description: >-
            Which tools to mock: 'all' mocks every mockable tool, 'selected'
            mocks only those in mocked_tool_names/mocked_tool_ids, 'none'
            disables mocking.
          default: none
        fallback_strategy:
          $ref: '#/components/schemas/MockNoMatchBehavior'
          description: Behavior when no mock matches a tool call.
          default: raise_error
        mocked_tool_ids:
          items:
            type: string
          type: array
          title: Mocked Tool Ids
          description: >-
            Tool IDs to mock. Resolved to tool names before being passed to the
            orchestrator.
      type: object
      title: SimulationToolMockBehaviorConfig
      description: >-
        Simulation/preview-side config: tools are identified by IDs, resolved to
        names at runtime.
    ToolResponseMockConfig:
      properties:
        parameter_conditions:
          items:
            $ref: '#/components/schemas/UnitTestToolCallParameter'
          type: array
          title: Parameter Conditions
          description: If the list is empty, the mock will always activate.
        mock_result:
          type: string
          title: Mock Result
          description: The return value the LLM sees when this mock is active.
        is_error:
          type: boolean
          title: Is Error
          description: >-
            If true, the mock result is surfaced to the LLM as a tool error
            rather than a successful result.
          default: false
      type: object
      required:
        - mock_result
      title: ToolResponseMockConfig
    LLM:
      type: string
      enum:
        - gpt-4o-mini
        - gpt-4o
        - gpt-4
        - gpt-4-turbo
        - gpt-4.1
        - gpt-4.1-mini
        - gpt-4.1-nano
        - gpt-5
        - gpt-5.1
        - gpt-5.2
        - gpt-5.2-chat-latest
        - gpt-5.4
        - gpt-5.5
        - gpt-5.6-sol
        - gpt-5.6-terra
        - gpt-5.6-luna
        - gpt-5-mini
        - gpt-5-nano
        - gpt-3.5-turbo
        - gemini-1.5-pro
        - gemini-1.5-flash
        - gemini-2.0-flash
        - gemini-2.0-flash-lite
        - gemini-2.5-flash-lite
        - gemini-2.5-flash
        - gemini-3-pro-preview
        - gemini-3-flash-preview
        - gemini-3.1-pro-preview
        - gemini-3.1-flash-lite-preview
        - gemini-3.6-flash
        - gemini-3.7-flash
        - claude-sonnet-4-5
        - claude-opus-4-7
        - claude-sonnet-4-6
        - claude-sonnet-4
        - claude-haiku-4-5
        - claude-3-7-sonnet
        - claude-3-5-sonnet
        - claude-3-5-sonnet-v1
        - claude-3-haiku
        - grok-beta
        - custom-llm
        - qwen3-4b
        - qwen3-30b-a3b
        - qwen36-35b-a3b
        - gpt-oss-20b
        - gpt-oss-120b
        - glm-45-air-fp8
        - gemini-2.5-flash-preview-09-2025
        - gemini-2.5-flash-lite-preview-09-2025
        - gemini-2.5-flash-preview-05-20
        - gemini-2.5-flash-preview-04-17
        - gemini-2.5-flash-lite-preview-06-17
        - gemini-2.0-flash-lite-001
        - gemini-2.0-flash-001
        - gemini-1.5-flash-002
        - gemini-1.5-flash-001
        - gemini-1.5-pro-002
        - gemini-1.5-pro-001
        - claude-sonnet-4@20250514
        - claude-sonnet-4-5@20250929
        - claude-haiku-4-5@20251001
        - claude-3-7-sonnet@20250219
        - claude-3-5-sonnet@20240620
        - claude-3-5-sonnet-v2@20241022
        - claude-3-haiku@20240307
        - gpt-5-2025-08-07
        - gpt-5.1-2025-11-13
        - gpt-5.2-2025-12-11
        - gpt-5.4-2026-03-05
        - gpt-5.5-2026-04-23
        - gpt-5-mini-2025-08-07
        - gpt-5-nano-2025-08-07
        - gpt-4.1-2025-04-14
        - gpt-4.1-mini-2025-04-14
        - gpt-4.1-nano-2025-04-14
        - gpt-4o-mini-2024-07-18
        - gpt-4o-2024-11-20
        - gpt-4o-2024-08-06
        - gpt-4o-2024-05-13
        - gpt-4-0613
        - gpt-4-0314
        - gpt-4-turbo-2024-04-09
        - gpt-3.5-turbo-0125
        - gpt-3.5-turbo-1106
        - watt-tool-8b
        - watt-tool-70b
      title: LLM
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentMetadata:
      properties:
        agent_id:
          type: string
          title: Agent Id
        branch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch Id
        workflow_node_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Node Id
        version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Id
      type: object
      required:
        - agent_id
      title: AgentMetadata
      description: >-
        Agent metadata for a transcript turn (used in workflow/handoff
        scenarios).
    ConversationHistoryMultivoiceMessageModel:
      properties:
        parts:
          items:
            $ref: '#/components/schemas/ConversationHistoryMultivoiceMessagePartModel'
          type: array
          title: Parts
      type: object
      required:
        - parts
      title: ConversationHistoryMultivoiceMessageModel
      description: Represents a message from a multi-voice agent.
    ConversationHistoryTranscriptToolCallCommonModel-Input:
      properties:
        type:
          anyOf:
            - $ref: '#/components/schemas/ToolType'
            - type: 'null'
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        params_as_json:
          type: string
          title: Params As Json
        tool_has_been_called:
          type: boolean
          title: Tool Has Been Called
        tool_details:
          anyOf:
            - oneOf:
                - $ref: >-
                    #/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails
                - $ref: >-
                    #/components/schemas/ConversationHistoryTranscriptToolCallClientDetails
                - $ref: >-
                    #/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails
                - $ref: >-
                    #/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input
              discriminator:
                propertyName: type
                mapping:
                  api_integration_webhook:
                    $ref: >-
                      #/components/schemas/ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input
                  client:
                    $ref: >-
                      #/components/schemas/ConversationHistoryTranscriptToolCallClientDetails
                  mcp:
                    $ref: >-
                      #/components/schemas/ConversationHistoryTranscriptToolCallMCPDetails
                  webhook:
                    $ref: >-
                      #/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails
            - type: 'null'
          title: Tool Details
      type: object
      required:
        - request_id
        - tool_name
        - params_as_json
        - tool_has_been_called
      title: ConversationHistoryTranscriptToolCallCommonModel
      description: A tool call made during the conversation.
    ConversationHistoryTranscriptOtherToolsResultCommonModel:
      properties:
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        result_value:
          type: string
          title: Result Value
        is_error:
          type: boolean
          title: Is Error
        is_blocked:
          type: boolean
          title: Is Blocked
          default: false
        tool_has_been_called:
          type: boolean
          title: Tool Has Been Called
        tool_latency_secs:
          type: number
          title: Tool Latency Secs
          default: 0
        error_type:
          type: string
          title: Error Type
          default: ''
        raw_error_message:
          type: string
          title: Raw Error Message
          default: ''
        dynamic_variable_updates:
          items:
            $ref: '#/components/schemas/DynamicVariableUpdateCommonModel'
          type: array
          title: Dynamic Variable Updates
        type:
          anyOf:
            - $ref: '#/components/schemas/OtherToolType'
            - type: 'null'
      type: object
      required:
        - request_id
        - tool_name
        - result_value
        - is_error
        - tool_has_been_called
      title: ConversationHistoryTranscriptOtherToolsResultCommonModel
      description: Result from client/webhook/mcp tool execution.
    ConversationHistoryTranscriptSystemToolResultCommonModel:
      properties:
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        result_value:
          type: string
          title: Result Value
        is_error:
          type: boolean
          title: Is Error
        is_blocked:
          type: boolean
          title: Is Blocked
          default: false
        tool_has_been_called:
          type: boolean
          title: Tool Has Been Called
        tool_latency_secs:
          type: number
          title: Tool Latency Secs
          default: 0
        error_type:
          type: string
          title: Error Type
          default: ''
        raw_error_message:
          type: string
          title: Raw Error Message
          default: ''
        dynamic_variable_updates:
          items:
            $ref: '#/components/schemas/DynamicVariableUpdateCommonModel'
          type: array
          title: Dynamic Variable Updates
        type:
          type: string
          const: system
          title: Type
        result:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/EndCallToolResultModel'
                - $ref: '#/components/schemas/LanguageDetectionToolResultModel'
                - $ref: '#/components/schemas/TransferToAgentToolResultSuccessModel'
                - $ref: '#/components/schemas/TransferToAgentToolResultErrorModel'
                - $ref: >-
                    #/components/schemas/TransferToNumberResultTwilioSuccessModel
                - $ref: '#/components/schemas/TransferToNumberResultSipSuccessModel'
                - $ref: >-
                    #/components/schemas/TransferToNumberResultExotelSuccessModel
                - $ref: '#/components/schemas/TransferToNumberResultErrorModel'
                - $ref: '#/components/schemas/SkipTurnToolResponseModel'
                - $ref: '#/components/schemas/PlayDTMFResultSuccessModel'
                - $ref: '#/components/schemas/PlayDTMFResultErrorModel'
                - $ref: '#/components/schemas/VoiceMailDetectionResultSuccessModel'
                - $ref: '#/components/schemas/TestToolResultModel'
                - $ref: '#/components/schemas/KnowledgeBaseRagToolResultModel'
                - $ref: '#/components/schemas/KnowledgeBaseToolResultModel'
                - $ref: '#/components/schemas/DummyToolResultModel'
              discriminator:
                propertyName: result_type
                mapping:
                  dummy:
                    $ref: '#/components/schemas/DummyToolResultModel'
                  end_call_success:
                    $ref: '#/components/schemas/EndCallToolResultModel'
                  knowledge_base_rag_success:
                    $ref: '#/components/schemas/KnowledgeBaseRagToolResultModel'
                  knowledge_base_success:
                    $ref: '#/components/schemas/KnowledgeBaseToolResultModel'
                  language_detection_success:
                    $ref: '#/components/schemas/LanguageDetectionToolResultModel'
                  play_dtmf_error:
                    $ref: '#/components/schemas/PlayDTMFResultErrorModel'
                  play_dtmf_success:
                    $ref: '#/components/schemas/PlayDTMFResultSuccessModel'
                  skip_turn_success:
                    $ref: '#/components/schemas/SkipTurnToolResponseModel'
                  testing_tool_result:
                    $ref: '#/components/schemas/TestToolResultModel'
                  transfer_to_agent_error:
                    $ref: '#/components/schemas/TransferToAgentToolResultErrorModel'
                  transfer_to_agent_success:
                    $ref: '#/components/schemas/TransferToAgentToolResultSuccessModel'
                  transfer_to_number_error:
                    $ref: '#/components/schemas/TransferToNumberResultErrorModel'
                  transfer_to_number_exotel_success:
                    $ref: >-
                      #/components/schemas/TransferToNumberResultExotelSuccessModel
                  transfer_to_number_sip_success:
                    $ref: '#/components/schemas/TransferToNumberResultSipSuccessModel'
                  transfer_to_number_twilio_success:
                    $ref: >-
                      #/components/schemas/TransferToNumberResultTwilioSuccessModel
                  voicemail_detection_success:
                    $ref: '#/components/schemas/VoiceMailDetectionResultSuccessModel'
            - type: 'null'
          title: Result
      type: object
      required:
        - request_id
        - tool_name
        - result_value
        - is_error
        - tool_has_been_called
        - type
      title: ConversationHistoryTranscriptSystemToolResultCommonModel
      description: Result from a system tool execution.
    ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input:
      properties:
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        result_value:
          type: string
          title: Result Value
        is_error:
          type: boolean
          title: Is Error
        is_blocked:
          type: boolean
          title: Is Blocked
          default: false
        tool_has_been_called:
          type: boolean
          title: Tool Has Been Called
        tool_latency_secs:
          type: number
          title: Tool Latency Secs
          default: 0
        error_type:
          type: string
          title: Error Type
          default: ''
        raw_error_message:
          type: string
          title: Raw Error Message
          default: ''
        dynamic_variable_updates:
          items:
            $ref: '#/components/schemas/DynamicVariableUpdateCommonModel'
          type: array
          title: Dynamic Variable Updates
        type:
          type: string
          const: api_integration_webhook
          title: Type
        integration_id:
          type: string
          title: Integration Id
          default: ''
        credential_id:
          type: string
          title: Credential Id
          default: ''
        integration_connection_id:
          type: string
          title: Integration Connection Id
          default: ''
      type: object
      required:
        - request_id
        - tool_name
        - result_value
        - is_error
        - tool_has_been_called
        - type
      title: ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel
      description: Result from API integration webhook tool execution.
    ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input:
      properties:
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        result_value:
          type: string
          title: Result Value
        is_error:
          type: boolean
          title: Is Error
        is_blocked:
          type: boolean
          title: Is Blocked
          default: false
        tool_has_been_called:
          type: boolean
          title: Tool Has Been Called
        tool_latency_secs:
          type: number
          title: Tool Latency Secs
          default: 0
        error_type:
          type: string
          title: Error Type
          default: ''
        raw_error_message:
          type: string
          title: Raw Error Message
          default: ''
        dynamic_variable_updates:
          items:
            $ref: '#/components/schemas/DynamicVariableUpdateCommonModel'
          type: array
          title: Dynamic Variable Updates
        type:
          type: string
          const: workflow
          title: Type
        result:
          anyOf:
            - $ref: '#/components/schemas/WorkflowToolResponseModel-Input'
            - type: 'null'
      type: object
      required:
        - request_id
        - tool_name
        - result_value
        - is_error
        - tool_has_been_called
        - type
      title: ConversationHistoryTranscriptWorkflowToolsResultCommonModel
      description: Result from workflow tool execution.
    UserFeedback:
      properties:
        score:
          $ref: '#/components/schemas/UserFeedbackScore'
        time_in_call_secs:
          type: integer
          title: Time In Call Secs
      type: object
      required:
        - score
        - time_in_call_secs
      title: UserFeedback
      description: User feedback on a transcript turn.
    ConversationTurnMetrics:
      properties:
        metrics:
          additionalProperties:
            $ref: '#/components/schemas/MetricRecord'
          type: object
          title: Metrics
        convai_asr_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Convai Asr Provider
        convai_tts_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Convai Tts Model
        convai_tts_cascade:
          anyOf:
            - type: string
            - type: 'null'
          title: Convai Tts Cascade
      type: object
      title: ConversationTurnMetrics
      description: Metrics for a conversation turn.
    RagRetrievalInfo:
      properties:
        chunks:
          items:
            $ref: '#/components/schemas/RagChunkMetadata'
          type: array
          title: Chunks
        embedding_model:
          $ref: '#/components/schemas/EmbeddingModelEnum'
        retrieval_query:
          type: string
          title: Retrieval Query
        rag_latency_secs:
          type: number
          title: Rag Latency Secs
        used_chunk_ids:
          items:
            type: string
          type: array
          title: Used Chunk Ids
      type: object
      required:
        - chunks
        - embedding_model
        - retrieval_query
        - rag_latency_secs
      title: RagRetrievalInfo
    LLMUsage:
      properties:
        model_usage:
          additionalProperties:
            $ref: '#/components/schemas/LLMInputOutputTokensUsage'
          propertyNames:
            $ref: '#/components/schemas/LLM'
          type: object
          title: Model Usage
      type: object
      title: LLMUsage
    ConversationReasoningModel:
      properties:
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        provider_redact:
          type: boolean
          title: Provider Redact
          default: false
      type: object
      title: ConversationReasoningModel
      description: Provider-safe reasoning summary attached to a transcript turn.
    ChatSourceMedium:
      type: string
      enum:
        - audio
        - dtmf
        - text
        - image
        - file
      title: ChatSourceMedium
    TriggeredGuardrailCommonModel:
      properties:
        guardrail_type:
          $ref: '#/components/schemas/GuardrailType'
        guardrail_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Guardrail Name
      type: object
      required:
        - guardrail_type
      title: TriggeredGuardrailCommonModel
    UnitTestToolCallParameter:
      properties:
        eval:
          oneOf:
            - $ref: '#/components/schemas/LLMParameterEvaluationStrategy'
            - $ref: '#/components/schemas/RegexParameterEvaluationStrategy'
            - $ref: '#/components/schemas/ExactParameterEvaluationStrategy'
            - $ref: '#/components/schemas/MatchAnythingParameterEvaluationStrategy'
          title: Eval
          discriminator:
            propertyName: type
            mapping:
              anything:
                $ref: '#/components/schemas/MatchAnythingParameterEvaluationStrategy'
              exact:
                $ref: '#/components/schemas/ExactParameterEvaluationStrategy'
              llm:
                $ref: '#/components/schemas/LLMParameterEvaluationStrategy'
              regex:
                $ref: '#/components/schemas/RegexParameterEvaluationStrategy'
        path:
          type: string
          title: Path
      type: object
      required:
        - eval
        - path
      title: UnitTestToolCallParameter
    ReferencedToolCommonModel:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the tool
        type:
          type: string
          enum:
            - system
            - webhook
            - client
            - workflow
            - api_integration_webhook
            - mcp
            - code
          title: Type
          description: The type of the tool
      type: object
      required:
        - id
        - type
      title: ReferencedToolCommonModel
      description: Reference to a tool for unit test evaluation.
    UnitTestWorkflowNodeTransitionEvaluationNodeId:
      properties:
        type:
          type: string
          const: node_id
          title: Type
          default: node_id
        agent_id:
          type: string
          title: Agent Id
          description: The ID of the agent whose workflow contains the target node.
        target_node_id:
          type: string
          title: Target Node Id
          description: The ID of the workflow node that the agent should transition to.
      type: object
      required:
        - agent_id
        - target_node_id
      title: UnitTestWorkflowNodeTransitionEvaluationNodeId
    MockingStrategy:
      type: string
      enum:
        - all
        - selected
        - none
      title: MockingStrategy
    MockNoMatchBehavior:
      type: string
      enum:
        - call_real_tool
        - raise_error
      title: MockNoMatchBehavior
    ConversationHistoryMultivoiceMessagePartModel:
      properties:
        text:
          type: string
          title: Text
        voice_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Label
        time_in_call_secs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Time In Call Secs
      type: object
      required:
        - text
        - voice_label
        - time_in_call_secs
      title: ConversationHistoryMultivoiceMessagePartModel
      description: Represents a single voice part of a multi-voice message.
    ToolType:
      type: string
      enum:
        - system
        - webhook
        - client
        - mcp
        - workflow
        - api_integration_webhook
        - api_integration_mcp
        - smb
        - code
      title: ToolType
    ConversationHistoryTranscriptToolCallWebhookDetails:
      properties:
        type:
          type: string
          const: webhook
          title: Type
          default: webhook
        method:
          type: string
          title: Method
        url:
          type: string
          title: Url
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        path_params:
          additionalProperties:
            type: string
          type: object
          title: Path Params
        query_params:
          additionalProperties:
            type: string
          type: object
          title: Query Params
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
      type: object
      required:
        - method
        - url
      title: ConversationHistoryTranscriptToolCallWebhookDetails
    ConversationHistoryTranscriptToolCallClientDetails:
      properties:
        type:
          type: string
          const: client
          title: Type
          default: client
        parameters:
          type: string
          title: Parameters
      type: object
      required:
        - parameters
      title: ConversationHistoryTranscriptToolCallClientDetails
    ConversationHistoryTranscriptToolCallMCPDetails:
      properties:
        type:
          type: string
          const: mcp
          title: Type
          default: mcp
        mcp_server_id:
          type: string
          title: Mcp Server Id
        mcp_server_name:
          type: string
          title: Mcp Server Name
        integration_type:
          type: string
          title: Integration Type
        parameters:
          additionalProperties:
            type: string
          type: object
          title: Parameters
        approval_policy:
          type: string
          title: Approval Policy
        requires_approval:
          type: boolean
          title: Requires Approval
          default: false
        mcp_tool_name:
          type: string
          title: Mcp Tool Name
          default: ''
        mcp_tool_description:
          type: string
          title: Mcp Tool Description
          default: ''
      type: object
      required:
        - mcp_server_id
        - mcp_server_name
        - integration_type
        - approval_policy
      title: ConversationHistoryTranscriptToolCallMCPDetails
    ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails-Input:
      properties:
        type:
          type: string
          const: api_integration_webhook
          title: Type
          default: api_integration_webhook
        integration_id:
          type: string
          title: Integration Id
          default: ''
        credential_id:
          type: string
          title: Credential Id
          default: ''
        integration_connection_id:
          type: string
          title: Integration Connection Id
          default: ''
        webhook_details:
          $ref: >-
            #/components/schemas/ConversationHistoryTranscriptToolCallWebhookDetails
      type: object
      required:
        - webhook_details
      title: ConversationHistoryTranscriptToolCallApiIntegrationWebhookDetails
    DynamicVariableUpdateCommonModel:
      properties:
        variable_name:
          type: string
          title: Variable Name
          description: Name of the variable
        old_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Old Value
          description: Previous value
        new_value:
          type: string
          title: New Value
          description: New value
        updated_at:
          type: number
          title: Updated At
          description: Unix timestamp when updated
        tool_name:
          type: string
          title: Tool Name
          description: Name of the tool that updated the variable
        tool_request_id:
          type: string
          title: Tool Request Id
          description: Request ID of the tool call
      type: object
      required:
        - variable_name
        - old_value
        - new_value
        - updated_at
        - tool_name
        - tool_request_id
      title: DynamicVariableUpdateCommonModel
      description: Tracks a dynamic variable update that occurred during tool execution.
    OtherToolType:
      type: string
      enum:
        - client
        - webhook
        - mcp
      title: OtherToolType
      description: Tool types for non-system tools
    EndCallToolResultModel:
      properties:
        result_type:
          type: string
          const: end_call_success
          title: Result Type
          default: end_call_success
        status:
          type: string
          const: success
          title: Status
          default: success
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      title: EndCallToolResultModel
      description: Result from end call tool.
    LanguageDetectionToolResultModel:
      properties:
        result_type:
          type: string
          const: language_detection_success
          title: Result Type
          default: language_detection_success
        status:
          type: string
          const: success
          title: Status
          default: success
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
      type: object
      title: LanguageDetectionToolResultModel
      description: Result from language detection tool.
    TransferToAgentToolResultSuccessModel:
      properties:
        result_type:
          type: string
          const: transfer_to_agent_success
          title: Result Type
          default: transfer_to_agent_success
        status:
          type: string
          const: success
          title: Status
          default: success
        from_agent:
          type: string
          title: From Agent
        to_agent:
          type: string
          title: To Agent
        to_node:
          anyOf:
            - type: string
            - type: 'null'
          title: To Node
        condition:
          type: string
          title: Condition
        delay_ms:
          type: integer
          title: Delay Ms
          default: 0
        transfer_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer Message
        enable_transferred_agent_first_message:
          type: boolean
          title: Enable Transferred Agent First Message
          default: false
        branch_info:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/TransferBranchInfoTrafficSplit'
                - $ref: '#/components/schemas/TransferBranchInfoDefaultingToMain'
              discriminator:
                propertyName: branch_reason
                mapping:
                  defaulting_to_main:
                    $ref: '#/components/schemas/TransferBranchInfoDefaultingToMain'
                  traffic_split:
                    $ref: '#/components/schemas/TransferBranchInfoTrafficSplit'
            - type: 'null'
          title: Branch Info
        preserve_client_tts_overrides:
          type: boolean
          title: Preserve Client Tts Overrides
          default: false
      type: object
      required:
        - from_agent
        - to_agent
        - condition
      title: TransferToAgentToolResultSuccessModel
    TransferToAgentToolResultErrorModel:
      properties:
        result_type:
          type: string
          const: transfer_to_agent_error
          title: Result Type
          default: transfer_to_agent_error
        status:
          type: string
          const: error
          title: Status
          default: error
        from_agent:
          type: string
          title: From Agent
        error:
          type: string
          title: Error
      type: object
      required:
        - from_agent
        - error
      title: TransferToAgentToolResultErrorModel
      description: Error during transfer to agent.
    TransferToNumberResultTwilioSuccessModel:
      properties:
        result_type:
          type: string
          const: transfer_to_number_twilio_success
          title: Result Type
          default: transfer_to_number_twilio_success
        status:
          type: string
          const: success
          title: Status
          default: success
        transfer_number:
          type: string
          title: Transfer Number
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        client_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Message
        agent_message:
          type: string
          title: Agent Message
        conference_name:
          type: string
          title: Conference Name
        post_dial_digits:
          anyOf:
            - type: string
            - type: 'null'
          title: Post Dial Digits
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      required:
        - transfer_number
        - agent_message
        - conference_name
      title: TransferToNumberResultTwilioSuccessModel
      description: Successful Twilio transfer to number result.
    TransferToNumberResultSipSuccessModel:
      properties:
        result_type:
          type: string
          const: transfer_to_number_sip_success
          title: Result Type
          default: transfer_to_number_sip_success
        status:
          type: string
          const: success
          title: Status
          default: success
        transfer_number:
          type: string
          title: Transfer Number
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      required:
        - transfer_number
      title: TransferToNumberResultSipSuccessModel
      description: Successful SIP transfer to number result.
    TransferToNumberResultExotelSuccessModel:
      properties:
        result_type:
          type: string
          const: transfer_to_number_exotel_success
          title: Result Type
          default: transfer_to_number_exotel_success
        status:
          type: string
          const: success
          title: Status
          default: success
        transfer_number:
          type: string
          title: Transfer Number
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        agent_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Message
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      required:
        - transfer_number
      title: TransferToNumberResultExotelSuccessModel
      description: Successful Exotel transfer to number result.
    TransferToNumberResultErrorModel:
      properties:
        result_type:
          type: string
          const: transfer_to_number_error
          title: Result Type
          default: transfer_to_number_error
        status:
          type: string
          const: error
          title: Status
          default: error
        error:
          type: string
          title: Error
        details:
          anyOf:
            - type: string
            - type: 'null'
          title: Details
      type: object
      required:
        - error
      title: TransferToNumberResultErrorModel
      description: Error during transfer to number.
    SkipTurnToolResponseModel:
      properties:
        result_type:
          type: string
          const: skip_turn_success
          title: Result Type
          default: skip_turn_success
        status:
          type: string
          const: success
          title: Status
          default: success
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      title: SkipTurnToolResponseModel
      description: Result from skip turn tool.
    PlayDTMFResultSuccessModel:
      properties:
        result_type:
          type: string
          const: play_dtmf_success
          title: Result Type
          default: play_dtmf_success
        status:
          type: string
          const: success
          title: Status
          default: success
        dtmf_tones:
          type: string
          title: Dtmf Tones
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - dtmf_tones
      title: PlayDTMFResultSuccessModel
      description: Successful DTMF play result.
    PlayDTMFResultErrorModel:
      properties:
        result_type:
          type: string
          const: play_dtmf_error
          title: Result Type
          default: play_dtmf_error
        status:
          type: string
          const: error
          title: Status
          default: error
        error:
          type: string
          title: Error
        details:
          anyOf:
            - type: string
            - type: 'null'
          title: Details
      type: object
      required:
        - error
      title: PlayDTMFResultErrorModel
      description: Error during DTMF play.
    VoiceMailDetectionResultSuccessModel:
      properties:
        result_type:
          type: string
          const: voicemail_detection_success
          title: Result Type
          default: voicemail_detection_success
        status:
          type: string
          const: success
          title: Status
          default: success
        voicemail_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Voicemail Message
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      title: VoiceMailDetectionResultSuccessModel
      description: Successful voicemail detection result.
    TestToolResultModel:
      properties:
        result_type:
          type: string
          const: testing_tool_result
          title: Result Type
          default: testing_tool_result
        status:
          type: string
          const: success
          title: Status
          default: success
        reason:
          type: string
          title: Reason
          default: Skipping tool call in test mode
      type: object
      title: TestToolResultModel
      description: Result from test mode tool calls.
    KnowledgeBaseRagToolResultModel:
      properties:
        result_type:
          type: string
          const: knowledge_base_rag_success
          title: Result Type
          default: knowledge_base_rag_success
        status:
          $ref: '#/components/schemas/KnowledgeBaseRagToolStatus'
          default: success
        chunk_count:
          type: integer
          title: Chunk Count
          description: Number of relevant chunks retrieved
          default: 0
        message:
          type: string
          title: Message
          description: Human-readable status for the LLM about the search results
          default: Referenced knowledge base.
        chunks:
          items:
            $ref: '#/components/schemas/KnowledgeBaseRagChunkModel'
          type: array
          title: Chunks
          description: >-
            Retrieved chunks; populated only in the rag-result-in-tool-result
            mode
      type: object
      title: KnowledgeBaseRagToolResultModel
    KnowledgeBaseToolResultModel:
      properties:
        result_type:
          type: string
          const: knowledge_base_success
          title: Result Type
          default: knowledge_base_success
        status:
          $ref: '#/components/schemas/KnowledgeBaseToolStatus'
          default: success
        chunk_count:
          type: integer
          title: Chunk Count
          default: 0
        message:
          type: string
          title: Message
          default: Referenced knowledge base.
      type: object
      title: KnowledgeBaseToolResultModel
    DummyToolResultModel:
      properties:
        result_type:
          type: string
          const: dummy
          title: Result Type
          default: dummy
      type: object
      title: DummyToolResultModel
    WorkflowToolResponseModel-Input:
      properties:
        steps:
          items:
            oneOf:
              - $ref: '#/components/schemas/WorkflowToolEdgeStepModel'
              - $ref: '#/components/schemas/WorkflowToolNestedToolsStepModel-Input'
              - $ref: >-
                  #/components/schemas/WorkflowToolMaxIterationsExceededStepModel
            discriminator:
              propertyName: type
              mapping:
                edge:
                  $ref: '#/components/schemas/WorkflowToolEdgeStepModel'
                max_iterations_exceeded:
                  $ref: >-
                    #/components/schemas/WorkflowToolMaxIterationsExceededStepModel
                nested_tools:
                  $ref: '#/components/schemas/WorkflowToolNestedToolsStepModel-Input'
          type: array
          title: Steps
      type: object
      title: WorkflowToolResponseModel
      description: A common model for workflow tool responses.
    UserFeedbackScore:
      type: string
      enum:
        - like
        - dislike
      title: UserFeedbackScore
    MetricRecord:
      properties:
        elapsed_time:
          type: number
          title: Elapsed Time
      type: object
      required:
        - elapsed_time
      title: MetricRecord
      description: A single metric measurement.
    RagChunkMetadata:
      properties:
        document_id:
          type: string
          title: Document Id
        chunk_id:
          type: string
          title: Chunk Id
        vector_distance:
          type: number
          title: Vector Distance
      type: object
      required:
        - document_id
        - chunk_id
        - vector_distance
      title: RagChunkMetadata
    EmbeddingModelEnum:
      type: string
      enum:
        - e5_mistral_7b_instruct
        - multilingual_e5_large_instruct
      title: EmbeddingModelEnum
      default: e5_mistral_7b_instruct
    LLMInputOutputTokensUsage:
      properties:
        input:
          $ref: '#/components/schemas/LLMTokensCategoryUsage'
        input_cache_read:
          $ref: '#/components/schemas/LLMTokensCategoryUsage'
        input_cache_write:
          $ref: '#/components/schemas/LLMTokensCategoryUsage'
        output_total:
          $ref: '#/components/schemas/LLMTokensCategoryUsage'
      type: object
      title: LLMInputOutputTokensUsage
    GuardrailType:
      type: string
      enum:
        - custom
        - prompt_injection
        - self_harm_intent
        - violence_graphic
        - sexual
        - violence
        - harassment
        - sexual_minors
        - self_harm
        - self_harm_instructions
        - harassment_threatening
        - hate
        - hate_threatening
        - profanity
        - religion_or_politics
        - medical_and_legal
        - guardrail
      title: GuardrailType
    LLMParameterEvaluationStrategy:
      properties:
        type:
          type: string
          const: llm
          title: Type
        description:
          type: string
          title: Description
          description: A description of the evaluation strategy to use for the test.
      type: object
      required:
        - type
        - description
      title: LLMParameterEvaluationStrategy
    RegexParameterEvaluationStrategy:
      properties:
        type:
          type: string
          const: regex
          title: Type
        pattern:
          type: string
          title: Pattern
          description: A regex pattern to match the agent's response against.
      type: object
      required:
        - type
        - pattern
      title: RegexParameterEvaluationStrategy
    ExactParameterEvaluationStrategy:
      properties:
        type:
          type: string
          const: exact
          title: Type
        expected_value:
          type: string
          title: Expected Value
          description: The exact string value that the parameter must match.
      type: object
      required:
        - type
        - expected_value
      title: ExactParameterEvaluationStrategy
    MatchAnythingParameterEvaluationStrategy:
      properties:
        type:
          type: string
          const: anything
          title: Type
      type: object
      required:
        - type
      title: MatchAnythingParameterEvaluationStrategy
    TransferBranchInfoTrafficSplit:
      properties:
        branch_reason:
          type: string
          const: traffic_split
          title: Branch Reason
        branch_id:
          type: string
          title: Branch Id
        traffic_percentage:
          type: number
          title: Traffic Percentage
      type: object
      required:
        - branch_reason
        - branch_id
        - traffic_percentage
      title: TransferBranchInfoTrafficSplit
    TransferBranchInfoDefaultingToMain:
      properties:
        branch_reason:
          type: string
          const: defaulting_to_main
          title: Branch Reason
        branch_id:
          type: string
          title: Branch Id
      type: object
      required:
        - branch_reason
        - branch_id
      title: TransferBranchInfoDefaultingToMain
    KnowledgeBaseRagToolStatus:
      type: string
      enum:
        - success
        - no_documents
        - no_results
      title: KnowledgeBaseRagToolStatus
    KnowledgeBaseRagChunkModel:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
        document_id:
          type: string
          title: Document Id
        content:
          type: string
          title: Content
      type: object
      required:
        - chunk_id
        - document_id
        - content
      title: KnowledgeBaseRagChunkModel
    KnowledgeBaseToolStatus:
      type: string
      enum:
        - success
        - no_matching_documents
        - no_results
      title: KnowledgeBaseToolStatus
      default: success
    WorkflowToolEdgeStepModel:
      properties:
        step_latency_secs:
          type: number
          title: Step Latency Secs
        type:
          type: string
          const: edge
          title: Type
          default: edge
        edge_id:
          type: string
          title: Edge Id
        target_node_id:
          type: string
          title: Target Node Id
      type: object
      required:
        - step_latency_secs
        - edge_id
        - target_node_id
      title: WorkflowToolEdgeStepModel
      description: A workflow step that traverses an edge.
    WorkflowToolNestedToolsStepModel-Input:
      properties:
        step_latency_secs:
          type: number
          title: Step Latency Secs
        type:
          type: string
          const: nested_tools
          title: Type
          default: nested_tools
        node_id:
          type: string
          title: Node Id
        requests:
          items:
            $ref: >-
              #/components/schemas/ConversationHistoryTranscriptToolCallCommonModel-Input
          type: array
          title: Requests
        results:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptOtherToolsResultCommonModel
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptSystemToolResultCommonModel
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel-Input
              - $ref: >-
                  #/components/schemas/ConversationHistoryTranscriptWorkflowToolsResultCommonModel-Input
          type: array
          title: Results
        is_successful:
          type: boolean
          title: Is Successful
      type: object
      required:
        - step_latency_secs
        - node_id
        - requests
        - results
        - is_successful
      title: WorkflowToolNestedToolsStepModel
      description: A workflow step with nested tool calls.
    WorkflowToolMaxIterationsExceededStepModel:
      properties:
        step_latency_secs:
          type: number
          title: Step Latency Secs
        type:
          type: string
          const: max_iterations_exceeded
          title: Type
          default: max_iterations_exceeded
        max_iterations:
          type: integer
          title: Max Iterations
      type: object
      required:
        - step_latency_secs
        - max_iterations
      title: WorkflowToolMaxIterationsExceededStepModel
      description: Workflow step when max iterations exceeded.
    LLMTokensCategoryUsage:
      properties:
        tokens:
          type: integer
          title: Tokens
          default: 0
        price:
          type: number
          title: Price
          default: 0
      type: object
      title: LLMTokensCategoryUsage

````