Composing workflows
Reuse workflows as steps, give agents tools on the canvas, and work with validation, YAML, and deploy.
Beyond single nodes, the canvas lets you build bigger behavior by reusing workflows, giving agents tools, and combining agents and workflows freely. This page covers those patterns and the editor mechanics that support them.
Sub-workflows
The Workflow node runs another workflow as a single step. Pick a target workflow from the project, bind its inputs, and its output flows on like any other node. This lets you factor a complex pipeline into smaller, reusable workflows and assemble them — the same way you'd break a program into functions. A workflow can't call itself.
Which version a sub-workflow runs
A sub-workflow follows the workflow that calls it:
- While you're building, a draft run of the parent runs the sub-workflow's draft — so a change to either shows up immediately. (A workflow that comes with a solution is the exception: it always runs its deployed version.)
- When you deploy the parent, every workflow and agent it uses is frozen at its current draft and pinned to the parent's version. The deployed parent keeps running those exact versions until you deploy it again — later edits to a sub-workflow never change what's live underneath it.
A deployment's Overview shows each pinned sub-workflow, flagged when a newer version is available. See Versioning & deployment.
Tools on the canvas
Most nodes produce data for the next step. Attach a node to an agent's Tools handle instead, and it becomes a tool the agent can call while it runs — the same model as giving a standalone agent tools, expressed on the canvas.
Place the node
Add a node that can be a tool: an integration (Postgres, S3, or a custom one), a component (Document Splitter, Document Parser, or Dataset), a Workflow node, or an Agent node that references a prebuilt agent.
Attach it to the agent
Drag from the node's Output onto the Agent node's Tools handle. (Or click the node's wrench first — it collapses to a single Tool output — and wire that.)
Choose its actions
For an integration or component with more than one action, click Selected tools on its card to open Tool Capabilities. Each enabled action becomes one tool the agent can call. Read actions start enabled; actions that change something start off. Use the shields to require approval per action, or Require approval for every action for the whole tool. A workflow or agent attached as a tool has no actions to choose; the shield in its card's header gates every call to it.
Once attached, the node stops being a step: it belongs to the agent, its inputs disappear from the card (the agent supplies them when it calls the tool), and the agent's card shows how many tools it has. Delete the tool edge — or click the wrench again — to detach it. Deleting an agent deletes its tools with it.
This is what lets agents and workflows combine: an agent step can call integrations, components, and sub-workflows as tools, and a workflow can orchestrate several agents.
Validation
The editor checks your workflow continuously. The Validation button in the toolbar counts what's wrong; open it for the list — errors first, then warnings, each naming its node. Click an entry to jump to that node. Each node also shows its own issues just above its card.
- Errors block deployment — for example, a required input with nothing bound, a node missing its connection or action, or a component setting left empty.
- Warnings are worth a look, but don't block deployment — for example, a node that doesn't reach the Output, or an edge nothing reads.
The list says All checks passed. when there's nothing left to fix.
The YAML view
Every workflow has an underlying definition, and the toolbar's YAML view shows it as last saved. You don't have to edit YAML — the canvas is the way you build — but the view is handy for reviewing the whole definition at a glance, and Copy and Download let you keep it in source control or recreate it with the CLI. Agents' model connections are annotated with the model they run.
Duplicating
Duplicate in the toolbar copies the workflow's saved draft into a new workflow and opens it. It's also the way to iterate on a solution's workflow, which is read-only on the canvas.
Deploy when it's ready
When the workflow is valid, Deploy freezes the draft into a numbered version and publishes it live, ready to run on a schedule, from Compass Chat, or through the API.