Agents in workflows
The Agent node runs one of your agents inside a workflow. The node holds two things: which agent, and a Task that says what to do on this run. Everything else comes from the agent: its instructions, model, grants, skills and databases. The node’s own reference is on Agent node.
Add an Agent step
Section titled “Add an Agent step”- Open the workflow in the builder.
- Add an Agent node from the node library and connect it.
- In the node’s panel, pick the agent under Agent (required). Open with the agent’s name opens its page in a new tab.
- Write the Task. Type
{{to insert a variable from the trigger or an earlier step. - Press Run draft to test it, then Publish.
The Task is a Liquid template over the run, like every node field. See Templates and variables.
Publish refuses an Agent node with no agent picked, with an agent that was deleted, or with a Task that isn’t valid Liquid. The canvas badge on the node flags a missing agent before you publish.
What the agent is told
Section titled “What the agent is told”A workflow run has no one reading the thread, so the step puts this text before your Task:
This task comes from an automated workflow run. No one will answer a question in this thread during the run, so don’t ask any. Do what the task allows with what you have. If something is missing or ambiguous, say so in your reply and state what you assumed.
The agent answers with its best effort and names any gap, so the step finishes and you read the gap on the run page. Actions that ask first still wait for a member.
When the Task is empty or renders blank, the agent receives the text of the step that fired into it. With no such text, it receives “Begin.”
The step’s output
Section titled “The step’s output”| Field | What it holds |
|---|---|
response |
The agent’s reply |
thread |
The id of the run’s thread on the agent’s Chat tab |
tools |
Each tool the agent called, one per line, with the error if it failed |
approvals |
The actions a member approved or denied during the step |
Read them in later steps as {{ nodes.<id>.response }} and so on. The next node’s {{ input }} is
the reply.
The run’s thread
Section titled “The run’s thread”Every Agent step opens a new thread on its agent, listed on the agent’s Chat tab with a link back to the run. On the run page, Open thread in the step’s details goes to it. The thread shows the task as sent, each tool call with its input and output, and the reply. See Chatting with an agent.
Approvals during a run
Section titled “Approvals during a run”When the agent calls an action that asks first, the step’s status becomes waiting.
- Every owner and admin with a verified email gets an email with Review the run and Open the thread.
- Any member opens the run, selects the step and presses Approve or Deny. Deny takes an optional reason, which the agent reads. A member can also decide in the thread.
- The agent continues from the decision, and the step finishes when its reply does.
A run waits 72 hours for a decision. After that the step denies the call itself, with the reason “expired without a decision”, and fails.
One step waits through at most ten rounds of approvals. If the agent asks again after that, the step fails. See Grants and approvals.
When the agent changes
Section titled “When the agent changes”A workflow version stores the agent’s id and the Task, not the agent itself. A saved change to the agent applies to the next run of every workflow that uses it, live versions included. Test with Run draft after you change an agent that a live workflow depends on.
If the agent is deleted, runs of a live version fail at the Agent step, saying the picked agent no longer exists. Pick another agent and publish again.
AI cost
Section titled “AI cost”Each Agent step is one or more model calls on the agent’s provider. They run on your organization’s own AI Gateway key when one is set, or count against your plan’s AI allowance. On the Free plan without your own key, the step fails. See Models and AI keys.