# Flows

Have a huge agent and want to organize efficiently? Use sub-flows to categorize and organize the individual function flows of your agent to enable a smoother building experience.  &#x20;

The main flow of your agent will be displayed on the canvas and can be found under the original event under events whilst the additional flows you create can be found under the flows tab in the toolbar

### Creating new flows&#x20;

Creating a new flow is as simple as going to the Flows option in the ToolBar and adding a new flow. Once you create a new flow, proceed as you would with creating a regular flow.

Select the relevant nodes from the "**Nodes**" section and start building. Once done, also from the nodes section, select the "**Exit flow**" node and connect it to the end of your newly created flow.&#x20;

<figure><img src="/files/IeWZwPZxpMrDepxzjozJ" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*To rename, delete or duplicate a sub-flow, simply right-click on the sub-flow in the toolbar and select your preferred option*
{% endhint %}

### Using Flows within your agent

Once you've created your required sub-flows, here's how you can connect them with the rest of your agent.

* Within the flow where you want to add your newly created sub-flow, go to the toolbar and under the Flow Control Nodes select the Flow Node. Drag and drop this onto your canvas and select the sub-flow you want the agent to access.

<figure><img src="/files/yWvGpKm65oL6QAi90K8l" alt=""><figcaption></figcaption></figure>

* Once selected connect the entry of this node to the exit point of the last preferred node in your main flow. This ensures that you have full control over when each flow is triggered.

<figure><img src="/files/n9nZ93l0vLUzHZ9iGnBI" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*The main flow will always be the flow with the START node. To allow users to interact with your new flows, make sure to connect them to the main flow.*&#x20;
{% endhint %}

* In the Creating new flows section, you added an Exit Flow node at the end of your sub-flow. The exit point of the Flow node is directly connected to the Exit Flow node in your sub-flow. This means that when that sub-flow ends the agent will return to the Flow node and follow the flow that is connected to the exit point of the Flow node.

{% hint style="info" %}
*You can add multiple Flow nodes in a flow however only one Exit flow can be added per flow.*
{% endhint %}

### Where are flows helpful?

For example, your virtual assistant handles three use cases - order tracking, reporting a damaged package as well as answering FAQs. The three separate flows can be unified and displayed as one node in the canvas. When you click on "Enter flow" you will be moved to this flow and its nodes immediately.&#x20;

![](/files/fUhG480OxnDU6asaMG6p)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://studio.docs.ai.vonage.com/voice/nodes/flow-control/flows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
