The most powerful node in Flusso. The Agent node sends a prompt to a large language model and returns its response. It supports RAG context injection, tool use via MCP, persistent memory, structured JSON output, and schema validation โ making it the foundation of almost every AI-powered workflow.
agentAt its core, the Agent node takes a prompt, sends it to a configured AI model, and returns the model's response as output you can use in later steps. However, there is much more you can add on top of that basic flow:
The Agent node operates in two modes. In linear mode, you configure the provider, model, memory, and tools directly in the node's settings panel. In graph mode, you connect separate Model Config, Memory, and MCP Tool nodes to the agent's typed input ports, giving you a clear visual picture of how the agent is assembled.
| Field | Status | Description |
|---|---|---|
| Provider | Required (linear) | The AI Provider to use. In graph mode, connect a Model Config node to the model_in port instead. |
| Model | Required | The model identifier, for example gpt-4o, claude-sonnet-4-6, or llama3.2. Must be a model available through your selected provider. |
| System Prompt | Optional | Instructions that define the agent's behaviour, persona, constraints, or output format. This text is sent as the system role before the user message. Supports {{ variable }} references. |
| User Prompt | Required | The input message for the agent to act on. This is the main text the model sees and responds to. Supports {{ variable }} references โ typically populated with data from an earlier step or the trigger payload. |
| Temperature | Optional | Controls how random or creative the model's responses are. Range is 0โ2. A value of 0 produces highly deterministic, consistent output. A value of 0.7 (the default) gives a balanced mix. Values above 1.0 produce more varied, creative responses. |
| Max Tokens | Optional | The maximum length of the model's response, measured in tokens (roughly ยพ of a word each). Leave blank to use the model's default. Set a limit if you need short, concise responses or are managing API costs. |
| JSON Mode | Optional | When enabled, instructs the model to output valid JSON only. The response is automatically parsed and made available as output.json. Use this together with the Output Schema field to enforce a specific structure. |
| Output Schema | Optional | A JSON Schema object defining the expected structure of the model's JSON output. Flusso validates the response against this schema after receiving it. If validation fails, the step is marked as failed. |
| Context Sources | Optional | Select one or more RAG steps earlier in the workflow. Flusso automatically prepends the retrieved document excerpts from those steps to the agent's context before sending the prompt. The most direct way to give the agent access to your knowledge base. |
| History Source | Optional | Select a previous step whose output contains conversation history to inject into this agent's context. Useful when passing history between steps manually. |
| Max History Turns | Optional | The number of past conversation turns to read from the connected Memory Provider and inject into the prompt. Range is 1โ50. Default is 10. Older turns beyond this limit are dropped. |
| Memory Provider | Optional (linear) | Select a Memory Provider configured in Settings to enable persistent memory across runs. In graph mode, connect a Memory node to the memory_in port instead. |
| Tools | Optional (linear) | In linear mode, select MCP Tool definitions to make available to this agent. In graph mode, connect MCP Tool nodes to the tool_in port instead. |
| Mode | Optional | single โ the model produces one response and the step completes. graph โ the agent enters a tool-calling loop, calling tools as needed until it produces a final answer. |
The Agent node produces the following output fields, accessible in any later step using variable references:
| Field | Type | Description |
|---|---|---|
text | string | The raw text response from the model. Always present. |
json | object | The parsed JSON object. Only present when JSON Mode is enabled and the model returns valid JSON. |
usage.input_tokens | number | Number of tokens consumed by the prompt (including system prompt and context). |
usage.output_tokens | number | Number of tokens in the model's response. |
tool_calls | array | Details of any tool calls the agent made. Only present when tools are connected and the agent used them. |
This example builds a customer support agent that answers questions about your product using a knowledge base. The user's question arrives via a webhook trigger.
{{ trigger.output.question }}.
Set Limit to 5 and leave Threshold at the default 0.7.
{{ my_agent.output.text }} in a Webhook Response node to send the answer back to the caller.
This example extracts a structured summary from a long article. The agent is forced to return JSON matching a defined schema.
0.0โ0.3 for tasks requiring consistent, factual output (data extraction, classification, summarisation). Use 0.7 for general-purpose assistants. Use 1.0+ only for creative writing or brainstorming where variety is desirable.
model_in port. The workflow will fail pre-run validation if this connection is missing.