ClouisleClouisle

Orchestrate a Workflow

Build a runnable typed flow from the start node to the output node

The workflow editor uses a visual canvas: the left node panel adds nodes, the central canvas connects the flow, and the right drawer configures the selected node. Workflows support manual, Webhook, and scheduled triggers.

The Workflow Builder

Layout

  • Node panel (left): available node types by category
    • Model: LLM, media generation
    • Logic: condition, question classifier, decision, iteration, loop, pause
    • Transform: code, template, file to URL, variable aggregation, variable assignment, parameter extraction
    • Extension: sub-workflow, Agent, tool, knowledge retrieval, answer
  • Canvas (center): the design area; add, connect, and arrange nodes
  • Property panel (right): node settings and variables
  • Toolbar (top): save, test (debug), zoom controls

Steps to build a workflow

  1. Add the start node: every workflow begins with a start node (user input or trigger) that defines input parameters
  2. Add processing nodes: add nodes to process data; see node types below
  3. Connect nodes: click a source node's output port and drag to the target node's input port
  4. Configure nodes: set each node's options in the property panel
  5. Add an answer node: the answer node defines the workflow's final output; it is the builder's output node, not a separate runtime “end” node
  6. Test the workflow: click Test (debug), provide test data, run it, and inspect the result
  7. Save and publish: click Save to keep a draft, Publish to activate the workflow

Variables and data flow

  • Input variables: defined on the start node, collected from the user or trigger
  • Node variables: node outputs, referenced by later nodes

Insert references with the variable picker in prompts and conditions — do not hand-write names that do not exist; the editor lists only currently available variables.

Error handling

The builder has no try-catch or retry UI. What happens after a node fails depends on the execution logic and workflow structure; errors are recorded in the run and node execution for inspection. HTTP requests retry up to 3 times by default, but the builder has no separate retry setting.

Workflow templates

Built-in templates:

  • Simple Q&A bot: a basic Q&A bot using an LLM
  • RAG knowledge bot: knowledge base Q&A with retrieval augmentation
  • Intent router: routes the conversation by detected intent
  • Code review assistant: multi-perspective automated code review

A template instantiates into a new workflow; inspect and configure its models, knowledge bases, and other node references in the editor — do not assume the template's variable names are fixed.

Keyboard shortcuts

  • Space + Drag: pan the canvas
  • Ctrl/Cmd + Scroll: zoom
  • Ctrl/Cmd + 0: reset zoom

Create and Save a Draft

  1. Go to Apps > Create App > Workflow.
  2. In Workflow settings, fill in the name, description, visibility, and owning team.
  3. Choose the start node: User input suits form interaction; Trigger suits API or Webhook calls.
  4. Drag nodes from the panel onto the canvas, or click Add node.
  5. Drag from a source handle to a target handle to connect. The start node cannot be deleted.
  6. Select Save. The editor tracks the last save time and unsaved changes.

Define Variables

The start node uses workflow-level variables. Types include text, paragraph, dropdown, number, boolean, array, object, file, image, multiple files, and multiple images. Each variable can be required and can have a default, label, and description.

Use the editor's picker to reference variables rather than hand-writing names. The current definition format supports passing native objects and arrays.

Node Types

The node panel is organized into four categories; the tables below list each node under the same categories:

Model nodes

NodePurpose
LLMCall a language model for text generation and analysis
Media generationGenerate images or videos with a compatible model

Logic nodes

NodePurpose
User inputEntry point for manual runs (chosen when creating the workflow; not in the add-node menu)
TriggerEntry point for trigger runs (same as above)
Conditional branchBranch on an expression result
Question classifierClassify the input question with a chat model
DecisionMake a typed judgment with a decision model and branch on the result
IterationIterate a list, running the child nodes in the container for each item
LoopRepeat a branch until a condition holds
PauseWait for an approval or variable input

Transform nodes

NodePurpose
Code executionRun custom Python or JavaScript
TemplateRender a template string
File to URLTurn a file into an accessible address
Variable aggregationMerge several variable values
Variable assignmentAssign a value to a variable
Parameter extractionExtract structured parameters from text

Extension nodes

NodePurpose
Sub-workflowCall another published workflow
AgentCall a published Agent
ToolExecute a configured tool
Knowledge retrievalRetrieve relevant content from a knowledge base
AnswerDefine the workflow's final output

