Skip to content

Studio block reference

This page explains the purpose, configuration, and outputs of the eight main blocks. They all share the basic information, advanced configuration, and output links.

Simple message

Returns fixed text or text enriched with variables. Use it for a response without an LLM, a confirmation, a fallback, or temporary diagnostics.

FieldRequiredDescription
MessageYesReturned text; accepts variables and helpers

Output: message, for example {{simpleMessage-1.message}}.

txt
Hello {{userData.givenName}}, your request is: {{userMessage}}

To inspect a value during development:

txt
{{codeblock documents.body}}

Best practices: keep messages short, connect technical failures to a user-friendly message, and remove debug blocks before publication.

Common errors: an empty message, a misspelled variable, an unconnected fallback, or sensitive data exposed by a debug helper.

HTTP request

Calls an internal or external API to query a business service, run a specialized search, or send data.

Current RAG architecture

For RAG document search, use MCP Retriever with MCP - List tools and MCP - Call tools. The HTTP block remains useful for business APIs that do not provide an MCP interface.

FieldRequiredDefaultDescription
URLYes-API address
HTTP methodYes-GET, POST, PUT, PATCH, or DELETE
HTTP headersNo{}JSON object containing headers
TimeoutYes30Timeout in seconds
Stop when request failsNotrueTriggers the failure branch
Accepted HTTP codesYes[200]JSON array of successful codes
Request body typeNorawraw, formData, or x-www-form-urlencoded
Request bodyNo-Data sent to the API
Response formatNoJSONJSON, Text, or Binary

Headers:

json
{
  "Authorization": "Bearer {{customParams.mcpAccessToken}}",
  "Content-Type": "application/json"
}

Accepted codes:

json
[200, 201, 204]

Search body:

json
{
  "query": "{{userMessage}}",
  "limit": 5
}

Outputs: body and metadata, for example {{http-1.body}}.

Best practices: test the API outside Studio, use a business alias such as customer-api, add the correct Content-Type, and connect After failure.

Common errors: invalid URL, malformed headers object or codes array, incorrect reference, wrong response format, or a timeout that is too short.

Variables

Creates or recalculates values to simplify a reference, share data between blocks, or retain it during a conversation.

FieldRequiredDefaultDescription
ScopeYesREQUESTREQUEST or CONVERSATION
NameYes-Unique variable name
ValueYes-Value or expression to store

REQUEST limits the value to the current execution. CONVERSATION retains it across several messages.

txt
Scope: REQUEST
Name: userEmail
Value: {{userData.email}}

This block directly creates {{userEmail}}; it does not expose traditional outputs prefixed with its identifier.

Best practices: prefer REQUEST, use short names without spaces or special characters, and avoid duplicates.

Condition

Selects a route according to one or more rules: data available, sufficient score, authorized profile, or tool calls requested.

FieldRequiredDescription
ExpressionYesRule to evaluate
Next blockYesDestination when the rule is true
ElseRecommendedDestination when no rule matches

The Expression field is not a text template: do not wrap the entire expression in {{ and }}.

NeedExpression
Tool calls are presentgt (length chatCompletion-1.genericToolCalls) 0
Score and email domainand (gte score 70) (match userData.email "@wikit\\.ai$")
High priority or urgent messageor (eq ticket.priority "high") (contains userMessage "urgent")
Between one and five documentsand (gte (length documents.body) 1) (lte (length documents.body) 5)
No document or low confidenceor (isEmpty documents.body) (lt confidenceScore 0.5)

Available operators include equality and inequality, gt/gte/lt/lte, and, or, not, match, contains, and isEmpty.

Outputs: hasMatch, matchedIndex, and nextStep.

Best practices: keep rules simple, clearly name destinations, provide an Else case, and test every branch.

LLM instruction

Prepares what is sent to the model: system instruction, history, documents, tools, and token budget. It prepares data but does not generate the final answer.

Main fieldRequiredDescription
LLM modelYesModel used to prepare and estimate the prompt
LLM connector nameYesFilled after selecting the model
InstructionNoSystem instruction with optional variables
Advanced configurationDefaultDescription
Maximum tokens128000Prompt budget
ToolsnullReference to MCP tools
Document configurationnullJSON array of documents to inject
Expiration messages-Replacement for old documents/tool results

Document configuration:

json
[
  {
    "varName": "{{documents.body}}",
    "documentType": "elasticsearch",
    "expiresAfter": 3,
    "maxDocumentsTokens": 16000
  }
]

This configuration remains available for sources already stored in a variable and for legacy integrations. In new RAG workflows, MCP Retriever results are automatically appended to conversationHistory by MCP - Call tools; leave Document configuration disabled.

Tools: {{listTools-1.tools}}.

Outputs: raw, metadata, messages, instruction, and tools. A common reference is {{generatePrompt-1.instruction}}, or its alias equivalent.

txt
Answer only from the provided documents.
User question: {{userMessage}}

Best practices: keep the instruction structured, separate rules from dynamic data, and enable documents or tools only when needed.

Common errors: no model selected, wrong document reference, tools enabled without an MCP catalog, invalid JSON, or insufficient token budget.

LLM request

Calls the model with the prepared instruction and produces a text answer or tool requests.

Main fieldRequiredDefaultDescription
LLM modelYes-Generation model
LLM connector nameYes-Filled automatically
Instruction variableYes-For example {{generatePrompt-1.instruction}}
LLM API URLYesLiteLLMCall endpoint
Advanced configurationDefaultDescription
HTTP headers{}LLM API headers
Timeout60Timeout in seconds
Temperature0.5Variation between 0 and 2
Token limit-Maximum generated tokens
StreamingtrueProgressive output
ToolsnullFor example {{listTools-1.tools}}
Strict modetrueEnforces tool schemas

A temperature of 0 suits factual answers; 0.5 balances stability and variation; 1 or more increases creativity and unpredictability.

Outputs: content, genericToolCalls, and metadata.

Best practices: place an LLM instruction immediately before this block, keep streaming enabled, and change the technical URL only when required.

MCP - List tools

Loads tools from one or more MCP servers so the model can request them later.

For each server:

FieldRequiredDefaultDescription
MCP server nameYes-Business label
MCP server URLYes-MCP endpoint
MCP server headersNo{}Authentication and context
ToolsNo[]Allowed tools
MetaNo{}Additional metadata

Use Fetch tools to query the server, then allow only the actions required by the workflow.

json
{
  "Authorization": "{{customParams.mcpAuthorization}}"
}
json
{
  "conversationId": "{{queryExecutionId}}",
  "userEmail": "{{userData.email}}"
}

Outputs: tools, toolServerRouting, and metadata.

Common errors: wrong URL or token, invalid JSON, unavailable network access, tools not fetched, or an inconsistent selection.

MCP - Call tools

Runs calls requested by an LLM request. It consumes both genericToolCalls and the routing prepared by the tool catalog.

FieldRequiredDefaultDescription
Tool executionsYes-{{chatCompletion-1.genericToolCalls}}
Tool routing serverYes-{{listTools-1.toolServerRouting}}
TimeoutYes60Tool call timeout

Outputs: metadata and toolCallResults.

Place a condition before this block to confirm calls are present. After execution, prepare a new instruction when the LLM must rephrase the result.

Common errors: reference to the wrong LLM or catalog, empty call list, expired token, or a timeout that is too short.