# Getting started with conversational agents

> This guide walks you through building your first conversational agent: a simple HR assistant that answers questions about company policies 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:

* Access to [Studio Web](https://studio.uipath.com/)
* An Orchestrator folder with:
  * An unattended robot assigned
* A [Context Grounding index](https://docs.uipath.com/automation-cloud/automation-cloud/latest/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.uipath.com](https://studio.uipath.com/).
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](https://docs.uipath.com/agents/automation-cloud/latest/user-guide/conversational-agents-design) 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 (must have unattended robot account assigned).
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 > Deployed agents** in Automation Cloud and select **Chat** on your Conversational agent.
2. **Autopilot for Everyone**: Access your agent from the Autopilot picker dropdown.
3. **Teams or Slack**: If configured, interact with your agent through the Autopilot plug-in.

![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](https://docs.uipath.com/agents/automation-cloud/latest/user-guide/conversational-agents-design): Configure advanced options like escalations, agent memory, and model selection
* [Evaluation](https://docs.uipath.com/agents/automation-cloud/latest/user-guide/conversational-agents-evaluation): Create comprehensive test suites for your agent
* [Observability](https://docs.uipath.com/agents/automation-cloud/latest/user-guide/conversational-agents-observability): Monitor performance and collect user feedback
* [Licensing](https://docs.uipath.com/agents/automation-cloud/latest/user-guide/conversational-agents-licensing): Understand consumption and pricing for your deployment