Iteration, loop, and pause cannot be nested inside another container: inside an iteration/loop container, the logic category only offers condition, question classifier, and decision, and the container boundary is marked by end markers that cannot be connected on their own.

HTTP request and document extraction are available in the engine but have no node in the builder panel — they only appear in definitions submitted programmatically.

Not implemented: Transform, Parallel, Wait, Switch, Database, Email, Webhook (as a node), Log, Delay, Merge, Input, and Output node types. Variable handling uses the variable assignment and variable aggregation nodes.

Configure Nodes

Configure each node for its task:

LLM node

  • Model: choose a configured model (for example GPT-4 Turbo or Claude)
  • Prompt: reference upstream variables with {{variable}}
  • Temperature: usually 0-2, with the usable range depending on the model; controls randomness
  • Max tokens: caps the output length
  • Top P: usually 0-1, with the usable range depending on the model; nucleus sampling
  • Output variables: names for the stored model output

Outputs: response text, reasoning, token usage, plus your configured output variables.

Media generation node

  • Media type: image or video
  • Prompt: supports upstream variables
  • Width/height: (image)
  • Duration/aspect ratio: (video)

Conditional branch node

  • Condition expression: Jinja2 syntax, such as {{analysis_result.urgency}} == "high"
  • True branch: downstream nodes when the condition holds
  • False branch: downstream nodes when it does not

Question classifier node

Classifies the input into one of several intents/categories and routes accordingly. It puts the categories in the prompt, has the chat model generate JSON, and parses the category from the text; when you need probabilities, confidence, and no format errors, use the decision node below instead.

Decision node

The decision node calls a decision model (non-generative) to make one typed judgment about a state, then follows the matching branch. The model produces no prose — only a probability distribution over options/levels plus confidence — so routes never parse model output and a chatty model cannot take the wrong branch.

