> For the complete documentation index, see [llms.txt](https://docs.mydbsync.com/cloud-workflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydbsync.com/cloud-workflow/ai/ai-agent.md).

# AI Agent

The **AI Agent** action lets you apply Large Language Model (LLM) driven actions on incoming data streams. You can provide instructions or prompts, optionally use variables from the **fx** panel, preview the output, refine prompts, and save the final instruction set to execute at runtime.

### Configure and run the AI Agent action

To configure and run the **AI Agent** action, follow these steps:

{% stepper %}
{% step %}
On the **Flow** tab, drag the **AI Agent** action from the action palette and drop it onto the **Flow** panel so that it becomes a sub-action of the flow.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Fjh7tsLypsvOdz2FTraXr%2Fimage.png?alt=media&amp;token=c29906a5-9474-4143-b987-0f64983b3c62" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Click **Configure**.
{% endstep %}

{% step %}
Optional: Enter a custom name for this step, such as `Get SF lead summary`.
{% endstep %}

{% step %}
In the **LLM** list, select a connected LLM app or connector.
{% endstep %}

{% step %}
In the **Model** list, select an available model.
{% endstep %}

{% step %}
In the **Batch Size** list, select a value: **1**, **10**, **50**, **100**, **200**, or **500.**
{% endstep %}

{% step %}
Click **Configure** to open the prompt setup and preview window.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FrWOOsxcBX4Wyw4o83Tm2%2FGemini_Generated_Image_i66578i66578i665.png?alt=media&amp;token=9aa316f1-8c67-4e0d-b74b-80a8044519f5" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
If a prompt isn't configured, this default screen appears. Enter a prompt and click **Submit** ![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FVK842IM7qK8oyzTslxi5%2Fimage.png?alt=media\&token=b4649468-1e1c-48bf-82f3-0a1494566a5e) to process it and view the preview.&#x20;

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2F9SEwBon7eO7LXQOeC3Zn%2FGemini_Generated_Image_l2nd4ml2nd4ml2nd.png?alt=media&amp;token=2f7c1294-ea39-4cf4-99e7-e944a7d681b5" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
In the **User Prompt** section, you can enter:

* Plain text instructions
* Multi-line prompts
* Data variables inserted via **fx** panel (for example, `{{name}}` or `{{date}}`)

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FgWWMkQONoXBZtLVFaNbz%2FGemini_Generated_Image_1z7h4x1z7h4x1z7h.png?alt=media&amp;token=2cd2e1c8-8949-4e08-a8cf-e8e7b9fcd167" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Optional: To configure models and tools to your agent, select from the following available options:

* In the **LLM Model** list, you can view the LLM app that you selected on the previous page. You can also select a different LLM connector from the list.<br>

  <div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2F3ZjXSc7K5fCCLfelaiRT%2FGemini_Generated_Image_1ajj0a1ajj0a1ajj.png?alt=media&amp;token=2830a0cb-aac1-4612-81b4-136d6d7f0c62" alt="" width="375"><figcaption></figcaption></figure></div>
* **MCP Server:** Select an MCP server from the list, or click **Add New MCP Server** to connect a new one.<br>

  <div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2F2XegXSnEdTaI1jdmL8qi%2FGemini_Generated_Image_qqec1xqqec1xqqec.png?alt=media&amp;token=ae2bc77a-0935-467f-beea-7e598e605f50" alt=""><figcaption></figcaption></figure></div>
* **Vector Database:** Select a connected vector database, and then select a vector store or table from the **Collection** list.<br>

  <div align="left" data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FVfi535rC57ZeBh1CoS42%2FGemini_Generated_Image_mm55fimm55fimm55.png?alt=media&amp;token=3c3756a2-f477-4bec-b254-1093c3f9a157" alt=""><figcaption></figcaption></figure></div>
* **Web Search:** Configure parameters to enable web search. This feature lets you scope and localize web searches to improve relevance, compliance, and intent-matching by constraining search domains and applying geographic and contextual filters.<br>

  <div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FlBpJAkQxK9VvhD21Ofj4%2FGemini_Generated_Image_sx21h2sx21h2sx21.png?alt=media&amp;token=62150d61-71d4-47ca-a294-396440ae9e66" alt=""><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}
Optional: To insert variables into your prompt, expand the **fx** panel to view workflow variables and the structure of the incoming data stream. Drag a variable and drop it into the instruction box. Variables appear in curly braces (for example, `{{name}}`).

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FYzN7JcvKVJhoiTLL0VlV%2Fimage.png?alt=media&amp;token=3f79b9fa-7b17-478d-8e58-a0621a653bee" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Click **Preview** to process the prompt and generate a preview. The **Preview Output** panel displays the generated output and refreshes automatically whenever you change the instructions.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FA8bkTs4i6OTKg3flsxvL%2Fimage.png?alt=media&amp;token=5e30a6f2-f12a-4cfa-8fa7-2dc7c5144aa0" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Click **Save & Close**.
{% endstep %}

{% step %}
Click **Run** <img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FDFLX5psGhJzusq4Mnti0%2Fimage.png?alt=media&amp;token=20e0ff67-f8cc-4613-930e-4e12247bc5ab" alt="" data-size="line"> to initiate the integration. The console appears at the bottom of the screen, displaying logs and operations. When the process completes successfully, the console status updates to **Process Completed** and displays the **Data In** and **Data Out** details.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FAhiTQNJD3dNCMVPPasUW%2FGemini_Generated_Image_m4dts1m4dts1m4dt.png?alt=media&amp;token=a11a24bd-c691-42ba-ada7-ae2e9bae0b09" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}
