Docs

Logic

Logic components control branching, looping, conditional evaluation, code execution, and output validation.


If-Else

Branches the flow based on a boolean condition evaluated against an input value.

Use in a flow

  1. Add an If-Else node to the canvas.
  2. Enter Text Input and Match Text.
  3. Choose an Operator to compare them.
  4. Connect Message (the payload to pass through the matching branch).
  5. Wire True or False outputs to different downstream paths.
Input ──► If-Else ──► True branch ──► Agent A
             └──► False branch ──► Agent B

Only the matching branch receives the message; the other branch is stopped.

Parameters

ParameterDefaultHiddenDescription
Text Input—NoThe value to evaluate. Required.
Match Text—NoThe text to compare against. Required.
OperatorequalsNoComparison: equals, not equals, contains, starts with, ends with, or regex.
Case SensitivefalseNoCase-sensitive comparison (not used for regex).
Message—NoMessage passed through the active branch.
Max Iterations10YesMaximum loop iterations before forcing a route.
Default Routefalse_resultYesRoute taken when max iterations is reached.

Outputs

OutputDescription
TrueFires when the condition is met. Passes Message downstream.
FalseFires when the condition is not met. Passes Message downstream.

Limitations

  • Text comparison — Compares string values; both Text Input and Match Text are required.
  • Regex — Invalid regex patterns evaluate to false.
  • Single branch — Only one output runs per execution; the other is stopped.

Condition (Legacy)

Evaluates a conditional expression and routes to one of multiple output paths based on the result.

Use in a flow

  1. Add a Condition node to the canvas (legacy component).
  2. Connect Data Input from an upstream component.
  3. Enter Key Name — the field in the Data object to evaluate.
  4. Choose an Operator and Match Text (if applicable).
  5. Wire True Output or False Output downstream.
Data source ──► Condition ──► True Output ──► processing
                       └──► False Output ──► alternate path

Parameters

ParameterDefaultDescription
Data Input—One or more Data objects to evaluate.
Key Name—Key in the Data object to check.
Operatorequalsequals, not equals, contains, starts with, ends with, or boolean validator.
Match Text—Value to compare against. Hidden when Operator is boolean validator.

When Operator is boolean validator, the key value is treated as a boolean (true, 1, yes, y, on are truthy). Match Text is not used.

Outputs

OutputDescription
True OutputFires when the condition is met. Returns matching Data object(s).
False OutputFires when the condition is not met. Returns non-matching Data object(s).

Limitations

  • Legacy — Prefer If-Else for new flows unless you need Data-key routing.
  • Data input — Input must be Data objects with the specified key.
  • Missing key — Returns an error if Key Name is not found in the Data object.

Code Execution

Executes a Python snippet and returns the result. Use it for custom logic that cannot be expressed with other components.

Use in a flow

  1. Add a Code Execution node to the canvas.
  2. Select Language (python or node.js).
  3. Write Source Code.
  4. Optionally add Dependencies (Python packages).
  5. Connect Result downstream.
Input ──► Code Execution ──► Data Operations / Agent

Code runs in an isolated execution service. The stdout, stderr, exit code, and execution time are returned.

Parameters

ParameterDefaultHiddenDescription
LanguagepythonNopython or node.js. Required.
Source Code—NoCode to execute. Accepts Message input. Required.
Dependencies—YesComma-separated pip packages to install before execution (e.g., requests,pandas).

Outputs

OutputDescription
ResultData object with result (stdout), error (stderr), exit_code, status, and execution_time_ms.

Limitations

  • Isolated runtime — Code runs via the Code Execution Service, not in-process.
  • Python dependencies — Only pip packages listed in Dependencies are installed.
  • Errors — Execution failures return an error field in the result instead of raising in the flow.

Guardrail

Applies a configured guardrail policy to data passing through this point. Content that violates the policy is routed to the fail path.

