Skip to main content

Node Types

Every workflow is a directed graph of nodes. Each node has a type that determines what it does at runtime, and a config object that controls its behavior. Nodes are connected by edges; the runtime follows edges to determine execution order.

The field names below are the exact keys stored in node.config — the same keys the properties panel writes and the runtime reads. If you build or edit a graph through the API, use these names: a key the node type doesn't know is ignored without an error.


Palette Categories​

CategoryNode types
Coreagent, classify, end, note
Toolsfile_search, guardrails, mcp
Logicif_else, while_loop, for_each, user_approval, sub_workflow
Datatransform, set_state, merge

There is also a built-in start node that every workflow begins from. It is added automatically and cannot be deleted.

Every node supports on_error

Any node's config accepts on_error: skip to let the rest of the graph continue past that node's failure instead of halting the run — see Run Infrastructure → Resilience & fault handling.


How Data Flows Between Nodes​

  • Each node receives the previous node's output as its input. In expressions this is the input variable — it is the original workflow input only for nodes directly after start. The original message is always available as state['trigger_input'].
  • Each node's output is stored in workflow state under the node's own ID — e.g. a node with ID summarise can be read downstream with state.get('summarise'). A node that never ran (a skipped branch) has no entry.
  • set_state is the only node that writes a state key you name yourself.

Core​

agent​

Runs an AI agent. The node sends a prompt to an LLM, lets it use its tools, and stores its answer in workflow state.

The agent loop. An agent works in steps: it calls tools, reads the results and decides what to do next, for example search, read a result and search again, or ask one specialist workflow and then another (trigger_workflow). It can take up to Max tool steps steps (max_tool_rounds, default 8, at most 25; the server default is AGENT_MAX_TOOL_ROUNDS). Its last call is answer-only: tools are switched off and the agent is told to answer with what it found, so a node never ends on a tool call whose result nobody reads. Every tool call is in the run's execution log, in full; the model gets at most 16,000 characters of each result (AGENT_TOOL_RESULT_MAX_CHARS), since every result is sent again with each later step. The node timeout (llm.timeout_seconds, default LLM_NODE_TIMEOUT_SECONDS = 120 s) covers every step, so raise it for agents that take many steps or run on a slow model.

If a later step fails after tools have already run (a provider error, say), the node reports the failure instead of retrying: a retry would run those tools again, and some change things (send_message, trigger_workflow, API writes).

Modes:

ModeHow to configure
Prompt modeFill in the system prompt directly in the properties panel
Skill modeSet skill_id to reference a saved Skill. The skill's system prompt, tools, and knowledge are merged in

Config fields:

FieldDescription
llm.system_promptInline instructions for the agent (Prompt mode). A top-level system_prompt is also accepted
skill_idID of a Skill to load (Skill mode — overrides inline prompt)
llm.model_idModel override. Leave blank to use the space/catalog default
llm.provider_idProvider override. When set, llm.temperature and llm.max_tokens also apply
llm.timeout_secondsNode timeout covering every step (default 120 s; 0 disables)
toolsList of tool names to enable for this node
api_toolsAPI Builder operations this node may call — see API Tools
knowledge_idsKnowledge bases to search before the agent responds
max_tool_roundsTool steps the agent may take before its answer-only last call (1–25, default 8) — see the agent loop above
execution_modeauto (default) or review — see Run Infrastructure
review_instructionsreview mode only: guidance shown to the reviewer
review_priorityreview mode only: normal (default), high, or urgent

The agent reads its input from the previous node's output and its answer is stored under the node's ID (see How data flows between nodes).

API Tools​

The API Tools section of the agent node's properties lists the live API Builder APIs you can use: those in your own spaces and those published to them from other spaces. It shows only the operations the API's team has exposed to agents in the API's Agent tools section; an API that exposes nothing isn't listed. Expand an API and tick the operations the agent may call (All / None select every listed operation of that API). Only ticked operations become tools; selecting an API never adds all of its operations implicitly.

If the list is empty, no API you can use exposes an operation yet: ask the API's team to tick operations in its Agent tools section. The agent tool catalog in API Builder lists everything agents can call.

json
"api_tools": [{ "tool_server_id": "api_<api_definition_id>", "operations": ["getOrder", "listOrders"] }]

