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

DimensionAI StepAgent Step
Tool useNoneCalls connected app actions dynamically
Reasoning loopSingle prompt β†’ outputReason β†’ act β†’ observe β†’ repeat until done
Output shapeFixed schema defined upfrontAgent's final conclusion (structured or free-form)
Best forSummarize, classify, extract, transformResearch, draft, decide, multi-step retrieval
LatencyLower β€” single LLM callHigher β€” 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:

Step 1AI Step β€” Enrich each company domain: calls Hunter to find the CEO email. Fixed output: {name, email, domain}.
Step 2AI Step β€” Score each enriched lead against the ICP from Business Memory. Output: {score, rationale}.
Step 3Agent Step β€” For each lead with score > 75, research their LinkedIn, recall the user's tone preference from memory, and draft a personalised email. The agent decides how many LinkedIn lookups to do before drafting.

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