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

# Tool History

> Get version history for a tool.



## OpenAPI

````yaml https://spec.speakeasy.com/syllable/syllable/syllable-sdk-oas-with-code-samples get /api/v1/tools/{tool_id}/history
openapi: 3.1.0
info:
  title: SyllableSDK
  description: >

    # Syllable Platform SDK


    Syllable SDK gives you the power of awesome AI agentry. 🚀


    ## Overview


    The Syllable SDK provides a comprehensive set of tools and APIs to integrate
    powerful AI

    capabilities into your communication applications. Whether you're building
    phone agents, chatbots,

    virtual assistants, or any other AI-driven solutions, Syllable SDK has got
    you covered.


    ## Features


    - **Agent Configuration**: Create and manage agents that can interact with
    users across various 

    channels.

    - **Channel Management**: Configure channels like SMS, web chat, and more to
    connect agents with 

    users.

    - **Custom Messages**: Set up custom messages that agents can deliver as
    greetings or responses.

    - **Conversations**: Track and manage conversations between users and
    agents, including session 

    management.

    - **Tools and Workflows**: Leverage tools and workflows to enhance agent
    capabilities, such as data 

    processing and API calls.

    - **Data Sources**: Integrate data sources to provide agents with additional
    context and 

    information.

    - **Insights and Analytics**: Analyze conversations and sessions to gain
    insights into user 

    interactions.

    - **Permissions and Security**: Manage permissions to control access to
    various features and 

    functionalities.

    - **Language Support**: Define language groups to enable multilingual
    support for agents.

    - **Outbound Campaigns**: Create and manage outbound communication campaigns
    to reach users 

    effectively.

    - **Session Labels**: Label sessions with evaluations of quality and
    descriptions of issues 

    encountered.

    - **Incident Management**: Track and manage incidents related to agent
    interactions.
  version: 0.0.3
servers:
  - url: https://api.syllable.cloud
    description: API server
