Skip to content

Task Flows

Most agents operate as a single request-and-response cycle: you provide a prompt, the agent applies its reasoning and tools, and then returns a result.

A Task Flow provides a more structured approach. It allows you to define a workflow as a series of steps on a visual canvas, including actions, decisions, loops, approvals, and handoffs. Instead of relying solely on the agent to determine the process, you explicitly define how the work should be performed.

The result is a repeatable, controlled workflow with predefined steps, branching logic, iterative processing, and human review points that execute consistently every time.

Where to find it: open an agent under BUILD → Agents, then click the Task Flow tab.

task-flow-tab

You can also start one from the Task Flow tab when you create a + New Agent.

Task Flow New Agent
task-flow-start

When to Use a Task Flow

You don’t need a Task Flow for every agent. Use the table to decide:

Use a Single Agent When…Use a Task Flow When…
One prompt plus tools is enough.You need fixed, repeatable steps.
The task is open-ended Q&A.You need to branch on a yes/no decision.
You trust the agent to figure out the order.You need a loop, or one step per item in a list.
No human needs to step in.Someone must approve or add data partway through.

An agent without Task Flow still runs normally, using its instructions and tools. The Task Flow is an optional structure.

Opening the Designer

  1. Open an agent and click the Task Flow tab.
task-flow-tab
  1. The canvas opens with a Start node and an Output node already placed.
start-and-output-node
  1. The toolbar offers three modes:
    • Designer — the drag-and-drop canvas (this is the default).
    • Text — edit the flow as structured text (for power users).
    • Generate — describe the flow in plain English and let HuLoop build it (hidden once the flow already has steps).
Task Flow Modes

The Node Types

You build a flow by dragging Nodes from the Nodes panel on the left onto the canvas. Each node is one step.

NodeWhat it does
Agent CallRuns a prompt, or hands the work to another agent.
Tool StepRuns one specific tool.
TransformReshapes or maps data so the next step gets what it needs.
ConditionSplits the path in two based on a yes/no check.
Loop / For EachRepeats steps — either a set number of times, or once per item in a list.
HumanPauses so a person can approve the work or type in some data.
OutputThe final node — whatever reaches it becomes the flow’s result.

Connecting the Steps

Steps run in the order you wire them together.

  1. Add nodes — drag them from the Nodes palette onto the canvas.
node-types
  1. Connect — drag from the handle at the bottom of one node to the handle at the top of the next.
connect-nodes
  1. Configure — click a node; its settings open in the panel on the right.
Configure Node
  1. Set edge conditions — click the line (edge) between two nodes and choose when it should be followed: success, failure, or always.
set-edge-conditions
  1. Delete — select a node or a line and press Delete or Backspace.
Delete Step
  1. Undo / Redo — use the toolbar buttons (Ctrl+Z / Ctrl+Shift+Z).
Undo Redo
  1. Auto-layout — let the toolbar tidy the nodes into a clean arrangement.
auto-layout

Click Save in the toolbar when finished. You can test the flow from the agent’s Run tab or use Dry Run.

save-task-flow

Passing Data Between Steps

Each step produces a result. Later steps can reuse an earlier step’s result.

You do this with a reference written as ${step.output} — read it as “use that earlier step’s result here.” For example, if a step named normalize_rows cleaned up a list, a later step can point at ${normalize_rows.output} to work with that list.

You’ll see these references in step settings and in loops. You don’t have to memorize them — and the idea is simple: each step can build on what came before.

Step Settings Worth Knowing

StepMain settings
Agent CallA prompt written here, or a call to another agent; optional model choice, tools, and input/output shapes.
Tool StepWhich tool to run and what to pass into it.
TransformA template or field-path expression to reshape data.
ConditionA comparison or expression that decides the branch.
Loop / For EachWhether to count iterations or walk a list (see below).
HumanWhether the pause is for Approval or Data Input.

Loop vs For Each

A Loop node runs in one of two modes.

ModeUse it whenKey fields
Loop (counter)You want to retry or refine until something is good enough.Max iterations, exit condition.
For EachYou want to run the same steps once for every item in a list.The collection (for example ${normalize_rows.output}) and a name for each item.

In For Each, each pass sets ${item} to the current item, and the loop collects every pass’s result into a list at the end.

Handing a Step to Another Agent

Instead of entering a prompt directly in an Agent Call, you can invoke another agent. Use ${step.output} references to pass data from previous steps, and the called agent’s response becomes the output of the current step. This provides a simple, reusable way to incorporate existing agents into a workflow.

Error Handling

Workflow steps may occasionally fail due to timeouts or temporary service issues. Use Error Policy on Agent Call and Tool Call steps to define how the workflow handles these events.

error-policy
SettingChoices
On ErrorFail (stop the whole flow), Skip (move on with no result), or Continue with a default result.
Retry CountTry again 0 to 3 times before giving up.
Timeout (Seconds)Seconds to wait between retries.
Fallback Agent / Default OutputAn optional safety net when you choose to continue after a failure.

A common approach is to retry the step twice and, if it still fails, continue with a predefined default result so the workflow can complete successfully.

The Human (Approval) Node

The Human node pauses the flow for human input.

human-node
ModeWhat happens at runtime
ApprovalA person approves or rejects. Rejecting stops the step.
Data InputA person fills in a short form, and those values flow into the next steps.

This step pauses only the current Task Flow. For agent-level approval controls and the Ask a Human tool, see Safety and Guardrails.

Generate a Task Flow from a Description

If you prefer not to build a workflow manually, describe the process and let HuLoop generate a draft for you.

  1. Switch the toolbar to Generate (available only when the flow has no steps yet).
Generate Mode
  1. Type what the pipeline should do.
task-flow-description
  1. Click Generate Task Flow.
Generate Task Flow
  1. Review the nodes and connections it created, then fine-tune them in Designer mode.
Designer Mode

See the result as a first draft. Always read through the steps and adjust anything that isn’t quite right before you save.

Try it 1. Open a test agent and go to its Task Flow tab. 2. Drag one Agent Call onto the canvas and connect Start → Agent Call → Output. 3. Click the Agent Call and give it a short prompt like “Summarize the input.” 4. Add a Human node set to Approval just before Output. 5. Save, then go to the Run tab and run it once. Approve when it pauses, and watch the summary reach the Output.

task-flow-prompt
task-flow-run
task-flow-approve
task-flow-output

See Also

Last updated: Nov 03, 2026
Back To Top