Overview
Workflows are executable multi-step graphs attached to an agent. Each workflow has nodes (actions, branches, joins, LLM steps, approvals, and outputs) connected into a path the Apigene engine runs from start to finish. Use workflows when you need a deterministic sequence — with branching, parallel joins, human approval, and a clear final result — rather than a free-form chat turn.Where to find them
- Open Agents
- Select an agent
- Open the Workflows tab
View and edit the graph
Open a workflow to see the graph:- Nodes are color-coded by type (action, condition, join, LLM, approve, output, and more)
- Click a node to inspect parameters and, after a traced run, the resolved step input and output
- Pan, zoom, and search steps. Toggle the mini map on or off (your preference is remembered)
- Open Help on the graph or a run for node types, expressions, and limits
- Add steps from the palette: Action, Condition, Approval, Set values, Result, and AI step
- Drag from a handle to connect steps. Backspace or Delete removes the selected step or link
- Edit the workflow name and description in the header, and inspect or update the selected node in the side panel
- Click Save to compile and store the draft
The visual palette covers linear steps plus if / approve branches. Map, switch, and join nodes created from Copilot or MCP still appear on the graph and can be inspected; rewiring those loop or case handles is done from chat or MCP.
Run a workflow
- Open the workflow (or use Run from the list)
- Provide runtime inputs as JSON (merged over any stored defaults)
- Optionally enable:
- Include step data — keep per-step traces (required for Simulate)
- Dry run — walk the graph without live API / MCP / LLM side effects (approvals auto-pass)
- Click Run
Run statuses
Simulate on the graph
After a successful run with step data:- Click Simulate (or Simulate on graph from the run dialog)
- Watch steps light up from Start through the run path to End
- Pause to inspect any node’s details in the side panel
- Resume or Reset as needed
Human approval (HITL)
Workflows can include an approve node. When the run reaches it, status becomeswaiting_human and Copilot shows an approval card:
- Approve or Reject
- Optionally edit preview fields before approving
- The run continues via resume (same user who started the run)
resume_workflow with the run_id and decision.
Create and update workflows
Ask Copilot (with the agent selected) or Design Agent Extend to create a workflow, or call MCPcreate_workflow from Cursor, Claude, or other clients connected to the design MCP URL. The id is derived from the name (for example Account update → account-update). Open the new graph on the agent’s Workflows tab, click Edit, add steps, then Save.
MCP clients can also create or update workflows when connected to the design MCP URL (mutations are design-only):
https://app.apigene.ai/agent/{agent_name}/mcp (live).
MCP tools (Agent mode)
See MCP Gateway Tools for parameter details.
Example: dry run with traces
Node types
Commonapigene.* node types:
Workflows should end in an output node so runners get a clear final result.
Map (loop over items)
apigene.map follows an n8n-style Loop Over Items pattern:
- Loop (
main[0]) — runs once per item; use$jsonfor the current item and$indexfor the 0-based index - Done (
main[1]) — runs after all items succeed;$jsonis the collected array (also available as$node.<mapId>.json.items) - If any iteration fails, the map fails and done does not run
Expressions
Workflow expressions use={{ ... }} with:
- Arithmetic and compares (
+ - * /,== != > >= < <=) - Logical operators (
&&,||) and nullish coalescing (??) - Optional paths (
?.,?[) - Helpers such as
find(arr, field, matchValue[, returnField])andfilter_by(arr, field, value)for nested lookups (for example Gmail headers)
={{ $json.items?.length ?? 0 }}
Tips for demos and production
- Prefer Dry run + Include step data when rehearsing
- Use Simulate to walk the path on the graph after the run
- Keep HITL steps for irreversible actions
- Store defaults in workflow
inputs; pass overrides at run time
Related
- Workflow History — org-wide run log, share, and simulation replay
- Agents — workflows live on an agent
- Tasks — scheduled prompts (not graphs)
- Skills — procedural guidance for agents
- MCP Gateway Tools — full tool reference
- MCP vs Agent Modes — workflows require Agent mode