security: []
tags:
  - name: agents
    description: >-
      Operations related to agent configuration. When a user interacts with
      the           Syllable system, they do so by communicating with an
      agent.           An agent is linked to a prompt, a custom message, and one
      or more channel targets to           define its behavior and capabilities.
      For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Agents).
  - name: agents.test
    description: >-
      Operations for testing agents with live text.           These endpoints
      allow sending messages to an agent and receiving its responses.
  - name: channels
    description: >-
      Operations related to channel configuration.           A channel is an
      organization-level point of communication, like a phone number or a
      web           chat. A channel can be associated with an agent by creating
      a channel target linking           them.
  - name: channels.twilio
    description: Operations related to Twilio channel configuration.
  - name: channels.twilio.numbers
    description: >-
      Operations related to setting up phone numbers in Twilio for use
      in           channels.
  - name: channels.targets
    description: >-
      Operations related to channel target configuration. A channel
      target           links a channel to an agent, allowing users to
      communicate with the agent through that           channel. For more
      information, see           [Console
      docs](https://docs.syllable.ai/Resources/Channels).
  - name: conversations
    description: >-
      Operations related to conversations.           A conversation is a record
      of messages between a user and an agent, and is composed of           one
      or more sessions.
  - name: custom_messages
    description: >-
      Operations related to custom message configuration.           A custom
      message is a pre-configured message delivered by an agent as a greeting at
      the           beginning of a conversation. Multiple agents can use the
      same custom mesasage. A custom           message has one or more rules
      defined, which allow for different messages to be           dynamically
      selected and delivered at runtime based on the current time and
      either           date or day of the week. For more information,
      see           [Console docs](https://docs.syllable.ai/Resources/Messages).
  - name: dashboards
    description: >-
      Operations related to dashboards. Currently the API/SDK           only
      supports fetching basic information about dashboards.
  - name: data_sources
    description: >-
      Operations related to data sources. A data source is a blob of text
      that           can be made available to an agent's general info tools to
      provide more context to the           agent when generating its responses.
      For more information, see           [Console
      docs](https://docs.syllable.ai/Resources/DataSources).
  - name: directory
    description: Operations related to directory
  - name: events
    description: >-
      Operations related to events. An event represents a specific
      occurrence           during a session. Currently the API/SDK only supports
      fetching logged events.
  - name: incidents
    description: Operations related to incidents.
  - name: insights
    description: >-
      Operations related to insights results. An insight is a tool that
      processes          conversation data to extract information and generate
      reports.
  - name: insights.folders
    description: >-
      Operations related to insights upload folders. An insight folder is
      used          to upload call recordings for insight workflow analysis.
  - name: insights.tools
    description: >-
      Operations related to insights tool configurationss. An insight is a
      tool           that processes conversation data to extract information and
      generate reports.
  - name: insights.workflows
    description: >-
      Operations related to insights workflows. An workflow is series of
      tool           invocations that processes conversation data to extract
      information and generate           reports.
  - name: language_groups
    description: >-
      Operations related to language groups. A language group is a          
      collection of language, voice, and DTMF configuration that can be linked
      to an agent to           define the languages and voices it supports. For
      more information, see           [Console
      docs](https://docs.syllable.ai/Resources/LanguageGroups).
  - name: organizations
    description: Operations related to organizations.
  - name: outbound.campaigns
    description: Operations related to outbound message campaigns
  - name: outbound.batches
    description: Operations related to outbound campaign batches
  - name: permissions
    description: >-
      Operations related to permissions. A permission is a specific          
      capability or access level granted to a user within the Syllable
      system.           Permissions are used to control access to various
      features and functionalities.
  - name: prompts
    description: >-
      Operations related to prompts. A prompt defines the behavior of
      an           agent by delivering instructions to the LLM about how the
      agent should behave.           A prompt can be linked to one or more
      agents. A prompt can also be linked to tools to           allow an agent
      using the prompt to use them. For more information, see           [Console
      docs](https://docs.syllable.ai/Resources/Prompts).
  - name: roles
    description: >-
      Operations related to roles. A role is a collection of
      permissions           that can be assigned to users to control their
      access to various features within the           Syllable system.
  - name: services
    description: >-
      Operations related to service configuration. A service is a collection
      of           tools. You can specify an authentication method and values on
      a service, and any linked           tools will use that auth information
      to generate headers for HTTP calls.
  - name: sessions
    description: >-
      Operations related to sessions. A session is a building block of
      a           conversation. For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Sessions).
  - name: session_labels
    description: >-
      Operations related to labeling sessions with evaluations of quality
      and           descriptions of issues the user encountered or other
      details. For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Sessions).
  - name: tools
    description: >-
      Operations related to tool configuration. A tool is a function that
      an           agent can call to perform actions like accessing databases,
      making API calls, or           processing data. For an agent to have
      access to a tool, the prompt associated with that           agent should
      be linked to the tool and include instructions to use it. For
      more           information, see [Console
      docs](https://docs.syllable.ai/Resources/Tools).
paths:
  /api/v1/tools/{tool_id}/history:
    get:
      tags:
        - tools
      summary: Tool History
      description: Get version history for a tool.
      operationId: tool_history
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: integer
            title: Tool Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Page number (0-based)
            default: 0
            title: Page
          description: Page number (0-based)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page
            default: 25
            title: Limit
          description: Items per page
        - name: order_by_direction
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OrderByDirection'
            description: >-
              Sort by oldest first (asc) or newest first (desc). Version 1 is
              always the oldest.
            default: asc
          description: >-
            Sort by oldest first (asc) or newest first (desc). Version 1 is
            always the oldest.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_ToolHistoryResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { SyllableSDK } from "syllable-sdk";

            const syllableSDK = new SyllableSDK({
              apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
            });

            async function run() {
              const result = await syllableSDK.tools.toolHistory({
                toolId: 217978,
              });

              console.log(result);
            }

            run();
        - lang: python
          label: Python (SDK)
          source: |-
            import os
            from syllable_sdk import SyllableSDK


            with SyllableSDK(
                api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
            ) as ss_client:

                res = ss_client.tools.tool_history(tool_id=217978, page=0, limit=25)

                # Handle response
                print(res)
components:
  schemas:
    OrderByDirection:
      type: string
      enum:
        - asc
        - desc
      title: OrderByDirection
      description: >-
        The direction in which to order list results, either ascending or
        descending.
    ListResponse_ToolHistoryResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ToolHistoryResponse'
          type: array
          title: Items
          description: List of items returned from the query
          examples: []
        page:
          type: integer
          title: Page
          description: The page number of the results (0-based)
          examples:
            - 0
        page_size:
          type: integer
          title: Page Size
          description: The number of items returned per page
          examples:
            - 25
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
          description: The total number of pages of results given the indicated page size
          examples:
            - 4
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: The total number of items returned from the query
          examples:
            - 100
      type: object
      required:
        - items
        - page
        - page_size
      title: ListResponse[ToolHistoryResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToolHistoryResponse:
      properties:
        tool_id:
          type: integer
          title: Tool Id
          description: ID of the tool
          examples:
            - 1
        version_number:
          type: integer
          title: Version Number
          description: Monotonic version for this tool (1 = oldest)
          examples:
            - 1
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When this version took effect.
          examples:
            - '2024-01-01T12:00:00Z'
        updated_by:
          type: string
          title: Updated By
          description: User who made the change that produced this row
          examples:
            - user@email.com
        comments:
          anyOf:
            - type: string
            - type: 'null'
          title: Comments
          description: Optional comment stored on the tool for this version
          examples:
            - Adjusted timeout
        operation:
          type: string
          title: Operation
          description: 'What produced this row: create, update, or delete'
          examples:
            - update
        deleted_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Deleted Reason
          description: When operation is delete, reason copied from the tool at delete time
          examples:
            - No longer used
        service_id:
          type: integer
          title: Service Id
          description: Internal ID of the service this tool belonged to at this version
          examples:
            - 1
        service_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Name
          description: Service display name.
          examples:
            - Weather API
        name:
          type: string
          title: Name
          description: Tool name at this version
          examples:
            - get_weather
        description:
          type: string
          title: Description
          description: Human-readable description of the tool at this version
          examples:
            - Fetch weather
        type:
          type: string
          title: Type
          description: 'Tool type at this version: ''action'', ''endpoint'', ''context'', or ''log'''
          examples:
            - endpoint
        definition:
          $ref: '#/components/schemas/ToolDefinition'
          description: >-
            Full tool definition for this version (same shape as
            ToolResponse.definition).
          examples:
            - endpoint:
                argument_location: query
                method: get
                url: https://api.open-meteo.com/v1/forecast
              static_parameters:
                - default: fahrenheit
                  description: >-
                    Whether the temperature information should be fetched in
                    Celsius or Fahrenheit
                  name: temperature_unit
                  required: false
                  type: string
              tool:
                function:
                  description: Get the weather for a city
                  name: get_weather
                  parameters:
                    properties:
                      latitude:
                        description: Latitude of the city
                        type: number
                      longitude:
                        description: Longitude of the city
                        type: number
                      current:
                        default: >-
                          temperature_2m,relative_humidity_2m,precipitation,rain,showers
                        description: >-
                          Information to retrieve from the open-meteo API,
                          comma-separated
                        type: string
                    required:
                      - latitude
                      - longitude
                      - current
                    type: object
                type: function
              type: endpoint
      type: object
      required:
        - tool_id
        - version_number
        - created_at
        - updated_by
        - operation
        - service_id
        - name
        - description
        - type
        - definition
      title: ToolHistoryResponse
      description: API response for one row in GET /tools/{tool_id}/history.
    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
    ToolDefinition:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - action
                - endpoint
                - context
                - log
            - type: 'null'
          title: Type
          description: The action to take when the LLM calls the tool.
          examples:
            - endpoint
        tool:
          $ref: '#/components/schemas/InternalTool'
          description: The tool definition to be used by the OpenAI API.
          examples: []
        endpoint:
          anyOf:
            - $ref: '#/components/schemas/ToolHttpEndpoint'
            - type: 'null'
          description: The configuration for an HTTP API call.
          examples: []
        context:
          anyOf:
            - $ref: '#/components/schemas/Context'
            - type: 'null'
          description: The configuration for a context tool.
        defaults:
          anyOf:
            - {}
            - additionalProperties:
                $ref: '#/components/schemas/ToolParameterDefault'
              type: object
            - type: 'null'
          title: Defaults
          description: The default values for the parameters of the function/tool call.
          examples: []
        static_parameters:
          anyOf:
            - items:
                $ref: '#/components/schemas/StaticToolParameter'
              type: array
            - type: 'null'
          title: Static Parameters
          description: >-
            Parameters for the tool whose values should be set at config time
            (i.e., not provided by the LLM).
          examples:
            - - default: fahrenheit
                description: >-
                  Whether the temperature information should be fetched in
                  Celsius or Fahrenheit
                name: temperature_unit
                required: false
                type: string
        result:
          anyOf:
            - {}
            - type: 'null'
          title: Result
          description: The optional result of the tool call.
          examples: []
        options:
          anyOf:
            - $ref: '#/components/schemas/ToolOptions'
            - type: 'null'
          description: >-
            The options for the tool. Ie allows to propagate the tool result to
            the caller via propagate_tool_result flag.
          examples: []
      type: object
      required:
        - tool
      title: ToolDefinition
      description: >-
        A tool that can be called from an LLM during the conversation. See
        https://docs.syllable.ai/Resources/Tools.
    InternalTool:
      properties:
        type:
          type: string
          const: function
          title: Type
          description: Always `function`.
          default: function
          examples:
            - function
        function:
          $ref: '#/components/schemas/ToolFunction'
          description: >-
            The tool function definition, including the JSON Schema of its
            parameters.
          examples: []
      type: object
      required:
        - function
      title: InternalTool
      description: A tool definition to be used by the OpenAI API.
    ToolHttpEndpoint:
      properties:
        url:
          type: string
          title: Url
          description: The endpoint URL of the external service to call.
          examples:
            - https://api.example.com
        method:
          $ref: '#/components/schemas/ToolHttpMethod'
          description: The HTTP method to use for the service call.
          examples:
            - get
        argument_location:
          $ref: '#/components/schemas/ToolArgumentLocation'
          description: How to pass the arguments to the request.
          examples:
            - query
        timeout:
          anyOf:
            - type: number
              maximum: 120
              minimum: 1
            - type: 'null'
          title: Timeout
          description: >-
            Timeout in seconds for the HTTP request. Default 20 seconds when not
            set.
          examples:
            - 45
      type: object
      required:
        - url
        - method
        - argument_location
      title: ToolHttpEndpoint
      description: The configuration for an HTTP API call by a tool.
    Context:
      properties:
        task:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ExpressionTask'
                - $ref: '#/components/schemas/LoadToolFromFileTask'
                - $ref: '#/components/schemas/EventTask'
                - $ref: '#/components/schemas/StepsTask'
              discriminator:
                propertyName: type
                mapping:
                  event:
                    $ref: '#/components/schemas/EventTask'
                  expression:
                    $ref: '#/components/schemas/ExpressionTask'
                  import:
                    $ref: '#/components/schemas/LoadToolFromFileTask'
                  steps:
                    $ref: '#/components/schemas/StepsTask'
            - items:
                oneOf:
                  - $ref: '#/components/schemas/ExpressionTask'
                  - $ref: '#/components/schemas/LoadToolFromFileTask'
                  - $ref: '#/components/schemas/EventTask'
                  - $ref: '#/components/schemas/StepsTask'
                discriminator:
                  propertyName: type
                  mapping:
                    event:
                      $ref: '#/components/schemas/EventTask'
                    expression:
                      $ref: '#/components/schemas/ExpressionTask'
                    import:
                      $ref: '#/components/schemas/LoadToolFromFileTask'
                    steps:
                      $ref: '#/components/schemas/StepsTask'
              type: array
            - type: 'null'
          title: Task
          description: Task implementation details
      type: object
      title: Context
    ToolParameterDefault:
      properties:
        transform:
          $ref: '#/components/schemas/ToolParameterTransform'
          description: The transform to apply to the value before using it as the default.
          examples: []
      type: object
      required:
        - transform
      title: ToolParameterDefault
      description: The default value for a parameter of a tool call.
    StaticToolParameter:
      properties:
        name:
          type: string
          title: Name
          description: The name of the parameter - must be unique within the tool.
          examples:
            - temperature_unit
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the parameter.
          examples:
            - >-
              Whether the temperature information should be fetched in celsius
              or fahrenheit.
        required:
          type: boolean
          title: Required
          description: Whether the parameter is required to have a value assigned.
          examples:
            - true
        type:
          $ref: '#/components/schemas/StaticToolParameterType'
          description: The expected type for the parameter.
          examples:
            - string
        default:
          anyOf:
            - {}
            - type: 'null'
          title: Default
          description: >-
            The default value for the parameter. If `type` is string, must be a
            string. If `type` is int, must be an int. If `type` is boolean, must
            be a boolean. If `type` is data_source_list, must be a list of
            strings (data source names).
          examples:
            - fahrenheit
      type: object
      required:
        - name
        - required
        - type
      title: StaticToolParameter
      description: A parameter for the tool whose value should be set at config time.
    ToolOptions:
      properties:
        propagate_tool_result:
          type: boolean
          title: Propagate Tool Result
          description: Whether the tool call result should be propagated to the caller.
          default: false
      type: object
      title: ToolOptions
      description: The options for a tool call.
    ToolFunction:
      properties:
        name:
          type: string
          title: Name
          description: The name of the function/tool call.
          examples:
            - get_weather
        description:
          type: string
          title: Description
          description: The description of the tool.
          examples:
            - Get the weather for a city
        parameters:
          title: Parameters
          description: The JSON Schema of parameters of the function/tool call.
          examples:
            - {}
      type: object
      required:
        - name
        - description
        - parameters
      title: ToolFunction
      description: >-
        A function available to an agent.


        See:

        -
        https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling
    ToolHttpMethod:
      type: string
      enum:
        - get
        - post
        - put
        - delete
      title: ToolHttpMethod
      description: The HTTP method to use for a tool HTTP request.
    ToolArgumentLocation:
      type: string
      enum:
        - body
        - form
        - path
        - query
      title: ToolArgumentLocation
      description: |-
        The location of the argument in a tool HTTP request.
        'body' is used for JSON data in the POST request body.
        'form' is used for form data in the POST request body.
        'path' is used for URL path parameters.
        'query' is used for query parameters in the URL.
    ExpressionTask:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: A unique identifier for the task.
        config:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Config
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/Variable'
              type: array
            - type: 'null'
          title: Variables
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ContextTaskMetadata'
            - type: 'null'
        tool:
          anyOf:
            - $ref: '#/components/schemas/ContextToolInfo'
            - type: 'null'
        type:
          type: string
          const: expression
          title: Type
          default: expression
        version:
          type: string
          const: v1alpha
          title: Version
          default: v1alpha
        inputs:
          items:
            $ref: '#/components/schemas/InputParameter'
          type: array
          title: Inputs
        expression:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: Expression
          description: >-
            Expression for task output/logic. Supported expression forms: (1)
            JMESPath string (default for plain strings), (2) typed JMESPath
            object {"type":"jp"|"jmespath","expression":"..."}, or (3) typed CEL
            object {"type":"cel","expression":"..."}.
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        output:
          anyOf:
            - $ref: '#/components/schemas/JsonValue'
            - type: 'null'
        'on':
          $ref: '#/components/schemas/ExpressionTaskEvents'
          description: Actions to execute when the configured events occur.
      type: object
      title: ExpressionTask
    LoadToolFromFileTask:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: A unique identifier for the task.
        config:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Config
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/Variable'
              type: array
            - type: 'null'
          title: Variables
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ContextTaskMetadata'
            - type: 'null'
        tool:
          anyOf:
            - $ref: '#/components/schemas/ContextToolInfo'
            - type: 'null'
        type:
          type: string
          const: import
          title: Type
          default: import
        version:
          type: string
          const: v1alpha
          title: Version
          default: v1alpha
        file:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: File
          description: The local path of the tool definition JSON file.
      type: object
      required:
        - file
      title: LoadToolFromFileTask
      description: >-
        Bootstraps a tool from a file (for internal developer use only if
        ENV.local=True).
    EventTask:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: A unique identifier for the task.
        config:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Config
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/Variable'
              type: array
            - type: 'null'
          title: Variables
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ContextTaskMetadata'
            - type: 'null'
        tool:
          anyOf:
            - $ref: '#/components/schemas/ContextToolInfo'
            - type: 'null'
        type:
          type: string
          const: event
          title: Type
          default: event
        version:
          type: string
          const: v1alpha
          title: Version
          default: v1alpha
        'on':
          $ref: '#/components/schemas/EventTaskEvents'
          description: Actions to execute when the configured events occur.
      type: object
      title: EventTask
    StepsTask:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: A unique identifier for the task.
        config:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Config
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/Variable'
              type: array
            - type: 'null'
          title: Variables
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ContextTaskMetadata'
            - type: 'null'
        tool:
          anyOf:
            - $ref: '#/components/schemas/ContextToolInfo'
            - type: 'null'
        type:
          type: string
          const: steps
          title: Type
          default: steps
        version:
          type: string
          const: v1alpha
          title: Version
          default: v1alpha
        start:
          type: string
          enum:
            - auto
            - manual
          title: Start
          description: >-
            Controls when the workflow activation lifecycle runs. `auto`
            activates at session start; `manual` activates on first invocation.
          default: auto
        steps:
          items:
            $ref: '#/components/schemas/Step'
          type: array
          title: Steps
      type: object
      title: StepsTask
    ToolParameterTransform:
      properties:
        action:
          type: string
          enum:
            - default
            - override
            - remove
          title: Action
          description: >-
            The action to perform on the tool parameter value: `default` means
            only set the value (using the `format` field) if the parameter
            doesn't exist or is empty, `override` means always set the value,"
            and `remove` means "remove the parameter value."
          default: default
          examples: []
        when:
          anyOf:
            - $ref: '#/components/schemas/ToolParameterTransformCondition'
            - type: 'null'
          description: Only apply the transform if the condition is met.
          examples: []
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
          description: The default value to use for the parameter.
          examples: []
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
          description: >-
            The string value to use for the parameter. The value will be
            evaluated with the Python `str.format` method, for example, `Hello,
            {name}!`
          examples: []
      type: object
      title: ToolParameterTransform
      description: >-
        A transform to be applied to the value of a tool parameter.


        Either `value` or `format` must be set:

        - `value` is any arbitrary value: string, list or dictionary.

        - `format` is a string composed of other parameters or context
        variables.
    StaticToolParameterType:
      type: string
      enum:
        - string
        - int
        - boolean
        - data_source_list
      title: StaticToolParameterType
      description: The expected type for a static tool parameter.
    JsonValue: {}
    Variable:
      properties:
        value:
          anyOf:
            - $ref: '#/components/schemas/JsonValue'
            - type: 'null'
          description: Initial value of the variable.
        valueFrom:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: Valuefrom
          description: >-
            Expression that computes the value. Supported expression forms: (1)
            JMESPath string (default for plain strings), (2) typed JMESPath
            object {"type":"jp"|"jmespath","expression":"..."}, or (3) typed CEL
            object {"type":"cel","expression":"..."}. Mutually exclusive with
            value.
          examples:
            - inputs.provided_dob == patient_dob
            - expression: inputs.provided_dob == patient_dob
              type: jmespath
            - expression: inputs.count + 1
              type: cel
        name:
          type: string
          title: Name
          description: The name of the property.
        type:
          anyOf:
            - type: string
              enum:
                - string
                - number
                - integer
                - boolean
                - object
                - array
                - 'null'
            - type: 'null'
          title: Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
        pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Pattern
        enum:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum
        examples:
          anyOf:
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: Examples
      type: object
      required:
        - name
      title: Variable
    ContextTaskMetadata:
      properties:
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
      type: object
      title: ContextTaskMetadata
    ContextToolInfo:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The name of the generated tool.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the tool.
      type: object
      title: ContextToolInfo
    InputParameter:
      properties:
        name:
          type: string
          title: Name
          description: The name of the property.
        type:
          anyOf:
            - type: string
              enum:
                - string
                - number
                - integer
                - boolean
                - object
                - array
                - 'null'
            - type: 'null'
          title: Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
        pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Pattern
        enum:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Enum
        examples:
          anyOf:
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: Examples
        required:
          type: boolean
          title: Required
          default: true
      type: object
      required:
        - name
      title: InputParameter
    CelExpression:
      properties:
        expression:
          type: string
          title: Expression
          description: CEL expression string.
          examples:
            - inputs.can_sign_consent == true
        type:
          type: string
          const: cel
          title: Type
          description: >-
            CEL expression language selector. Use with object form
            {"type":"cel","expression":"..."}.
          default: cel
      type: object
      required:
        - expression
      title: CelExpression
      description: |-
        Google CEL expression object.

        Use this object form when you want CEL syntax:
        {"type": "cel", "expression": "inputs.count + 1"}
        See https://github.com/google/cel-spec/blob/master/doc/langdef.md
    JMESPathExpression:
      properties:
        expression:
          type: string
          title: Expression
          description: JMESPath expression string.
          examples:
            - inputs.can_sign_consent == `true`
        type:
          type: string
          enum:
            - jp
            - jmespath
          title: Type
          description: >-
            JMESPath expression language selector. Use with object form
            {"type":"jp"|"jmespath","expression":"..."}.
          default: jp
      type: object
      required:
        - expression
      title: JMESPathExpression
      description: |-
        JMESPath expression object.

        Use this object form to explicitly mark JMESPath syntax:
        {"type": "jp", "expression": "inputs.can_sign_consent == `true`"}
        See https://jmespath.org/specification.html#grammar
    CaseExpression:
      properties:
        case:
          items:
            $ref: '#/components/schemas/ConditionalValue'
          type: array
          title: Case
          description: Ordered conditional branches (reserved for future runtime support).
      type: object
      required:
        - case
      title: CaseExpression
      description: >-
        Conditional branch expression.


        Note: CaseExpression is currently reserved and not yet executed at
        runtime.
    ExpressionTaskEvents:
      properties:
        start:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Start
          description: Actions to execute on the first input from the user.
        submit:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/SaveAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    save:
                      $ref: '#/components/schemas/SaveAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Submit
          description: Actions to execute when the tool/step is submitted by the LLM.
      type: object
      title: ExpressionTaskEvents
      description: Actions to perform when events occur (start, submit).
    EventTaskEvents:
      properties:
        start:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Start
          description: Actions to execute on the first input from the user.
      type: object
      title: EventTaskEvents
    Step:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier of the step.
        goal:
          type: string
          title: Goal
          description: The goal of the step.
        instructions:
          items:
            anyOf:
              - $ref: '#/components/schemas/ConditionalText'
              - type: string
          type: array
          title: Instructions
          description: The instructions for the step.
        tools:
          $ref: '#/components/schemas/StepTools'
          description: The tools configuration for the step.
        inputs:
          items:
            $ref: '#/components/schemas/InputParameter'
          type: array
          title: Inputs
          description: The inputs for the step.
        'on':
          $ref: '#/components/schemas/StepEventActions'
          description: The events that trigger the actions to be executed.
        next:
          items:
            anyOf:
              - $ref: '#/components/schemas/NextStep'
              - type: string
          type: array
          title: Next
          description: The next steps to execute.
      type: object
      required:
        - id
        - goal
      title: Step
    ToolParameterTransformCondition:
      properties:
        key:
          type: string
          title: Key
          description: The name of the parameter to check.
          examples:
            - key
        value:
          type: string
          title: Value
          description: The value to check against the parameter.
          examples:
            - value
        operator:
          anyOf:
            - type: string
              const: eq
            - type: 'null'
          title: Operator
          description: The operator to use for the comparison. Currently only supports "eq"
          default: eq
          examples:
            - eq
      type: object
      required:
        - key
        - value
      title: ToolParameterTransformCondition
      description: >-
        A condition to be met for a transform to be applied to the value of a
        tool parameter.
    ConditionalValue:
      properties:
        value:
          anyOf:
            - $ref: '#/components/schemas/JsonValue'
            - type: 'null'
          description: Initial value of the variable.
        valueFrom:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: Valuefrom
          description: >-
            Expression that computes the value. Supported expression forms: (1)
            JMESPath string (default for plain strings), (2) typed JMESPath
            object {"type":"jp"|"jmespath","expression":"..."}, or (3) typed CEL
            object {"type":"cel","expression":"..."}. Mutually exclusive with
            value.
          examples:
            - inputs.provided_dob == patient_dob
            - expression: inputs.provided_dob == patient_dob
              type: jmespath
            - expression: inputs.count + 1
              type: cel
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
      type: object
      title: ConditionalValue
    SetValueAction:
      properties:
        value:
          anyOf:
            - $ref: '#/components/schemas/JsonValue'
            - type: 'null'
          description: Initial value of the variable.
        valueFrom:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: Valuefrom
          description: >-
            Expression that computes the value. Supported expression forms: (1)
            JMESPath string (default for plain strings), (2) typed JMESPath
            object {"type":"jp"|"jmespath","expression":"..."}, or (3) typed CEL
            object {"type":"cel","expression":"..."}. Mutually exclusive with
            value.
          examples:
            - inputs.provided_dob == patient_dob
            - expression: inputs.provided_dob == patient_dob
              type: jmespath
            - expression: inputs.count + 1
              type: cel
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        action:
          type: string
          const: set
          title: Action
          default: set
        name:
          type: string
          title: Name
          description: Destination path to mutate (e.g. output.foo).
      type: object
      required:
        - name
      title: SetValueAction
    IncrementAction:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        action:
          type: string
          const: inc
          title: Action
          default: inc
        name:
          type: string
          title: Name
          description: Numeric destination path to increment.
        by:
          type: integer
          title: By
          description: Increment amount (defaults to 1).
          default: 1
      type: object
      required:
        - name
      title: IncrementAction
    CallAction:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        action:
          type: string
          const: call
          title: Action
          default: call
        name:
          type: string
          title: Name
          description: The name of the tool to call.
        arguments:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Arguments
          description: Optional arguments to pass to the tool (supports template strings)
      type: object
      required:
        - name
      title: CallAction
    SayAction:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        text:
          type: string
          title: Text
          description: Text to apply if the condition is true.
        action:
          type: string
          const: say
          title: Action
          default: say
        role:
          type: string
          enum:
            - user
            - assistant
          title: Role
          description: The role of the message.
          default: assistant
      type: object
      required:
        - text
      title: SayAction
    SaveAction:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        action:
          type: string
          const: save
          title: Action
          default: save
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Target name to save (defaults to global variable).
        inputs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Inputs
          description: Input field names to persist; None saves all collected inputs.
      type: object
      title: SaveAction
    ConditionalText:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        text:
          type: string
          title: Text
          description: Text to apply if the condition is true.
      type: object
      required:
        - text
      title: ConditionalText
    StepTools:
      properties:
        call:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Call
          description: Whether to force immediate tool call without user interaction.
        allow:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allow
          description: List of allowed tool names for this step.
        allowGoToStep:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Allowgotostep
          description: >-
            Whether to expose the go_to_step escape hatch to the LLM. Defaults
            to disabled.
      type: object
      title: StepTools
      description: Configuration for tools available in a step.
    StepEventActions:
      properties:
        start:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Start
          description: Actions to execute on the first input from the user.
        enter:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/GetValueAction'
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    get:
                      $ref: '#/components/schemas/GetValueAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    load:
                      $ref: '#/components/schemas/GetValueAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Enter
          description: Actions to execute when entering a step (before collecting inputs).
        presubmit:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/GetValueAction'
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/SaveAction'
                discriminator:
                  propertyName: action
                  mapping:
                    get:
                      $ref: '#/components/schemas/GetValueAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    load:
                      $ref: '#/components/schemas/GetValueAction'
                    save:
                      $ref: '#/components/schemas/SaveAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Presubmit
          description: >-
            Actions to execute before validation (data-mutation only: set, inc,
            save). Use this to set default values for required fields that would
            otherwise fail validation.
        submit:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/SetValueAction'
                  - $ref: '#/components/schemas/IncrementAction'
                  - $ref: '#/components/schemas/SaveAction'
                  - $ref: '#/components/schemas/CallAction'
                  - $ref: '#/components/schemas/SayAction'
                discriminator:
                  propertyName: action
                  mapping:
                    call:
                      $ref: '#/components/schemas/CallAction'
                    inc:
                      $ref: '#/components/schemas/IncrementAction'
                    save:
                      $ref: '#/components/schemas/SaveAction'
                    say:
                      $ref: '#/components/schemas/SayAction'
                    set:
                      $ref: '#/components/schemas/SetValueAction'
              type: array
            - type: 'null'
          title: Submit
          description: Actions to execute when the tool/step is submitted by the LLM.
      type: object
      title: StepEventActions
      description: Actions to perform when events occur (enter, presubmit, submit).
    NextStep:
      properties:
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        id:
          type: string
          title: Id
          description: The identifier of the next step.
        requires:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Requires
          description: >-
            List of input field names required for this transition. Validates
            that specified inputs are collected before allowing transition.
      type: object
      required:
        - id
      title: NextStep
      description: Represents a conditional transition to the next step.
    GetValueAction:
      properties:
        value:
          anyOf:
            - $ref: '#/components/schemas/JsonValue'
            - type: 'null'
          description: Initial value of the variable.
        valueFrom:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: Valuefrom
          description: >-
            Expression that computes the value. Supported expression forms: (1)
            JMESPath string (default for plain strings), (2) typed JMESPath
            object {"type":"jp"|"jmespath","expression":"..."}, or (3) typed CEL
            object {"type":"cel","expression":"..."}. Mutually exclusive with
            value.
          examples:
            - inputs.provided_dob == patient_dob
            - expression: inputs.provided_dob == patient_dob
              type: jmespath
            - expression: inputs.count + 1
              type: cel
        if:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/CelExpression'
                - $ref: '#/components/schemas/JMESPathExpression'
              discriminator:
                propertyName: type
                mapping:
                  cel:
                    $ref: '#/components/schemas/CelExpression'
                  jmespath:
                    $ref: '#/components/schemas/JMESPathExpression'
                  jp:
                    $ref: '#/components/schemas/JMESPathExpression'
            - $ref: '#/components/schemas/CaseExpression'
            - type: string
            - type: 'null'
          title: If
          description: >-
            Condition to decide whether this item executes. Supported expression
            forms: (1) JMESPath string (default for plain strings), (2) typed
            JMESPath object {"type":"jp"|"jmespath","expression":"..."}, or (3)
            typed CEL object {"type":"cel","expression":"..."}. Example JMESPath
            string: "inputs.can_sign_consent == `true`".
          examples:
            - inputs.can_sign_consent == `true`
            - expression: inputs.can_sign_consent == `true`
              type: jp
            - expression: inputs.can_sign_consent == true
              type: cel
        action:
          type: string
          enum:
            - get
            - load
          title: Action
          description: Populate default input values.
          default: get
        inputs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Inputs
          description: Input field names to populate; None populates all step inputs.
        overwrite:
          type: boolean
          title: Overwrite
          description: >-
            If False (default), only populate empty inputs. If True, always
            overwrite.
          default: false
      type: object
      title: GetValueAction
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Syllable-API-Key

````