Agent Task reference
The Agent Task node sends the previous step’s output to a configured AI agent and returns the agent’s response to the process flow. Use it to analyze or transform data with an AI model as one step of a flow.
The configured agent
Before you use an Agent Task node, configure an AI agent in the Naia Agent Studio Agent tool. The agent defines the AI model, the instructions that guide it, and the response format, either structured JSON or plain text.
The Agent Task node automatically sends the previous step’s output to the agent, so you do not pass it by hand.
Response format and outputs
The agent’s response format determines what the Agent Task produces:
- Structured JSON
-
The agent returns an object that follows the JSON schema set on the agent.
This is recommended when a later step reads specific fields, and to keep token use down. - Plain text
-
The agent returns a single
textvalue.
To expose the response to later steps, select Generate Outputs on the node:
-
For a JSON-schema agent, each property declared in the schema becomes an output.
-
For a text agent, a single
textoutput is produced.
Later steps read these with a binding, for example {Outputs>/<agent-node>/<property>}.
See Binding syntax reference.
| If the JSON schema already defines the output format, you do not need to describe it again in the agent’s instructions. The schema sets the output on its own, so the instructions can focus on how the agent reasons about the data. |
Vector agents in a process flow
A vector-enabled agent can return an empty result in a process flow even when the same agent answers in the agent Playground. A flow needs a lower similarity threshold than a standalone run to return the same matches.
If an Agent Task node returns nothing, lower the agent’s Similarity Threshold in its vector search configuration, then run the flow again. Check the vector sources in the agent trace: they list the similarity scores the agent found, so you can set the threshold just below the score you want to match.