# Getting started with conversational agents

> Build your first conversational agent in Agents, creating a simple HR assistant that answers policy questions using document search.

This guide walks you through building your first conversational agent: a simple HR assistant that answers questions about company policies using document search.

## Prerequisites

Before you begin, ensure you have:

* The [prerequisites for building agents](agents-prerequisites.md) in place, including personal automations and personal workspaces.
* An LLM configured for Agents in the AI Trust Layer. For details, refer to [Configuring LLMs](https://docs.uipath.com/automation-suite/automation-suite/2.2610/admin-guide/configuring-llms).
* Access to Studio Web
* An Orchestrator folder with a serverless robot machine template assigned. For all folder requirements, refer to [Orchestrator folder requirements](conversational-agents-deployment.md#orchestrator-folder-requirements).
* A [Context Grounding index](https://docs.uipath.com/automation-suite/automation-suite/2.2610/admin-guide/working-with-context-grounding) with your knowledge base documents

:::tip
If you don't have a Context Grounding index yet, you can still complete this tutorial. Your agent will respond based on its general knowledge.
:::

## Step 1: Create the agent

1. Go to Studio Web.
2. Select **Create New**, then select **Agent**.
3. Select **Conversational**.

![Create new conversational agent dialog](https://dev-assets.cms.uipath.com/assets/images/agents/create-agent-64fda7ee.webp)

1. Describe your agent to Autopilot to generate a starter configuration. For example: "An HR assistant that helps employees find information about company policies, benefits, and onboarding procedures." If you prefer not to use Autopilot, select **Start fresh**.

## Step 2: Configure the system prompt

The system prompt defines your agent's persona and behavior. A well-crafted prompt helps the agent respond consistently and appropriately.

1. In the **System prompt** section, define your agent's identity and guidelines. For example:

```
You are a friendly HR assistant for Contoso Corporation. Your role is to help employees find information about company policies, benefits, and HR procedures.

Guidelines:
- Always be professional and helpful
- If you don't know the answer, say so
- When citing policies, reference the specific document name
- Keep responses concise but complete
```

2. Select the **Model** for your agent. Different models offer varying capabilities and performance characteristics.

![System prompt configuration](https://dev-assets.cms.uipath.com/assets/images/agents/system-prompt-43bc3521.webp)

## Step 3: Add tools

Tools give your agent the ability to take actions and retrieve information. For this HR assistant, add the Context Grounding index you previously configured as a Context tool.

1. Select **Add context**.
2. Select your HR documents index.
3. Provide a description. For example:

```
Provides information about company policies, benefits, and HR procedures.
```

4. (Optional) Add additional tools such as:
   * **Analyze files**: Allow users to upload documents for analysis.
   * **Integration Service connectors**: Connect to external systems like calendar or email.

![Tool configuration](https://dev-assets.cms.uipath.com/assets/images/agents/add-tools-509658bd.webp)

For detailed tool configuration options, refer to the [Design](conversational-agents-design.md) section.

## Step 4: Test in Debug chat

Before publishing, test your agent to ensure it behaves as expected.

1. Select **Debug** then **Save & Debug** to open the chat interface.
2. Send a test message, such as: "How many holidays do we have in the US?".
3. Review the agent's response and check citations (if using Context Grounding).
4. View the execution trace in the **History** tab to see:
   * LLM calls and responses
   * Tool calls with arguments and outputs

![Debug chat interface](https://dev-assets.cms.uipath.com/assets/images/agents/debug-chat-87b201f3.webp)

1. If the response is good, select **Add to evaluation set** to save this conversation for future testing.

## Step 5: Publish and deploy

Once you're satisfied with your agent's behavior, publish it to make it available to users.
1. Select **Stop** in the top toolbar to stop debug execution.
2. Rename your Solution and Agent in the **Explorer** to "HR Assistant".
3. Select **Publish** in the top toolbar.
4. Choose "Orchestrator Tenant" as the Location.
5. Select **Publish**.

![Publish dialog](https://dev-assets.cms.uipath.com/assets/images/agents/publish-de3f8224.webp)

The publish process will begin and you will receive a message once the package is ready to be deployed.

1. Select **Check package** in the message.
2. Select **Deploy package** (rocket icon on the far right).
3. Choose the target Orchestrator folder that you prepared in the prerequisites.
4. Select **Activate immediately**.
5. Select **Deploy**.

Your agent is now published and deployed and available through Instance Management.

## Step 6: Access your agent

After publishing, you can interact with your agent in several ways:

1. **Instance Management**: Go to **Agents > Conversational** in Automation Suite and select **Chat** on your conversational agent.
2. **Autopilot for Everyone**: Access your agent from the Autopilot picker dropdown.

![Instance Management](https://dev-assets.cms.uipath.com/assets/images/agents/instance-management-ce1c3162.webp)

You've built and deployed your first conversational agent. To learn more:

* [Design](conversational-agents-design.md): Configure advanced options like escalations and model selection
* [Evaluation](conversational-agents-evaluation.md): Create comprehensive test suites for your agent
* [Observability](conversational-agents-observability.md): Monitor performance and collect user feedback
* [Licensing](conversational-agents-licensing.md): Understand consumption and pricing for your deployment
