AI Agent
Description
Runs an LLM agent using the task prompt and available tools, returning either text or structured output. The component is available after at least one AI integration is configured in the Integrations view (Designer side menu).
Parameters and configuration
| Name | Description |
|---|---|
| LLM integration | LLM integration to use. |
| Chat model name | The chat model to use. The available models depend on the LLM integration selected. |
| User message | Description of the concrete task to be performed. |
| MCP tools access | Which tools exposed by the defined MCP integrations the agent may call: All tools - every tool of every configured MCP integration; Only selected tools - adds the Tools to include parameter; All except selected tools - adds the Tools to exclude parameter. See Choosing MCP tools. |
| Tools to include | Shown when MCP tools access is Only selected tools. A multi-select list of the tools the agent may call, grouped by MCP integration. With nothing selected the agent gets no tools. |
| Tools to exclude | Shown when MCP tools access is All except selected tools. A multi-select list of the tools the agent must not call; all the other tools stay available. |
| Output variable name | Variable name under which node result will be available in a subsequent nodes. |
Advanced parameters:
| Name | Description |
|---|---|
| System message | Reusable rules that define how the agent should behave. Some AI agent providers use the term 'agent instructions' for this. |
| Max iterations | Maximum number of chat model responses the agent processes for one event (default 2, at most 20). A response that requests tools is followed by another one that sees their results, so a single round of tool use needs two. The run fails when the model still asks for a tool after the last allowed call. |
| Output schema | Optional; a JSON Schema describing the desired response. When provided, the agent's final answer becomes a typed record — see Structured output on the LLM Chat page for details. |
| Temperature | Temperature is a hyperparameter that controls the randomness of text generation. Lower values (e.g., 0.2) make the model’s output more focused and deterministic by favoring the most likely tokens, while higher values (e.g., 0.8 or above) produce more diverse and creative responses by flattening the probability distribution. |
| Max output tokens | Optional; upper limit on the length of the response, in tokens. A response that reaches it is cut off. Leave empty to use the default: 8192 for Anthropic, the provider's own for the others. |
| When an MCP server is unavailable | What happens when an MCP server the agent needs doesn't respond - at the start of the scenario, or when a tool call cannot reach it. Fail the event (default): the event goes to error handling (the node's error output, if connected), and the scenario keeps running; the agent reconnects at most every 30 seconds. Continue without its tools: the agent answers without that server's tools, and a failed tool call is given to the model as the tool's result. An error the tool itself returns is always given to the model. |
Choosing MCP tools
The Tools to include / Tools to exclude lists are built from the tools the configured MCP servers report. A tool is identified by its MCP integration and its name, so tools with the same name in two integrations are distinct.
- The selection is validated: a tool whose MCP integration is no longer configured, or which the MCP server no longer lists, is reported as an error on the node.
- While an MCP server doesn't respond, the Designer cannot list its tools: the field then shows the saved selection as a JSON list of
integration__toolnames, its label names the server that is not responding, and the node stays valid. At runtime the scenario behaves as When an MCP server is unavailable says. - With All tools and All except selected tools, tools added to an MCP server later can be given to the agent without editing the scenario, and the agent connects to every configured MCP server. With Only selected tools, the agent connects only to the servers that provide a selected tool.
Returned value
By default the component returns the agent's final answer as plain text (String).
When an Output schema is provided, the agent's final answer is typed against the schema in exactly the same way as the LLM Chat component: the returned value becomes a record with a raw field (the answer as text) and a structured field (the answer parsed and typed against the schema, or null when it is not valid JSON or does not match the schema). See Structured output for a full description and example.
Additional considerations
- You can use string template during prompt creation to use data available in the scenario (e.g., documents retrieved from the vector store)
- Currently only selected models are available. Contact us if you need to use additional ones.
Metrics
Every call to the chat model is reported in the scenario's metrics, tagged with nodeId, component, integration,
provider and model (the model the node asks for):
| Metric | What it counts |
|---|---|
llm.tokens | Tokens, by tokenType. The types don't overlap, so they add up to all the tokens a call is billed for, and each has one price: input (input neither read from nor written to a prompt cache), cacheRead and cacheCreate (input read from / written to a prompt cache), output (generated tokens) and reasoning (reasoning tokens, where the provider reports them separately - Anthropic counts them in output). A provider console may show input with cached tokens included: that is input + cacheRead here. |
llm.calls | Calls to the model, failed ones included. |
llm.errors | Calls that failed, by error (the exception class). |
llm.latency | Time of a single call to the model, failed ones included. |
The scenario name and the instance are added the same way as for the other scenario metrics.
An agent calls its model several times for one event - once per round of tool use - so llm.calls is higher than the number of events.
Every call to an MCP tool is reported too, tagged with nodeId, component, integration (the MCP server) and tool:
| Metric | What it counts |
|---|---|
mcp.calls | Calls to the tool. |
mcp.errors | Failed calls, by error: serverUnreachable (the call didn't reach the server or the server failed to handle it), timeout, or toolError (the tool answered with an error of its own). |
mcp.latency | Time of a single call to the tool. |