AI Agent
Multi-turn AI agent with skills, dataset queries, and sub-workflows.
About this Node
Runs an autonomous multi-turn AI Agent equipped with version-pinned Agent Skills, read-only Project/Workspace Datasets, and published Sub-Workflow tools. Bounded by `max_turns` (1–32) and `timeout_seconds` (30–1800), it iterates until it reaches a final answer or structured JSON Schema result and emits full turn/tool-call diagnostics.
Ports & Branches
inPort 0Inbound execution flowoutPort 1Outbound execution flow after agent completionHow this Node Reads Data
| Input | Access | Field | Example | Description |
|---|---|---|---|---|
| Agent Prompt Template | {{Template}} | prompt_template |
Investigate churn risk for account {{account_name}} using attached datasets. |
When `prompt_source` is `template`, interpolates `{{key}}` values from scoped workflow state as the agent's task prompt. |
| Agent Prompt State Key | State Key | input_key |
rendered_prompt |
When `prompt_source` is `state_key`, reads the initial task message from `input_key`. |
State Keys Written (Outputs)
| Key Pattern | Type | Role | Description |
|---|---|---|---|
{output_key} |
string | object |
Primary | Final agent answer (plain text or validated JSON object when `response_format_mode` is `json_schema`). |
{output_key}_raw |
string |
Secondary | Raw unparsed text returned by the agent on its final turn. |
{output_key}_turns |
integer |
Secondary | Total reasoning/tool-call turns executed by the agent. |
{output_key}_tool_calls |
array<object> |
Secondary | Ordered audit log of tool invocations executed by the agent during the run. |
Tips & Best Practices
- For deterministic single-turn completions with no tool calling, prefer the lighter LLM Inference (`llm`) node.
- Pin explicit skill versions when attaching Agent Skills and bind saved LLM Presets from Settings → LLM.
Commonly Paired With
Settings Parameters (21)
Configuration schema synchronized with the workflow catalog
| Field | Type | Default | Allowed Options | Description |
|---|---|---|---|---|
llm_preset_id |
string |
— |
— | Required saved Workspace or Project LLM Preset UUID |
llm_preset_name |
string |
— |
— | Display name of the bound LLM Preset |
llm_preset_model |
string |
— |
— | Selected model ID from the preset's available models (defaults to the preset's Default Model) |
use_preset_generation_defaults |
boolean |
true |
— | When true, use the bound preset's default temperature, max tokens, and Top-P |
provider |
string |
vertex_gemini |
vertex_gemini, openai, azure_openai, anthropic, xai | — |
model |
string |
gemini-2.5-flash |
— | — |
secret_name |
string |
— |
— | Server-hydrated provider credential name from the selected LLM Preset |
secret_kind |
string |
llm_provider |
llm_provider | — |
system_instructions |
string |
— |
— | Agent persona and system instructions |
prompt_source |
string |
template |
state_key, template | — |
prompt_template |
string |
— |
— | Task prompt template with {{variable}} interpolation |
input_key |
string |
prompt |
— | — |
output_key |
string |
agent_response |
— | — |
skills |
array |
— |
— | Version-pinned Managed or Git-Linked agentskills.io skills |
datasets |
array |
— |
— | Read-only attached datasets queried inside Isolated Sandbox |
sub_workflows |
array |
— |
— | Reusable custom Sub-Workflow component tools |
max_turns |
integer |
10 |
— | — |
timeout_seconds |
integer |
300 |
— | — |
response_format_mode |
string |
text |
text, json_schema | — |
response_schema_name |
string |
agent_response |
— | — |
response_schema_json |
string |
— |
— | — |
Dataset-Backed Research Agent with Versioned Skill
Give an agent read-only access to a curated sales dataset and a domain analysis skill using a saved LLM Preset.
Node Configuration
{
"Id": "maf_agent_1",
"Type": "maf_agent",
"Config": {
"llm_preset_id": "11111111-1111-4111-8111-111111111111",
"llm_preset_model": "gemini-2.5-pro",
"use_preset_generation_defaults": true,
"provider": "vertex_gemini",
"model": "gemini-2.5-pro",
"system_instructions": "You are a revenue analyst. Cite dataset evidence in every finding.",
"prompt_source": "template",
"prompt_template": "Analyze Q3 trends for region {{region}}.",
"max_turns": 10,
"timeout_seconds": 300,
"output_key": "agent_report"
}
}Sample Input State
{
"region": "EMEA"
}Expected Output State
{
"agent_report": "EMEA ARR grew 18% QoQ...",
"agent_report_turns": 4,
"agent_report_tool_calls": [ { "tool": "dataset_query" } ]
}Tip: Use `{output_key}_turns` and `{output_key}_tool_calls` downstream to monitor agent efficiency or enforce governance audits.
Structured Risk Assessment Agent
Force the agent's final response to conform to a strict JSON Schema after calling Sub-Workflow tools.
Node Configuration
{
"Id": "maf_agent_1",
"Type": "maf_agent",
"Config": {
"llm_preset_id": "22222222-2222-4222-8222-222222222222",
"llm_preset_model": "claude-sonnet-4-5",
"use_preset_generation_defaults": true,
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"system_instructions": "Evaluate compliance risks and return valid JSON only.",
"prompt_source": "state_key",
"input_key": "dossier",
"max_turns": 8,
"response_format_mode": "json_schema",
"response_schema_name": "risk_assessment",
"response_schema_json": "{\u0022type\u0022:\u0022object\u0022,\u0022properties\u0022:{\u0022risk_level\u0022:{\u0022type\u0022:\u0022string\u0022},\u0022reasons\u0022:{\u0022type\u0022:\u0022array\u0022,\u0022items\u0022:{\u0022type\u0022:\u0022string\u0022}}},\u0022required\u0022:[\u0022risk_level\u0022]}",
"output_key": "risk_result"
}
}Sample Input State
{
"dossier": "Vendor onboarding packet for Acme Corp"
}Expected Output State
{
"risk_result": { "risk_level": "low", "reasons": ["SOC2 verified"] },
"risk_result_turns": 3
}