# Run agent without an agent object

> Run a Snowflake Cortex agent inline without a pre-created agent object in Snowflake, and continue multi-turn conversations using a thread ID.

## Description

This activity runs a Snowflake Cortex agent inline, without requiring a pre-created agent object in Snowflake. Use it when you want to define the agent's behavior at run time instead of configuring a persistent agent in Snowflake first, as required by [Interact Agent](https://docs.uipath.com/activities/other/latest/integration-service/uipath-snowflake-cortex-interact-agent).

The activity also supports multi-turn conversations: providing a thread ID and parent message ID continues an existing conversation instead of starting a new one.

## How to use the activity

To use this activity in a Maestro agentic process, follow these steps:

1. Add a service task element to the canvas and open the task's **Properties** panel.
2. In the **Implementation** section, from the **Action** dropdown list, select **Start and wait for external agent**.
3. Select the **Snowflake Cortex** connector.
4. Select an existing connection or create a new one. For more information, see [Snowflake Cortex authentication](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-snowflake-cortex-authentication).
5. From **Activity**, select **Run agent without an agent object**.
6. Configure the fields described in the following table.
7. Connect the start event to the service task, and the service task to an end event node in the canvas.

## Fields

| Field | Description |
| --- | --- |
| **Thread Id** | The identifier of an existing conversation thread to continue. Leave empty to start a new conversation. |
| **Parent message id** | The ID of the message to reply to within the thread. Has no effect unless **Thread Id** is also set. |
| **Prompt** | The initial text or query provided to generate a response. Required. |
| **Tool choice** | The list of specific tool names to use. Takes effect only when **Tool choice type** is set to **Tool**. |
| **Tool choice type** | Determines how tools are selected: **Auto** lets the agent decide, **Required** forces it to use a tool, **Tool** forces it to use the tool names listed in **Tool choice**. Defaults to **Auto**. |
| **Model** | The model to use for orchestration. |
| **Response Instruction** | Instructions for response generation. |
| **Orchestration instruction** | Custom instructions used when the agent is planning. |
| **Orchestration budget (seconds)** | Time budget, in seconds, for orchestration. |
| **Orchestration budget (tokens)** | Token budget for orchestration. |
| **Tools** | The list of tools available to the agent for this run. Each entry is a tool specification object defining the tool's type, name, description, and input schema. |
| **Tool resources** | Configuration resources for the tools, keyed by tool name (for example, execution environment or identifier). |

The agent's output must be assigned to a process variable so it can influence the progress of the Maestro process. For guidance on capturing and using the output, see the [Interact Agent](https://docs.uipath.com/activities/other/latest/integration-service/uipath-snowflake-cortex-interact-agent#how-to-use-the-activity) activity, which follows the same output pattern.
