Skip to main content

Conversation flow subflows

Make complex agents easier to build, reuse, and maintain by packaging parts of your conversation into subflows. A subflow is a mini flow (a group of nodes) that you can reuse across agents and flows.
Subflows were previously called Components. The feature is the same; only the name changed.

Why use subflows?

  • Reuse: Build once, drop into many agents and flows.
  • Consistency: Keep behavior uniform across use cases (e.g., identity check).
  • Clean canvas: Hide detailed logic inside a focused subflow.
  • Faster iteration: Update a shared subflow to improve every agent that uses it.

Where to find it

Conversation flow builder left sidebar with the Subflows tab open, showing the Library Subflows and Agent Subflows sections.
In the dashboard, open your agent’s builder:
  • Left sidebar → Subflows tab
  • Two sections:
    • Library Subflows: Account-level, shared across agents.
    • Agent Subflows: Local to the current agent.
Switching between flows: Use the flow selector at the top of the builder (it shows Main flow by default) to move between your main agent, any open subflows, and transfer agents. Each one opens in its own editor tab, and you can return to Main flow at any time.

Create a subflow

You can create either a library (shared) subflow or an agent-level (local) one. Both open in a dedicated editor tab.
  1. In the Subflows tab, click the + button next to Library Subflows or Agent Subflows.
  2. You’ll start with a “Begin” node, a basic conversation node, and an “Exit Subflow” end node.
  3. Add nodes and connect edges to form your subflow.
  4. Set a start node by connecting the Begin tag to the first node.
  5. Link the “Exit Subflow” node correctly so you won’t get stuck inside the subflow.
  6. Switch back to the main agent using the flow selector (labeled Main flow) at the top of the builder.
  7. Rename the subflow by clicking the ”…” to the right of its name.
Notes:
  • Subflows cannot contain other subflows; you add regular nodes inside a subflow.
  • Available node types match your agent’s channel (voice vs chat).
Subflow editor tab with a Begin node, a conversation node, and an Exit Subflow end node connected on the canvas.

Add a subflow to your flow

  • From the Subflows tab, click a subflow. A single subflow node appears on your canvas.
  • Connect into the subflow: link any node to the subflow node.
  • Connect out of the subflow: select the subflow node and connect its outgoing edge to where the conversation should continue.
  • To edit what happens inside, open the subflow’s editor tab and modify its internal nodes.
  • You can rename the subflow node, which is also reflected in the subflow.
Tip: End nodes inside the subflow hand control back to the main flow. Back on the main canvas, make sure the subflow node’s outgoing edge points to the next step.
Main conversation flow canvas with a single subflow node whose outgoing edge connects to the next node.

Shared vs local subflows

Shared (Library Subflows):
  • Account-level. Reusable across multiple agents.
  • Edits sync to every agent that uses it — great for universal steps.
Local (Agent Subflows):
  • Live only in the current agent.
  • Edits affect this agent only.
Convert between shared & local:
  • Open the subflow node’s Subflow Settings panel. Under Subflow Access, choose Agent Only Subflow (local) or Shared Library Subflow (shared).
  • Turning off Sync Updates converts the reference in your agent to a local copy that stops receiving updates. If you turn syncing on again later, a new account-level subflow is created.
Subflow Settings panel with the Subflow Access radio group showing Agent Only Subflow and Shared Library Subflow options.
Deletion behavior:
  • Deleting a shared subflow from the library downgrades linked instances in agents to local copies and stops sync updates (your agents keep working).
Publish agent: When you publish an agent, we protect production behavior and keep draft work flexible:
  • The published version snapshots shared subflows as local copies.
    • This prevents future library updates from changing already-published calls.
    • The published artifact is stable and won’t auto-update from the library.
  • Your latest editable draft stays linked to the shared subflow.
    • You continue to benefit from library updates while iterating.
    • When you’re ready, publish again to roll out the latest changes.
Recommended workflow:
  • Build using Library Subflows → test → publish → keep iterating in draft.
  • Publish again whenever you want to promote the latest shared/local changes to production.

Testing

  • To test a subflow under the Test Subflow panel, add the subflow to the main conversation flow first so it initializes properly.
  • The global prompt of the main conversation flow applies to all subflow nodes implicitly.
  • To test a subflow alone, make it a shared subflow and create a new empty agent with only one subflow node.

Best practices

  • Keep subflows focused: One clear job (e.g., “Collect Shipping Address”).
  • Name clearly: Use action + outcome (e.g., “Verify Identity”).
  • Design clean entry/exit: Always set a start node; include an end node to exit cleanly.
  • Reuse variables: Use dynamic variables to pass captured data back to the main flow.
  • Test in context: Open the Test panel to simulate end-to-end behavior after inserting the subflow.

FAQ

  • How do I update a shared subflow used by many agents?
    • Under any agent, navigate to the subflow’s edit page. When you edit it, changes apply everywhere it’s used.
  • Can I stop changes from affecting an agent?
    • Yes. In that agent, turn off Sync Updates to convert its reference to a local copy.
  • What happens if I delete a library subflow?
    • Agents keep a local copy; they stop syncing with the deleted library item.
  • Can I move a local subflow into the library?
    • Yes. In Subflow Access, switch it to Shared Library Subflow to create a shared version and update references.
  • Can subflows include tools/functions?
    • Yes. Subflows can include function nodes and use your configured tools. Tools behave the same as in the main flow.
    • The tools need to be defined within the subflow and won’t be visible outside at the agent level.
  • What if I did not link the Begin node in a subflow?
    • It transitions to the next node based on the subflow node edges.
  • What if I did not link the Exit Subflow node properly?
    • It stays stuck inside the subflow and cannot transition out.