Skip to content

Agent V2

Agent V2 answers each message with the AI model you connect and uses the available tools when it needs them. It remembers the conversation between messages and, if you set it up, delivers the answer with fixed fields so the rest of the flow can process it. The agent always knows the current date and time.

It is an older component kept for compatibility with existing flows. For new flows, use Agent.

There is also a variant, Agent V2 With Mem Support, with the same fields and an extra Memory connection (see below).

When to use it

  • Maintaining existing flows built with this agent.
  • An assistant that looks things up in other systems through tools and remembers what has been said.
  • Extracting data from a message and returning it with fixed fields for the next steps of the flow.

Configuration

ConnectionWhat to connect
ModelThe AI model that answers. It is needed for the agent to work.
ToolsOptional tools the agent can use.
FieldWhat it does
InputThe user’s message, usually from Chat Input.
System PromptThe agent’s instructions. Default: “You are a helpful assistant”.
User PromptThe template of the message the agent receives. Default: {input}, which is replaced with the contents of Input. Each variable in curly braces becomes a field with that name.
Agent NameThe agent’s name when another agent or a supervisor uses it. Default: ReactAgent.
Agent DescriptionWhat the agent does. Another agent or a supervisor reads it to decide when to use it.
State custom schemaExtra fields the agent can keep and change while it works. Only for advanced flows; leave it empty if you do not need it.

Advanced options

FieldWhat it does
Structured Output SchemaA list of fields (name, type and description) the answer must have. If you fill it in, the agent answers in JSON format with those fields.
Max IterationsThe maximum number of agent steps before stopping. Default: 10 (40 in the memory variant).
StreamShows the answer as it is being generated. Default: off.
Use short term memoryKeeps the conversation so the agent remembers previous messages. Default: on.
Memory top messageHow many previous messages the agent receives as context. -1 means all of them. Default: -1.

Variant with long-term memory

Agent V2 With Mem Support adds the Memory connection. If you connect a long-term memory component to it, the agent gets tools to save important details about the user, search them, list them all and delete them, and it decides by itself what is worth remembering.

Using it as an agent tool

You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.

Output

  • Response: the answer as a message. If you have defined Structured Output Schema, the message contains a JSON with the fields you set. Connect it to Chat Output or to any component that takes text.
  • Agent: the configured agent, so another agent or a supervisor can delegate to it.

Example

The estate agency Casas del Sur wants to sort the enquiries that come in through its website:

  1. Connect the enquiry to Input and an AI model to Model.
  2. In System Prompt, write: “Read the enquiry and extract the customer’s details.”
  3. In Structured Output Schema, define the fields name, phone, area and budget, each with its description.
  4. Connect Response to the component that saves the record in the CRM.

Each enquiry becomes a JSON with those four fields, ready to be saved.

Good practices

  • Describe each field in Structured Output Schema clearly: the agent relies on that description to fill it in.
  • Limit Memory top message in very long conversations so the agent only receives the recent context.
  • Agent: the recommended agent for new flows.
  • Supervisor Agent: distributes requests among several agents.