Agents as Step
Embed an autonomous agent inside a larger workflow as a single step. The agent reasons, calls tools, and returns a result — then the workflow continues with the next step.
What is an Agent Step?
A regular AI step takes an input, runs a prompt, and returns a fixed structured output. An agent step goes further: it can call tools in a loop, reason about the results, call more tools, and decide when it has enough information to produce a final answer. It behaves like a mini-agent embedded inside a workflow step.
This is useful when the exact sequence of actions isn't known upfront — the agent figures it out. A plain AI step is better when the output shape is predictable and you just need a prompt transformation.
AI Step vs. Agent Step
| Dimension | AI Step | Agent Step |
|---|---|---|
| Tool use | None | Calls connected app actions dynamically |
| Reasoning loop | Single prompt → output | Reason → act → observe → repeat until done |
| Output shape | Fixed schema defined upfront | Agent's final conclusion (structured or free-form) |
| Best for | Summarize, classify, extract, transform | Research, draft, decide, multi-step retrieval |
| Latency | Lower — single LLM call | Higher — multiple calls until done |
Configuring an Agent Step
In the workflow editor, add a step and choose Agent as the step type. Key fields:
{
type: "aiActionWithTools",
id: "draft_outreach",
agent: {
role: "Outreach Specialist",
goal: "Write a personalised cold email for each contact",
backstory: "Expert B2B copywriter who avoids clichés",
model: "claude-opus-4-5"
},
prompt: "Draft an outreach email for {{steps.enrich.contact}}. Use the ICP from business memory.",
tools: [
{ appId: "gmail", actionId: "send_email", maxCalls: 1 },
{ appId: "agentled", actionId: "recall_memory", maxCalls: 5 }
]
}agent — role, goal, and backstory shape how the model reasons. These are injected into the system prompt.
tools — which app actions the agent can call, and how many times each. Setting maxCalls prevents runaway tool loops.
prompt — the task for this specific step. References previous step outputs with {{steps.stepId.field}}.
Input & Output
An agent step receives the workflow's accumulated execution context — all previous step outputs are available as template variables. Its own output is stored under its step ID and available to all subsequent steps:
// Step "draft_outreach" output is accessible downstream as:
{{steps.draft_outreach.email_subject}}
{{steps.draft_outreach.email_body}}
{{steps.draft_outreach.reasoning}}The agent's final answer is its conclusion after all tool calls resolve. Intermediate tool call results are logged in the execution timeline but not passed downstream directly.
Example: Research → Score → Draft
A three-step workflow combining plain AI steps and an agent step:
{name, email, domain}.{score, rationale}.When to Use an Agent Step
- •The task requires searching, retrieving, or acting before producing an answer — and the exact sequence depends on what the agent finds.
- •You want the agent to call real tools (send email, write to CRM, recall memory) as part of completing the step.
- •The output is complex enough to benefit from a persona (role, goal, backstory) that shapes how the model reasons.
Next Steps
- AI Steps — Plain AI steps for fixed-schema transformations
- Multi-Agent Orchestrator — Fan out work across multiple agent steps and merge results
- Create & Configure Agents — Top-level agent setup and instructions
- Human-in-the-Loop — Pause an agent step and wait for approval before acting