Connect a decision model first: an administrator adds TypeSafe AI under Integrations > Model providers (default address https://api.typesafe.ai/v1) and authorizes it for the current team as a Decision model. The node's Decision model dropdown lists only enabled decision-type models for the team; with none available it shows “No models available”.

SettingTypeDefaultDescription
Decision modelModelNone (required)An enabled decision model for the team; without one the checklist reports “No model selected”
Input stateTemplate stringNone (required)What the model evaluates, supporting {{variables}}. It renders to a string; to pass an object or array, build text first with template/variable-assignment nodes
Question typeChoose one option / Score on an ordered scale / Yes-no judgmentChoose one optionDetermines branch handles and available outputs, see below
InstructionsStringNone (required)One sentence stating what to judge, for example “Decide whether this refund should be approved directly”
Options / ordered levelsString list["yes", "no"]“Choose one option” needs 1–255 unique options; “Score on an ordered scale” needs 2–10 ordered levels; empty or duplicate values are rejected by the checklist
Fallback branchStringdefaultWhere to go when confidence is below the threshold or no branch is parsed
Confidence thresholdNumber 0–1Unset (disabled)Shown for choice/score types only; when confidence is strictly below it, the flow takes the fallback

The question type determines branch handles and outputs:

Question typeBranch handlesConfidenceWhen to use
Choose one optionOne handle per option, plus a fallbackYesPick one of several exclusive dispositions (refund / technical / billing / other)
Score on an ordered scaleOne handle per level, plus a fallbackYesThe level is inherently ordered (low/medium/high, P0–P3) and you also need a numeric score
Yes / no probabilityFixed Yes, No, plus a fallbackNoA single binary decision; probability at least 0.5 goes Yes, otherwise No; no confidence, so the threshold does not apply

Branch handles and renaming

  • Each option or level of “Choose one option”/“Score on an ordered scale” is an output handle on the canvas, named after the option/level text; the fallback handle defaults to default.
  • When you change option text without changing the count, the editor remaps connections by position; if you change the count, leftover connections point at stale output handles, the checklist reports an error, and you must reconnect to current handles.
  • You do not have to connect every branch, but any connected branch needs a downstream node; low-confidence answers take the fallback, and a fallback without a downstream node ends the flow at this node.

Fallback and confidence threshold

  • The threshold only applies when confidence is strictly below it; equal to the threshold still follows the model's choice.
  • The threshold affects routing only, not outputs: the judgment result is always the model's chosen option/level, and the actual branch is the one taken.
  • Without a threshold, only an unparseable result takes the fallback; “Yes / no judgment” never uses the fallback (it always returns yes or no).
  • The decision node retries up to 2 times by default (exponential backoff starting at 1 second); retries are unrelated to the threshold, which only handles “answered but unsure”.

Outputs

OutputDescription
Judgment resultThe chosen option/level, or yes/no
Actual branchThe branch handle actually taken (the fallback handle when rerouted by the threshold)
Token usageUsage for this decision call
Confidence / probability distributionChoice and score types output confidence and per-option probabilities; yes/no outputs only the probability of yes

Downstream nodes can record the judgment result in a variable and use confidence or the probability distribution to decide whether to add a human review layer.

Failure paths

SymptomTrigger
Validation errorNo model selected; empty input state or instructions; invalid question type; option count out of range, empty, or duplicated
Result mismatchThe returned answer type, option set, or probability set does not match the node configuration (for example, an option that is not configured)
Provider/model errorThe team has not authorized the decision model; the model or authorization is disabled; the address is blocked by the model endpoint allowlist; the request times out (default 60 seconds); authentication or quota errors

Example: ticket triage

### Define inputs
On the start node add ticket_text (paragraph) and customer_tier (dropdown: free/pro/enterprise).
### Configure the decision node
Pick an authorized TypeSafe AI decision model as the Decision model; set Input state to {{start.ticket_text}}; choose Choose one option as the Question type; write “Decide which handling team this ticket belongs to” as the Instructions; enter refund, technical, billing, and other as Options.
### Set fallback and threshold
Set Fallback branch to manual_review and Confidence threshold to 0.6 — tickets where the model is less than 60% confident are no longer auto-dispatched and go to a human.
### Connect branches
Connect refund to the refund approval sub-workflow, technical to a technical-support LLM node, billing to a billing template node, and manual_review to a Pause node (approval mode) for human handling. Leaving other unconnected ends the flow there.
### Debug and calibrate
Run a deliberately vague ticket and confirm it lands in manual_review; inspect the node's judgment result, confidence, and probability distribution in the run trace, then decide whether 0.6 should go up or down.
### Pass the checklist
Confirm there is no “No model selected” and no “stale decision output handle”, then publish.

Debugging decision branches

  • The checklist reports, item by item: no model selected, empty input state, empty instructions, too few/too many options or levels, empty or duplicate options, and connections using stale handles.
  • In the run trace, check the actual branch (which path was taken) and confidence (whether the threshold rerouted it). If it always lands on the fallback, look at the probability distribution: close probabilities mean tune the threshold, while a clear but wrong choice means rewrite the instructions or input state.
  • A decision node is one call, one result with no intermediate steps: debug by running the whole flow; there are no breakpoints or single-stepping.

Iteration/loop nodes

  • Collection: the array variable to iterate
  • Item variable: the name for the current item
  • Output variable: the name for the result array

Pause node

Pauses execution until team members provide the requested variables or submit an approval decision. A pause can be Variable or Approval mode; a waiting run resumes after the request is handled.

  • Mode: Variables (collect form fields) or Approval (wait for approve/reject), default Variables
  • Title: name shown on the approval or form page; blank uses the node name
  • Description template: supports {{variables}}, resolved before saving; unresolvable references become empty strings, so raw placeholders are never shown to approvers
  • Input variables (variable mode): fields to collect, each with name, type, required flag, and description
  • Approvers (approval mode): choose team members. If none are chosen, the workflow creator and team administrators handle it; once chosen, only listed members can submit, and super administrators can override
  • Approval policy: off by default — one submission decides; with Require all approvals on, every approver must submit, the run resumes only when all approve, a single rejection fails immediately, and a duplicate submission by the same person is rejected

Variable mode outputs the submitted fields themselves; approval mode outputs the decision (approved/rejected), whether it passed, the comment, and the submitter, and a rejection fails the run as “approval rejected”. Pending requests and the run trace appear in the run drawer; see Workflow nodes.

Code execution node

  • Language: Python or JavaScript
  • Code: your execution logic
  • Timeout: currently fixed at 30 seconds; not a freely configurable 1-300 second range in the builder
  • Input variables: variables passed to the code
  • Output variables: variables returned by the code

Template node

Renders a template string with variables (for example {{variable}} substitution).

File to URL node

Turns a file (such as a sandbox artifact) into a downloadable site address.

Variable assignment node

Assigns a value to a variable.

Variable aggregation node

Aggregates values (for example, collecting loop results into an array).

Parameter extraction node

Extracts structured parameters from text using a model, a regular expression, or a JSON path.

  • Extraction method: Model / Regex / JSON path
  • Source variable: the text to extract from
  • Parameters: the list of fields to extract

HTTP request node

The canvas panel does not offer an HTTP request node; only definitions submitted programmatically can use this type. For visual orchestration, use a Tool node with a created HTTP API tool instead.

  • Method: GET / POST / PUT / PATCH / DELETE
  • URL: the target endpoint
  • Headers: custom HTTP headers
  • Body: JSON payload
  • Timeout: default 30 seconds
  • Output variables: the stored response data

HTTP requests retry up to 3 times by default; the builder has no separate retry setting.

Tool node

  • Tool: choose a configured tool (built-in / custom / MCP / Skill)
  • Argument mapping: one mapping per argument, sourced from an upstream variable or a constant; constants must declare a type, otherwise "10" reaches the tool as a string
  • Type conversion: integer, float, boolean, array, and object each parse accordingly; invalid values fail the node with an invalid-argument error
  • Web search engine: selecting the built-in web search adds an engine dropdown; the default uses the site default and the rest list only enabled engines; execution revalidates, so a disabled engine fails
  • Output variables: the tool result, plus status and duration

Available built-in tools: time and date, math, unit conversion, web search, web page fetching, RSS/Atom feeds, document conversion, and sandbox file tools. Image and video generation use the Media generation node; interactive questions come from an Agent capability switch — none of these appear in the tool catalog.

Knowledge retrieval node

  • Knowledge base: choose the target knowledge base
  • Query template: reference the query with {{variable}}
  • Result count: default 5; the exact upper bound depends on the API and configuration
  • Similarity threshold: default 0.0, the minimum similarity score
  • Retrieval mode: Vector / Full-text / Hybrid

Sub-workflow node

Runs another workflow as a nested step and captures its output.

Agent node

Calls an AI Agent with a message and optional context.

Answer node

Returns the workflow's final answer/output.

When configuring nodes, make sure every input variable has an explicit source (an upstream node output or a start-node variable). Unconnected inputs are reported by the pre-publish checklist; resolve them before debugging and publishing.

Trigger Configuration

Workflows support three trigger types:

Manual trigger

No extra configuration. Once published, users with permission can trigger the workflow from the UI.

Webhook trigger

Setting the trigger type to Webhook generates a trigger address and trigger token. Give the address to the caller; the caller sends a POST with a clou_ API key in the request header and the workflow input variables as the body (raw JSON or {"inputs": {...}}).

Not implemented / roadmap: wh_.../whsec_... credential pairs, IP allowlists, per-Webhook rate limits, retry policies, and Webhook request logs are currently unavailable.

Scheduled trigger

Setting the trigger type to Scheduled task lets the UI configure an interval, daily, weekly, monthly, or custom expression. The schedule is converted to a standard expression (minute hour day month weekday, for example 0 9 * * 1-5 for 9:00 on weekdays).

Saving a scheduled trigger alone does not make the workflow run: the bundled deployment does not schedule workflows by default. For scheduled execution, ask whoever maintains the deployment to enable the scheduler and align the expression the UI saves; otherwise trigger the workflow manually or via Webhook. See Triggers.

Drafts and Publishing

A workflow has three states:

Draft

  • Being edited
  • Cannot be triggered
  • Visible only to editors
  • Can be saved at any time

Published

  • Runnable
  • Can be triggered from the UI, API, or a Webhook
  • Visible to every user with permission
  • Must be unpublished before editing

Archived

  • A disabled workflow
  • Hidden from normal lists
  • Configuration is retained

There is no active/inactive state. Archived is a separate state applied via an update; publishing and unpublishing are administrator lifecycle actions.

Pre-Publish Checklist

Open the checklist and resolve these issues before debugging, running, and publishing:

CheckDescription
No model selectedAn LLM node has no model
Input variable has no sourceA node input is not connected to an upstream variable
Node has no inputA required node is missing an input connection
Output undefinedThe answer node has no output variable
Incomplete conditionalA condition node is missing its True or False branch
Incomplete decision configThe decision node has no model, an empty input state or instructions, or an invalid option/level count or uniqueness
Stale decision handlesA decision connection points at an option/level handle that no longer exists; reconnect it
Missing required tool argumentsA tool node lacks a mapping for a required argument
Incomplete loop containerA loop node is misconfigured

Once validation passes, use Debug run to test the workflow and confirm the output before publishing.

Run a Workflow

Open a workflow

  1. Go to Apps (/app/apps).
  2. Open the Workflow tab.
  3. Select a workflow card to open /app/apps/workflow/{id}.
  4. Select Run to start a manual execution.

Workflow list

The list shows:

ColumnDescription
NameWorkflow name
TeamOwning team
StatusDraft or published
Last runLast execution time; a run may be waiting at a pause node
ActionsRun, view, edit

Manual execution

  1. Open the workflow
  2. Click Run
  3. If the workflow has input variables:
    • Fill in required inputs
    • Review optional inputs
    • Click Start
  4. Watch execution in real time
  5. Inspect the result when it finishes

Input variables

A workflow may need:

  • Text: free-form text
  • Number: numeric input
  • Dropdown: selectable options
  • Boolean: yes/no checkbox

Watching execution

Live progress:

  • ⏸️ Pending: not started
  • ⏳ Running: executing
  • ⏳ Waiting: paused for external input or approval
  • ✅ Succeeded: completed successfully
  • ❌ Failed: execution failed
  • ⏭️ Skipped: skipped (conditional)

Execution details: Click a node to see its status, duration, inputs, and outputs.

Streaming output: LLM nodes stream in real time; the execution view shows partial content while running.

Execution results

Success: shows duration, number of nodes executed, and status.

Failure: shows the failing node and error message.

Common errors:

  • Invalid input format
  • API call failure
  • Timeout
  • Resource not found
  • Permission denied

Stopping execution

  1. Click Stop execution
  2. Confirm
  3. The workflow stops at the current node

Workflow variables

Input variables: provided when starting the workflow.

Output variables: produced during execution by the answer node and other nodes.

Viewing Run History

Execution history

  1. Select a workflow
  2. Open the Execution history tab
  3. Review runs: run number, status, start time, duration, trigger source, inputs and outputs

Execution details

Click a run to see:

  • Run info: run number, workflow name, status, start and finish time, duration, trigger type
  • Node timeline: start time, finish time, and duration per node
  • Node details: inputs, outputs, status, and errors per node
  • Live events: node status updates and LLM output while running

Workflow logs

Run history is also available from the workflow Logs view (/app/apps/workflow/{id}/logs). Open Apps > Workflow, select the workflow, and choose Logs from the workflow menu.

Run detail fields:

FieldDescription
StatusThe log UI shows completed, failed, running, pending, cancelled, or timed out
Start timeWhen execution started
DurationTotal execution time
Triggered byA user or a Webhook
InputsProvided input variables
OutputsExecution results
Nodes executedNumber of nodes run
ErrorError message (if failed)

Status badges:

BadgeLog labelDescription
✅CompletedCompleted successfully
❌FailedExecution failed
⏳RunningExecuting
⏳PendingQueued before execution, or waiting at a pause node
⏹️CancelledStopped or cancelled; no dedicated filter yet
⏱️Timed outExceeded the execution timeout; no dedicated filter yet

Viewing node execution details

  1. Open the run's node execution
  2. Each node shows its status, duration, inputs, outputs, and error (if any)

Live streaming

A running workflow streams events in real time, including node status changes and LLM text output, so the UI shows progress as it happens.

Filtering history

FilterOptions
StatusAll, completed, failed, running, pending
Date rangeAll time, last 7 days, last 30 days, last 90 days
Run numberExact match

Execution statistics

Summary metrics (per workflow or system-wide):

  • Total runs
  • Success rate
  • Failed runs
  • Average duration

Not implemented / roadmap: a live execution dashboard (running/queued runs, success rate, average execution time, cost) is unavailable; run statistics are shown in the workflow detail's stats view.

Deleting history

  1. Find the run in history
  2. Open the "..." menu
  3. Select "Delete"
  4. Confirm
  5. The run is removed

Deleted runs cannot be recovered. Bulk deletion is not implemented, and there are no automatic retention/cleanup settings.

Webhook Management

Create or regenerate the trigger token

  1. Edit the workflow
  2. Set the trigger type to Webhook
  3. Save — a trigger token and address are generated automatically
  4. Regenerate the token from the Access API page; the old address stops working immediately

Testing a Webhook

Copy the trigger address from the Access API page, send a POST with any HTTP client, include a clou_ API key in the request header, and put the workflow input fields directly in the body. A successful trigger appears in the run history.

Webhook logs

Not implemented / roadmap: there is no separate Webhook request log view. Triggered runs appear in the workflow run history.

Troubleshooting

Workflow execution fails

  1. Open the failed run in Execution history
  2. Check node execution details and the error message
  3. Common errors:
    • Node timeout: increase the timeout or optimize the node
    • Invalid input: validate the input variable format
    • API error: check API credentials and connectivity
    • LLM error: verify model availability and the API key
    • Tool error: check the tool configuration
  4. Trigger the run again after fixing the issue

Webhook does not trigger

  1. Confirm the trigger type is Webhook
  2. Confirm you use the current trigger address shown on the Access API page
  3. Confirm the request header carries a valid clou_ API key
  4. Confirm the workflow is published (unpublished workflows reject Webhook triggers)

Scheduled task does not run

  1. Confirm the workflow is published and the trigger type is Scheduled task
  2. Confirm a valid expression is saved
  3. Ask whoever maintains the deployment to confirm the scheduler is enabled and align the expression the UI saves with the deployment documentation

Execution takes too long

  1. Optimize nodes: lower the LLM max tokens, use a faster model, improve tool calls
  2. Shorten the serial chain: independent nodes on the same level still run one by one, and the canvas has no parallel node; fold repeatable work into an iteration node and shrink its input
  3. Set node timeouts: choose sensible timeouts and handle failures
  4. Monitor performance: review duration statistics in the run history

Workflow will not start

  1. Check whether the workflow is published
  2. Confirm you have execution permission
  3. Make sure all required inputs are provided
  4. Refresh the page and retry

Execution is stuck

  1. Check whether a node is waiting for an external response or an approval
  2. Confirm the external endpoint is reachable
  3. Stop and restart the execution
  4. Contact the administrator

Cannot view history

  1. Refresh the page
  2. Check your permissions
  3. Confirm the workflow has run
  4. Check the date range filter
  5. Contact the administrator

Runs are missing

  1. Check the filters (they may hide results)
  2. Confirm the date range
  3. Check whether the run was deleted

Cannot start a new run

  1. Confirm you have permission to execute the workflow
  2. Confirm the workflow is published
  3. Start a new execution from the workflow page

Best Practices

Workflow design

  • Keep workflows simple and focused
  • Use descriptive node names with action verbs
  • Add error handling
  • Test thoroughly before activating
  • Document the workflow's purpose
  • Use variables for reuse instead of hard-coded values
  • Add logging for debugging
  • Set sensible timeouts

Performance

  • Reduce serial steps: there is no parallel node, and independent nodes on the same level run one by one; merging nodes beats splitting and “waiting for parallelism”
  • Control iteration size: an iteration node truncates input beyond its limit, so filter out unneeded items first
  • Cache repeated operations
  • Optimize LLM prompts
  • Choose suitable models
  • Set sensible timeouts
  • Monitor execution time
  • Optimize tool calls

Inputs and monitoring

Inputs:

  • Provide all required inputs
  • Use the correct data types
  • Test with sample data first

Monitoring:

  • Watch execution progress
  • Check node outputs
  • Stop when behavior looks wrong

Error handling:

  • Read error messages carefully
  • Check input values
  • Review node configuration
  • Retry with corrected inputs

Security

  • Webhook triggers require an API key; see the Workflow API
  • Regenerate the trigger token if it leaks
  • Enable audit logs
  • Monitor unusual activity

Not implemented / roadmap: Webhook IP allowlists and rate limits are currently unavailable.

Leaving with Unsaved Changes

If there are unsaved changes, the editor shows a confirmation dialog before you return to the app list or close the page. Choosing Leave without saving discards the current draft changes.

How is this guide?

On this page