AI Agent Node
An LLM that can use tools. You describe HTTP endpoints as tools; the model decides when to call them, the node calls them and sends the results back, and this repeats until the model answers. With chat memory on, the agent remembers each conversation. Type: agent_node.
Use it for support assistants that look up orders, agents that open tickets or check stock, or anything where the model needs live data or must act. For a single prompt and reply, the LLM node is simpler.
How a run works
- The model gets the instructions (
system), the conversation so far (with memory on), theprompt, and the list of tools. - If it answers, the node ends on
successwith the reply. - If it asks for tools, each call is made over HTTP and its result (status and body) goes back to the model, which then answers or calls more tools.
- This repeats up to
max_iterationsmodel calls (default 5, at most 20). If the model is still calling tools then, the node ends onerror.
Problems with a single tool call (unknown tool, arguments that are not JSON, a missing URL value, an HTTP error or timeout) are reported to the model, which can retry or answer without it; they do not fail the node.
Model
Same settings as the LLM node: provider (OpenAI, Anthropic, Azure OpenAI, Gemini, Groq, OpenRouter, Ollama, any OpenAI-compatible API, Bedrock, Vertex, or the Zerq AI Gateway), credentials_id, model, base_url, api_version, region, response_format, temperature, max_tokens. The model must support tool (function) calling. Through the Zerq AI Gateway, every model call is governed and logged in AI Logs.
timeout_ms limits the whole run including tool calls: 1,000–600,000 (default 120,000).
Tools
A tool is an HTTP endpoint or another workflow.
HTTP tools
Each HTTP tool is an endpoint:
| Field | Description |
|---|---|
name | 1–64 letters, digits, _ or -; unique. The model calls the tool by this name. |
description | What the tool does and when to use it. The model reads this, so be specific. |
method | GET (default), POST, PUT, PATCH or DELETE. |
url | Full http(s) URL. {name} placeholders are filled from the arguments, for example https://api.example.com/orders/{id}. |
parameters | JSON Schema ("type": "object") for the arguments. Include every URL placeholder. |
headers | Optional fixed headers. |
credentials_id | Optional credential: API key (header or query), basic auth or OAuth2 client credentials. |
timeout_ms | Per call, 1,000–60,000 (default 15,000). |
Arguments not used in the URL go in the query string for GET and DELETE, and in a JSON body for the other methods. A URL value may not contain /, \ or .., so the model cannot change the path. The URL itself is fixed: the model only supplies arguments. Results longer than 16,000 characters are truncated before they go to the model.
The tool's credential is applied by Zerq; the model never sees it.
Workflow tools
A workflow tool ("type": "workflow") runs another workflow, like the Execute Workflow node: set name, description, workflow_id (a workflow id or a proxy id; the workflow starts with a Called by Workflow or HTTP trigger), parameters and optionally timeout_ms. For a Called by Workflow workflow the model's arguments are its input (checked against its input_schema) and its Return node body goes back to the model (a Return status error is reported to the model as a tool error). For an HTTP trigger workflow the arguments become the request body, and the status and body of its response go back to the model. Use this to give the agent multi-step actions you build visually, with their own credentials and checks. In the editor, Add workflow tool shows the same Workflow list as the Execute Workflow node (stored workflows by workflow id, proxy workflows by proxy id) and the input fields of a Called by Workflow target.
Chat memory
Turn on memory to keep conversations between runs:
session_id(input) identifies the conversation, for example a chat or user ID. It is required while memory is on.- Each successful run stores the user's prompt and the agent's final reply.
memory_window(default 20) is how many past messages are sent to the model;memory_ttl_seconds(default 86,400) is how long an idle conversation is kept. - Memory is kept in the backend's shared cache (Redis when
CACHE_TYPE=redis, otherwise in the backend's memory, which is not shared between pods or kept across restarts). It is stored separately for each workflow, node and session, so two workflows never see each other's conversations. When several proxies run one shared workflow (linked withworkflow_id), memory is also kept separately for each proxy (key<workflow id>/<proxy id>), so two routes never share a conversation; a proxy running its own workflow keeps the key it always had. A sub-workflow's memory belongs to the sub-workflow, whichever route called it.
Inputs
system: instructions: the agent's role, rules, and when to use which tool.prompt: the user's message.session_id: conversation ID for memory.user(optional): an end-user ID sent to the Zerq AI Gateway (AI Logs) and OpenAI.
Outputs
| Field | Description |
|---|---|
matched_output | success or error |
text, json | The final reply (and its parsed JSON with response_format: json) |
steps | The tool calls made: tool, arguments, status_code, response_time_ms, a result preview or error |
iterations | Model calls made |
usage | Tokens summed over all model calls |
model, provider, request_id | From the last model call |
session_id | The session used for memory |
error, error_type, status_code | On error (model failure, invalid config, or max_iterations reached); steps are kept for debugging |
Example: support agent
{
"id": "support_agent",
"type": "agent_node",
"data": {
"config": {
"provider": "anthropic",
"credentials_id": "<api key credential id>",
"model": "claude-sonnet-4-5",
"max_iterations": 5,
"memory": true,
"tools": [
{
"name": "get_order",
"description": "Look up an order by its ID. Returns status and carrier.",
"method": "GET",
"url": "https://orders.internal.example.com/orders/{id}",
"credentials_id": "<orders api credential id>",
"parameters": {
"type": "object",
"properties": { "id": { "type": "string", "description": "Order ID" } },
"required": ["id"]
}
}
]
},
"inputs": {
"system": "You are a support agent for Acme. Use get_order to look up orders. Answer in two sentences.",
"prompt": "{{ $json['http_trigger_1'].request.body.message }}",
"session_id": "{{ $json['http_trigger_1'].request.body.chat_id }}"
}
}
}
Connect success to a response_node with {{ $json['support_agent'].text }}, and error to a fallback reply.
Security notes
- Tools can only reach the URLs you configure. Treat tool descriptions and results as input to the model: a tool that returns untrusted text (emails, tickets, web pages) can try to steer the agent, so only give an agent tools whose effects you accept for any request it might receive.
- Prefer read-only tools; put state-changing tools behind your own API checks.
- Use the Zerq AI Gateway provider when model calls must follow AI budgets and guardrails.