> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/ai-workbench-qore/console/flows/build-a-flow.md).

# Build a flow

Create a draft flow from a chat prompt, then configure its trigger and tasks.

Flows turn a described automation into connected tasks. Build a draft, review its design, and configure each task before testing it.

{% hint style="info" %}
**Flows are in preview.** The experience may change as the feature develops.
{% endhint %}

## Create a draft

{% stepper %}
{% step %}

#### Describe the automation

In **Flows**, enter what the flow receives, what it should do, and what it returns.
{% endstep %}

{% step %}

#### Send the prompt

Qore creates a draft and opens it in the builder. The chat summarizes the flow's name, tasks, input, output, and trigger.
{% endstep %}

{% step %}

#### Refine the draft

Continue the conversation to request changes, or edit the flow directly. Review **Agent Reasoning** for the design rationale.
{% endstep %}
{% endstepper %}

Ready-to-use templates provide a starting description for common automations. Select one when its scenario matches your goal, then tailor the generated draft.

## Create a blank flow from an agent

In an agent's **Add Skill to Agent** dialog, select the **Flows** tab, then **+ Create Flow**. In **Create New Flow** (*Create a reusable flow as a Skill to extend your AI…*), enter a **Flow Name** and a **Description**, both required, and select **Save**. To set the flow's image, select **Upload** and choose an image up to 2 MB; **Remove** clears it.

The flow opens in the builder with an empty canvas, and the chat reads *Workflow "‹name›" created. How can I help to build your workflow?* It also appears in **My Flows** on the Flows page.

<figure><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-a2bd4e17539704b90986c028c7c2f74cf76c4a24%2Fqore_flows_how-to-create-new-flow-dialog_rounded_shadow.png?alt=media" alt="The Create New Flow dialog: an avatar with Upload and Remove buttons, required Flow Name and Description fields, and Cancel and Save buttons"><figcaption><p>Create New Flow, from an agent.</p></figcaption></figure>

## The builder

The chat is on the left, and the canvas is on the right. Above the canvas: *All changes saved in cloud*, the **Editor** and **Try Out** tabs, **Flow I/O**, and **Publish**. The rail on the left holds the flow canvas, **Variables**, **Version History**, **Execution History**, and help (**?**). Zoom controls sit at the bottom. To rename the flow, select its name at the top of the chat, then **Rename Flow**.

<figure><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-857bb5a4422b26b8386c42201647f02e3640fd3b%2Fqore_flows_how-to-builder-empty_rounded_shadow.png?alt=media" alt="The flow builder: All changes saved in cloud, the Editor and Try Out tabs, Flow I/O and Publish, a rail of icons on the left, Start of Flow with an Add Trigger button in the canvas, and zoom controls at the bottom"><figcaption><p>A new flow in the builder.</p></figcaption></figure>

## Configure the flow

### Choose a trigger

A trigger starts the flow. In a new flow, select **+ Add Trigger** under **Start of Flow**. In a drafted flow, select the trigger in the canvas. Then choose one.

<figure><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-d1d9e47399ccaf0438dd5ca0f9c500bc092df45e%2Fqore_flows_how-to-add-trigger-menu_rounded_shadow.png?alt=media" alt="The Add Trigger menu: A trigger is what starts your workflow, with Start manually, Start through Agent and Start via trigger, each with a description"><figcaption><p>The trigger options.</p></figcaption></figure>

| Trigger                 | Starts the flow                                                                              |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| **Start manually**      | When a user launches it. Use it for testing or simple setups.                                |
| **Start through Agent** | When an AI agent runs the flow.                                                              |
| **Start via trigger**   | When an external event occurs, such as a Slack message. This option is still in development. |

{% hint style="info" %}
**Flow triggers differ from agent triggers.** A flow trigger starts a flow. Configure an agent's own triggers in [Triggers](/ai-workbench-qore/console/agent-builder/build/triggers.md).
{% endhint %}

### Add and configure tasks

Each task performs one job. Select **Select Task**, or the **+** after a task. Search by task name, then select a task to configure it.

| Task              | Purpose                                                    |
| ----------------- | ---------------------------------------------------------- |
| **Agent**         | Runs an agent as a flow step.                              |
| **Prompt**        | Sends a prompt to an AI model.                             |
| **Dataset**       | Reads from or writes to a dataset.                         |
| **Pass Through**  | Passes data to the next task.                              |
| **Sticky Note**   | Documents the flow in the canvas.                          |
| **User Approval** | Waits for a user's approval before continuing. In preview. |
| **Knowledge**     | Pushes data to a knowledge store. In preview.              |

Required settings have an asterisk. A red warning icon means a required setting is missing. Complete it before publishing.

### Task settings

{% tabs %}
{% tab title="Prompt" %}

| Setting                     | Purpose                                                                         |
| --------------------------- | ------------------------------------------------------------------------------- |
| **Model**                   | Selects the model that runs the prompt.                                         |
| **Instructions for the AI** | Required. Defines the model's task.                                             |
| **Query**                   | Required. Supplies the message or data.                                         |
| **Tools**                   | Makes tools, such as `web_search`, available to the model.                      |
| **Document ID**             | Supplies one or more document IDs, or a flow input such as `$input.documentId`. |
| {% endtab %}                |                                                                                 |

{% tab title="Agent" %}

| Setting              | Purpose                                      |
| -------------------- | -------------------------------------------- |
| **Agent**            | Required. Selects the agent to run.          |
| **Use Context**      | Passes the flow context. Enabled by default. |
| **Use Chat History** | Passes chat history. Disabled by default.    |
| **Document ID**      | Supplies one or more document IDs.           |
| {% endtab %}         |                                              |

{% tab title="Knowledge and approval" %}

| Task              | Settings                                               |
| ----------------- | ------------------------------------------------------ |
| **Knowledge**     | Select a knowledge store and the document IDs to push. |
| **User Approval** | Enter the required message shown to the approver.      |
| **Sticky Note**   | Add text that documents the flow.                      |
| **Pass Through**  | Use global and output variables to pass data onward.   |
| {% endtab %}      |                                                        |
| {% endtabs %}     |                                                        |

Open **Advance** to assign task inputs from global variables and map output fields to output variables.

***

{% columns %}
{% column width="83.33333333333334%" %}

<p align="right"><em>Maintained by</em> <mark style="color:green;">Abhishek Paul</mark><br><code>AI-assisted, human-approved</code></p>
{% endcolumn %}

{% column width="16.666666666666664%" %}

<div align="left"><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-d034645b4f8f8ee661985f5306b60ded3289653c%2Fmaintainer-abhishek-paul.png?alt=media" alt="" width="60"></div>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/ai-workbench-qore/console/flows/build-a-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