When the node runs:

  • Each ticked operation is offered to the LLM as a function tool, alongside the node's other tools, within the same agent loop steps. Each result is cut off at 16,000 characters.
  • Calls go through the API Gateway to the version prod serves, with a fresh signed caller identity on every call, so gateway policy, masking and the call log apply as usual.
  • Calls act as the user who ran the workflow. A run with no user (a schedule or queue worker) acts as the workflow's owner. Access is checked against the API's access grants at run time.
  • If an API or operation is no longer available (unpublished, renamed in the version prod now serves, no longer exposed to agents, or you lost access), the node runs without it. The properties panel marks it unavailable.
  • Saving the workflow warns about such operations, and staging or publishing it is refused until each one is exposed again or removed from the node. The gateway also refuses an agent's call to an operation that isn't exposed.

review-mode agent nodes get the same tools while they draft their preview.


classify​

Routes workflow execution along one of several labelled edges based on AI classification.

The node sends its input (the previous node's output) to an LLM with a list of categories. The model returns one category label, and the runtime follows the matching outgoing edge.

Config fields:

FieldDescription
classesList of category labels, e.g. ["positive", "negative", "neutral"]
llm.system_promptOptional instruction to guide the classification model
llm.model_idModel override

Edges: Draw one outgoing edge per category label. Label the edge with the exact category string.

Label matching: The runtime matches the model's output against your category list using these rules in order:

  1. Exact match (case-insensitive) — preferred.
  2. Whole-word match — if the LLM adds punctuation or a trailing explanation, the runtime looks for a class label as a whole word in the output, trying longer labels first (so not_urgent is never mistaken for urgent).
  3. Fallback — if neither matches, the first category in the list is used, and a warning is logged. The workflow does not stop.
Tip

Always list the most likely or safest category first so the fallback is a sensible default.

An empty classes list is reported by the graph validator and blocks publishing.


end​

Terminates workflow execution and marks the run as complete. Every workflow must have at least one end node.

Config fields: none — this node requires no configuration.


note​

A sticky-note annotation on the canvas. Notes are not executed and don't need to be connected to anything; they exist purely for documentation and team communication within the editor.

Config fields:

FieldDescription
contentThe text to display on the canvas

Tools​

Performs a vector search over one or more Knowledge bases and outputs the retrieved chunks.

Config fields:

FieldDescription
knowledge_idsList of Knowledge base IDs to search
querySearch query — an expression (e.g. state.get('question')) or plain text. Leave blank to search for the node's input
limitNumber of chunks to retrieve, 1–50 (default 5)
min_scoreDrop chunks scoring below this value, 0–1 (default 0)
output_formattext (default — chunks with source and score headers) or json (a list of {text, source, score, page})

No matches is a successful result with the output [No matching content found].

A file_search node with no knowledge base selected can't be published: approval is refused with Node "<label>" (file_search): no knowledge base selected — choose at least one to search. Such a node could only ever return [No matching content found]. The Answer from documents template starts with none selected, so choose one before you submit it for review.


guardrails​

Evaluates content against a list of rules using an LLM call. If the content fails any rule, the workflow halts immediately with an error — execution does not continue to downstream nodes.

Config fields:

FieldDescription
rulesList of rule strings to enforce (one per line in the editor), e.g. "No PII in output", "Must cite a source" — at least one is required
llm.system_promptOptional extra instruction for the checking model
llm.model_idModel override

The node checks its input (the previous node's output). The model is asked to reply PASS or FAIL: <reason>. The runtime handles all outcomes:

LLM outputWhat happens
Begins with PASSWorkflow continues to the next node, which receives the content that was checked (not the word PASS). The verdict is kept in state under the guardrails node's id
Begins with FAILWorkflow halts immediately; the reason is surfaced as the run's error message
Empty outputTreated as an error (not a silent pass) — run halts with [guardrails: LLM returned empty output]
LLM call failed (provider error, circuit open, bad credentials)Treated as an error — the run halts rather than passing unchecked content
LLM call timed out (llm.timeout_seconds, default LLM_NODE_TIMEOUT_SECONDS)Treated as an error, like a failed call — the run halts rather than passing unchecked content

With on_error: skip, any of these errors is reported as a node_error, the guardrails node completes with empty output, and the run continues to the next node.

A guardrails node with no rules is reported by the graph validator and blocks publishing.

A node_complete SSE event is emitted before the node_error event, so the run timeline always has a complete record of every node that executed.


mcp​

Calls an external tool via the Model Context Protocol. Connects to a remote MCP server (HTTP or SSE transport), invokes a specific tool, and outputs the result.

Config fields:

FieldDescription
server_urlHTTP(S) URL of the MCP server (e.g. https://my-mcp.example.com/mcp) — required
tool_nameName of the tool to call on the server — required
tool_argsObject mapping each of the tool's parameter names to a value. Each value may be an expression using state/input (e.g. state.get('ticket_id')); a value that isn't a valid expression is sent as literal text
auth_tokenBearer token for the MCP server. Stored encrypted; displayed as •••••••• in the UI and API responses. Leave blank if the server requires no auth.

If tool_args is empty, the tool is called with a single input argument — the node's input (or the legacy tool_input field, for nodes saved before tool_args existed).

A missing server_url or tool_name is reported by the graph validator and blocks publishing.

Security:

  • server_url is validated against an SSRF allowlist before the request is sent. Private IP ranges (10.x, 192.168.x, 169.254.x, 127.x, ::1, etc.) and link-local addresses are blocked to prevent server-side request forgery.
  • auth_token is stored encrypted at rest and is never returned in API responses — editing the node shows the sentinel value ••••••••. To update the token, type a new value; to keep the existing one, leave it as-is.
MCP server naming

If you are using hrida-mcpo as the MCP server, the server name in config.json must match the agent or Digital Employee slug (e.g. hr-agent). The tool endpoint will be at {mcpo_base_url}/{server_name}/tools/call.


Logic​

if_else​

Evaluates a Python expression against the current workflow state and branches execution.

Config fields:

FieldDescription
conditionPython expression that evaluates to True or False (e.g. state.get('score', 0) > 0.8). See Expression sandbox

Edges: Draw two outgoing edges labelled exactly true and false. The node's output is always one of these two values.

Validation: The condition is trial-run when you save, stage or publish the workflow — evaluated once with an empty state and an empty input. A syntax error, an unknown name, or an error on those empty values (e.g. state['score'] > 0.8 raises KeyError) is reported and blocks publishing. Write conditions that tolerate missing data: state.get('score', 0) > 0.8.

If the expression raises an error at runtime (e.g. int(input or '0') > 5 on a non-numeric input), the condition defaults to False (takes the false branch) and a warning is attached to that node's node_complete event — visible in the run stream/timeline, not just the server log.


while_loop​

A conditional router that emits "continue" or "done" depending on a condition, and the runtime follows the matching outgoing edge.

Config fields:

FieldDescription
conditionPython expression. Same context and validation as if_else. When True the node emits continue; when False, done.
max_iterationsIteration cap, 1–100 (default 10). Once reached, the node emits done regardless of the condition.

Edges: Draw two outgoing edges from this node:

Edge labelWhen followed
continueCondition is True and max_iterations not yet reached
doneCondition is False or max_iterations reached

Iteration counter: The current iteration count is stored in workflow state under the key _while_{node_id}_iter, readable by the nodes on the continue path.

A while_loop does not repeat within a run

The runtime computes the execution order once, up front. A loop body never runs more than once per workflow run, so max_iterations above 1 has no practical effect.

Do not wire the loop body back into the while_loop (a back-edge): the cycle is scheduled as a single parallel step, so the while_loop, its body and its done path all start at the same time — the done path runs before the condition has been evaluated. Use while_loop as a two-way router without a back-edge, and use for_each to repeat work over a list.

If the condition expression fails at runtime, it defaults to False (emits done) and a warning is attached to that node's node_complete event — visible in the run stream/timeline, not just the server log.


for_each​

Maps over a JSON array and returns a JSON array of results — the runtime's way to repeat work N times within one run.

Config fields:

FieldDescription
items_expressionExpression producing the array to iterate (default input). A JSON string is parsed; the result must be a list
item_modetransform (default) — evaluate an expression per item; or agent — one LLM call per item
item_expressiontransform mode: expression applied to each element, available as item (e.g. item.upper())
item_prompt_templateagent mode: prompt per item, with {item} replaced by the element (default {item})
llm.system_prompt / llm.model_idagent mode: instructions and model for the per-item call (inline prompt only — skill_id is not supported)
max_itemsProcess at most this many elements, 1–100 (default 20)
concurrencyElements processed in parallel, 1–10 (default 1)

If items_expression doesn't produce a list, the node outputs an error message stating that it must evaluate to a JSON array, and the run continues.

Note

To process each item in a list, use for_each; while_loop is for "repeat until a condition is false". A user_approval node or review-mode agent inside a loop body isn't supported: body nodes run inline, so the run can't pause there. The whole run is still bounded by WORKFLOW_MAX_TIMEOUT_SECONDS.


user_approval​

Pauses workflow execution and creates an inbox task for a human reviewer. Unlike agent nodes in review mode (which run the LLM first and pause on its output), user_approval pauses immediately — the configured prompt text itself is what the reviewer sees and decides on.

Config fields:

FieldDescription
promptText shown to the reviewer as the task description
review_groupWho can see and decide the task — a space role (e.g. lifecycle_manager, the default) or an admin-console group (group:{id}), selectable in the properties panel
review_timeout_minutesMinutes before the task expires (default 60). Values below 15 are raised to 15
timeout_actionWhat happens if no one decides in time: auto_proceed (default), reject, or escalate
timeout_escalate_groupOnly used when timeout_action is escalate — the role or group the task is reassigned to

When this node is reached, the run pauses and an inbox task is created. The reviewer sees it in Dashboard > Inbox and decides:

DecisionWhat happens to the run
ApproveResumes down the approve edge, or the unlabelled edges
ModifyResumes with the reviewer's edited text as the node's output, down the modify edge if there is one, otherwise as an approval
Reject (notes required)Resumes down the reject edge if the node has one. Otherwise it ends: the run's status becomes rejected and no later node runs
DelegateNothing yet: the task moves to the chosen colleague, still pending

The run continues as soon as the decision is made. It doesn't wait for anyone to have the editor or run stream open, and a periodic check resumes anything still waiting.

Branching on the decision: label the edges out of the approval node approve, modify and/or reject (synonyms such as approved, request_changes and rejected also work). Only the branch for the decision runs; unlabelled edges are always followed. Later nodes can read state.approval_decision and state.approval_comment.

A review that times out with timeout_action: reject ends the run. With auto_proceed it continues as an approval, with approval_comment set to "Auto-approved after the review timed out.". A workflow can't loop back to its own approval node: publishing refuses loops that don't go through a while_loop (see Unpredictable Process Patterns → Pattern 5 for review rounds). See Inbox for the full decision flow.


sub_workflow​

Invokes another published workflow inline and uses its final output as this node's output. Wired by the workflow author at build time — the target is fixed in the graph, not decided dynamically.

Config fields:

FieldDescription
workflow_idThe published workflow to invoke (selected from a dropdown of published workflows) — required
input_expressionOptional Python expression for the child's input (e.g. state['summary']). Leave blank to pass the previous node's output

An empty workflow_id is reported by the graph validator and blocks publishing. A target that doesn't exist or isn't published is reported in the node's output at run time.

Recursion guard: a workflow that calls itself, directly or through a chain (A → B → A), is stopped as soon as the cycle is reached — the node's output is [sub_workflow: recursion detected …] instead of the run hanging until its wall-clock timeout.

If you need an AI agent to decide at runtime whether and which workflow to delegate to, use the trigger_workflow tool on an agent node instead.

The child run is linked back to the parent

The run this node spawns records parent_run_id/parent_node_id pointing back to the calling run and this node — so the full call chain (however many levels deep) can be viewed as a tree instead of disconnected runs. See Traceability & Audit Log → chain correlation.


Data​

transform​

Applies a Python expression to compute or reshape a value. The result (converted to text) becomes the node's output.

Config fields:

FieldDescription
expressionPython expression. input is the previous node's output; state is the full workflow state. See Expression sandbox

Examples:

Strip whitespace from the incoming text:

input.strip()

Compute a word count:

len(input.split())

Build a summary string using state keys:

f"Score: {state.get('score', 0):.2f} — {state.get('label', 'unknown')}"

Validation: The expression is trial-run at save, stage and publish time with an empty state and input, same as if_else — use state.get(...) for keys that are set later in the run. If an expression fails at runtime, the error is written as the node's output (prefixed [transform error: ...]) rather than crashing the run, giving you a visible signal without losing the full run timeline.


set_state​

Sets a key in workflow state. The value supports the same sandboxed Python expressions as transform and if_else — useful for counters, computed flags, or dynamic values, not just static literals.

Config fields:

FieldDescription
state_keyThe state key to write
state_valueA literal (e.g. pending, in review) or an expression referencing state/input (e.g. state.get('count', 0) + 1, input.upper())

How the value is interpreted: it is evaluated as an expression first; if evaluation fails at runtime, the raw text is stored instead — so plain words and sentences work as literals and existing static-value workflows are unaffected.

Validation: plain text — a single word like pending, or text that isn't Python, like in review — is accepted as a literal. Anything that looks like an expression is trial-run like transform: 1 / 0 is reported, and so is state['count'] + 1 (the key doesn't exist in the empty validation state). Write state.get('count', 0) + 1 instead.

Plain text such as pending or in review publishes as a literal. A value that looks like an expression is still checked, so a typo such as stae.get('count', 0) + 1 is reported rather than silently stored as text.


merge​

Explicit fan-in: combines the outputs of all of this node's incoming (predecessor) nodes.

Config fields:

FieldDescription
merge_strategyconcat (default) — join the non-empty outputs with separator; first_non_empty — the first predecessor that produced output; json_object — a JSON object of {node_id: output}
separatorconcat only: text placed between outputs (default a blank line)

A predecessor that didn't run — for example the losing branch of an if_else — counts as empty, so merge can rejoin branches after a routing node.


Expression Sandbox​

if_else, while_loop, transform, set_state, for_each, mcp tool_args, file_search query and sub_workflow input_expression all use the same sandboxed evaluator.

Variables:

VariableValue
inputThe previous node's output (the workflow input, for nodes directly after start)
stateFull workflow state dictionary — state.get('key', default) or state['key']. Includes each executed node's output under its node ID and the original message as state['trigger_input']

Allowed built-ins: abs, all, any, bool, dict, enumerate, filter, float, int, len, list, map, max, min, reversed, round, set, sorted, str, sum, tuple, zip.

isinstance and repr are not available

Unlike every other built-in listed above, these two can't be added to the sandbox — the underlying expression library (simpleeval) hardcodes both in its own safety blocklist for defense-in-depth, rejected at evaluator construction time no matter how the sandbox is configured. An expression using either is reported by the validator. Restructure the workflow to avoid needing runtime type introspection, or do the check in an upstream transform/agent node using plain string/value comparisons.


Graph Validation​

Every graph save returns the validator's warnings; approving a staged workflow re-runs the same checks and rejects publishing (HTTP 422) while any remain. See Workflow Lifecycle.

CheckApplies to
Exactly one start node, at least one end nodeWhole graph
No unknown node typesEvery node
Every node reachable from start (note exempt)Every node
Edges reference existing nodes — refused outright on save (HTTP 422), not just warnedEvery edge
Expression trial-run (see each node)if_else, while_loop, transform, set_state
At least one categoryclassify
At least one ruleguardrails
server_url and tool_name setmcp
workflow_id setsub_workflow

Edges and Conditions​

Edges connect an output connector on one node to an input connector on another. Most edges are unconditional — the runtime follows them automatically after the source node finishes.

For classify, if_else and while_loop, edges carry a label matching the node's output (a category name, true/false, or continue/done). The runtime follows only the edge(s) whose label matches — every node reachable solely through a non-matching branch is skipped, not just left unexecuted in isolation. An unlabelled edge from a routing node is always followed.

user_approval does not branch by edge label — the run always continues to the next node in sequence after a decision.

To label an edge: click the edge after drawing it and type the label in the properties panel.


Canvas Tips​

  • Add a node: Drag from the palette onto the canvas.
  • Connect nodes: Hover over a node until connectors appear; drag from a connector to another node.
  • Delete: Select a node or edge and press Delete / Backspace.
  • Multi-select: Hold Shift and click multiple nodes; drag to box-select.
  • Zoom: Scroll wheel, or use the zoom controls in the bottom-right.
  • Auto-arrange: The AI Assist generate feature places new nodes with automatic layout. Manual positioning is always available by dragging.
Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.