Skip to documentation
Open Workflow Studio
On this page

Multi-turn

Workflow reference | Model | User input

Kind: MultiTurn
Configuration object: multiTurn

Use Multi-turn for a bounded conversation that refines a solution, accepts human feedback, or lets a model call configured tools. The runtime maintains the conversation history within the run.

Inputs

The initial task is the container's input. The first turn uses the configured model child's input template and request body. Subsequent turns use feedbackTemplate or a person's response.

Feedback and termination contexts include:

Binding Meaning
input Original task for this container invocation.
previous Latest complete solution, parsed into typed JSON when valid.
turn One-based turn number. Feedback starts before turn 2.
Named inputs Original incoming bindings available to templates and expressions.

Configuration

Property Default Usage
modelStep Empty Model child One configured Model, ChatCompletions, or Responses node with a globally unique ID.
maximumTurns 5 Integer 1-50.
feedbackTemplate Refinement prompt containing {{input}} Bounded text template, at most 256 KiB. Must be nonblank when automatic feedback is used.
userInput Unset Optional user-input configuration for feedback before subsequent turns.
until Unset Boolean expression evaluated after every complete solution, including turn 1.
mcps [] At most 20 MCP configurations exposed to the model. Disabled entries are omitted.

The model child must be a supported text conversation protocol. JSON model adapters and file-based Speech operations cannot serve as this conversation model.

Model-callable MCP tools

An explicit toolName exposes only that discovered tool; argumentsJson supplies defaults, and schema-valid model arguments override them. A blank tool name with argumentsJson: "{}" enables eligible tool discovery.

Discovery occurs once at conversation start and permits up to 64 MCP tools across the conversation. Tool names are namespaced. Automatic discovery excludes tools marked as modifying or destructive and excludes the WorkIQ mutation tools. Unannotated tools can be included, so enable only trusted servers. Explicit non-X selections can permit modifying operations. X always remains within its read-only allowlist.

A conversation permits at most eight tool-handoff rounds per turn and 64 tool calls per invocation. Supported JIT capability descriptors arriving through inputs also expose their run-scoped functions.

Outputs

Every complete turn produces an iteration revision in Preview. The container output is the latest complete solution when until becomes true or the turn limit is reached. The runtime maintains the transcript for the active conversation.

Streaming, usage, and tool activity are reported separately. The runtime rejects unsupported tool calls, incomplete provider responses, and unobserved asynchronous JIT operations.

Example

{
  "id": "refine",
  "name": "Refine a complete solution",
  "kind": "MultiTurn",
  "timeoutSeconds": 600,
  "multiTurn": {
    "maximumTurns": 3,
    "feedbackTemplate": "Review your latest solution for the original task: {{input}}\nProvide a complete revised solution.",
    "modelStep": {
      "id": "refinement-model",
      "name": "Refinement model",
      "kind": "Responses",
      "model": {
        "playground": "openai",
        "model": "my-chat-deployment",
        "protocol": "Responses",
        "endpoint": "https://example.openai.azure.com/openai/v1/responses",
        "credentialName": "MODEL_API_KEY",
        "authenticationHeader": "api-key",
        "requestBody": "{\"model\":\"my-chat-deployment\",\"input\":\"{{input}}\",\"stream\":true}"
      }
    },
    "mcps": []
  }
}

Supply the actual model connection and runtime credential. To make refinement interactive, configure userInput with a prompt such as What should change in turn {{turn}}? and provide a fresh user-input session through the host.

Operational notes

The container timeout covers the complete conversation, including tool discovery, all turns, and human feedback. Each model request also observes the child model's timeout. Choose deadlines that accommodate the complete interaction.

Stored Responses continuation is used only when allowed by the provider and retention settings. Otherwise the runtime maintains compatible history for the active run. Saved workflow configuration excludes prior conversations and credentials.

An unhandled error has occurred. Reload 🗙