Use in a flow

  1. Add a Guardrail node in the path you want to validate.
  2. Select one or more Selected Guardrails (format: guardrail_name#INHOUSE or guardrail_name#BEDROCK).
  3. Connect Input Message from upstream.
  4. Wire Pass and Fail outputs to different downstream paths.
Input ──► Guardrail ──► Pass ──► Agent
                 └──► Fail ──► blocked response / Output

Parameters

ParameterDefaultHiddenDescription
Selected Guardrails—NoOne or more guardrails to execute. Required.
Input Message—NoMessage to validate. Required.
Apply ToINPUTNoValidate INPUT (user message) or OUTPUT (generated response). Required.
Model Provider—NoRequired for INHOUSE guardrails.
Model ID—NoModel for INHOUSE guardrail execution.
Region Name—NoRegion for the selected model.
Context—NoAdditional context for guardrail evaluation.
Generated Output—NoGenerated output to validate (for OUTPUT validation).
Enable RetryfalseYesRetry failed guardrail API requests.
Max Retries3YesMaximum retry attempts.
Save Output as VariablefalseYesStore output as a flow variable.
Variable Name—NoName for the flow state variable.

Outputs

OutputDescription
PassFires when all guardrails pass. Returns the validated message.
FailFires when content is blocked. Returns the blocked message.

Limitations

  • Guardrails required — At least one guardrail must be selected.
  • Dual routing — Only one branch runs per execution.
  • Large content — Long text and PDFs are chunked before evaluation.
  • Images — PNG and JPEG attachments are supported in evaluation.

Loop

Iterates over a list of items and executes a downstream path for each item.

Use in a flow

  1. Add a Loop node to the canvas.
  2. Connect a list of Data objects (or a single Data object).
  3. Wire Item output into the processing branch.
  4. Connect the loop-back edge from the end of the branch back to Loop.
  5. Wire Done output for aggregated results after all items are processed.
Data source ──► Loop (Item) ──► processing ──► (loop back)
                    └── (Done) ──► Output

Parameters

ParameterDescription
DataInitial list of Data objects to iterate over, or a single Data object. Required.

Outputs

OutputDescription
ItemOne Data object per iteration. Connect downstream processing here. Supports loop edges.
DoneFires when all items are processed. Returns aggregated results from loop inputs.

Limitations

  • Data only — Input must be Data objects or a list of Data objects.
  • Loop wiring — The processing branch must connect back to the Loop node for iteration.
  • Aggregation — Done collects outputs wired back via the loop input.

Run Flow (Beta)

Executes another flow by ID and returns its output.

Use in a flow

  1. Add a Run Flow (Beta) node to the canvas.
  2. Select Flow Name from the dropdown (loads available flows).
  3. Fill in any dynamic input fields exposed by the selected flow.
  4. Connect Flow Message Output downstream.
Input ──► Run Flow ──► Output / Agent
Agent ──► Run Flow (as tool)

When a flow is selected, the component exposes that flow’s input fields as tweakable parameters. In tool mode, the selected flow becomes a callable tool.

Parameters

ParameterHiddenDescription
Flow NameNoThe flow to execute. Selecting a flow adds its input fields dynamically.
Session IDYesSession ID for the sub-flow run.
Dynamic flow inputsNoInput fields from the selected flow (named {node_id}~{field_name}). Appear after flow selection.

Outputs

OutputDescription
Flow Message OutputPrimary message output from the executed flow.
Flow Data OutputData output from the executed flow (hidden by default).
Flow Dataframe OutputDataFrame output from the executed flow (hidden by default).

Limitations

  • Beta — Behavior may change.
  • Flow selection required — A flow must be selected before execution.
  • Tool mode — Select a flow to enable using this component as a tool in an Agent.

Confidence Score Component

Evaluates a confidence score and branches on whether it exceeds a configured threshold.

Use in a flow

  1. Add a Confidence Score Component node after an Agent or LLM step.
  2. Select Strategy (currently Contextual Grounding).
  3. Choose a Confidence Scoring Rule (Bedrock guardrail with contextual grounding enabled).
  4. Wire Context, Generated Output, and Input Message.
  5. Connect Above Threshold and Below Threshold to different paths.
Agent ──► Confidence Score Component ──► Above Threshold ──► Output
                              └──► Below Threshold ──► fallback

Parameters

ParameterDefaultHiddenDescription
Strategy—NoScoring strategy. Currently Contextual Grounding. Required.
Confidence Scoring Rule—NoBedrock guardrail rule to execute. Required.
Confidence Threshold—NoOverride threshold (0.0–1.0). Leave empty to use the guardrail default.
Blocked Message—NoMessage returned when score is below threshold.
Context—NoGrounding source context for scoring. Required.
Generated Output—NoAgent or LLM output to evaluate. Required.
Input Message—NoOriginal user message (preserves message properties). Required.
Output Fieldconfidence scoreNoconfidence score or message as the routed output content. Required.
Model Provider—YesRequired when a Bedrock scoring rule is selected.
Model ID—YesModel for Bedrock guardrail execution.
Region Name—YesRegion for the selected model.

Outputs

OutputDescription
Above ThresholdFires when the confidence score meets or exceeds the threshold.
Below ThresholdFires when the score is below the threshold. Returns blocked message or score based on Output Field.

Limitations

  • Bedrock guardrail required — Scoring rule must be a Bedrock guardrail with contextual grounding policy enabled.
  • Context and output required — Both Context and Generated Output are needed for grounding evaluation.
  • Score calculation — When both GROUNDING and RELEVANCE filters are present, the minimum score is used.