> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/getting-started/installation.md). Agents can also search and read this documentation through its [MCP server](https://docs.umbraco.com/~gitbook/mcp).

# Installation

Install Umbraco Commerce AI and set up an agent that answers questions about your store from the Copilot section.

This article walks you through installing Umbraco Commerce AI and setting up a read-only agent in the backoffice. At the end, you can ask questions about your store from the **Copilot** section.

## Prerequisites

* Umbraco CMS 17 with Umbraco Commerce installed and licensed. See [Requirements](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/readme.md#requirements) for the minimum versions.
* An API key from an AI provider supported by Umbraco AI, for example Anthropic or OpenAI.

## Step 1: Install the packages

Install Umbraco Commerce AI together with Umbraco AI, the Copilot Workspace, and an AI provider. The examples use the Anthropic provider.

Give every package a version from your Umbraco major. Without a version, `dotnet add package` can pick a version for another Umbraco major, and the restore fails.

{% code title="Terminal" %}

```bash
dotnet add package Umbraco.Commerce.AI --version 17.0.0-beta1
dotnet add package Umbraco.AI --version 17.8.2
dotnet add package Umbraco.AI.Agent.Copilot.Workspace --version 17.3.3
dotnet add package Umbraco.AI.Anthropic --version 17.1.5
```

{% endcode %}

Any later version on the same major works too. `Umbraco.AI.Agent.Copilot.Workspace` uses its own version numbers.

Build and start your site.

## Step 2: Give your user group the sections it needs

1. Go to the **Users** section > **User Groups**.
2. Open the user group of the people who use the Copilot.
3. Under **Sections**, make sure the group has **Commerce** and **Copilot**. Add **AI** for the people who set up connections, profiles, and agents.
4. Click **Save**.

The **Administrators** group gets the **Copilot** section when `Umbraco.AI.Agent.Copilot.Workspace` is installed. Other groups need it added. If a new section doesn't appear, log out and back in.

![The Administrators user group, with the Commerce, Copilot, and AI sections assigned](https://1628770284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1uB1EIR48Mf1SP8Y1TEf%2Fuploads%2Fgit-blob-49d8cd14496a2db86aeabf1f96c6c55dc7156008%2Fuser-group-sections.png?alt=media)

## Step 3: Give the user group access to your stores

The Copilot can only read stores the signed-in user has access to. Without store access, the **Commerce** section shows no store, and the Copilot cannot read it either.

1. Go to the **Settings** section and open your store under **Stores**.
2. Open the **Permissions** tab.
3. Under **User Roles**, enable the user group from Step 2. You can also give access to individual people under **Users**.
4. Click **Save**.

Repeat for each store the user group needs.

![A store's Permissions tab, with the Administrators user role enabled](https://1628770284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1uB1EIR48Mf1SP8Y1TEf%2Fuploads%2Fgit-blob-a263f4de7a7c1b2d9f7a5da4aae9fa90b71913aa%2Fstore-permissions.png?alt=media)

## Step 4: Create a connection

A connection holds the credentials for your AI provider. See [Connections](https://docs.umbraco.com/ai-in-umbraco/concepts/connections) for more information.

1. Go to the **AI** section > **Connections**.
2. Click **Create** and choose your provider.
3. Enter a name and the provider's API key.
4. Click **Save**.

## Step 5: Create a profile

A profile picks the model the agent uses. See [Profiles](https://docs.umbraco.com/ai-in-umbraco/concepts/profiles) for more information.

1. Go to the **AI** section > **Profiles**.
2. Click **Create** and choose **Chat**.
3. Enter a name, then select the **Connection** from Step 4 and a **Model**.
4. Click **Save**.
5. Go to **AI** > **Settings** and select the new profile as the **Default Chat Profile**.
6. Click **Save**.

## Step 6: Create an agent

1. Go to the **AI** section > **Agents**, under **Add-ons**.
2. Click **Create**.
3. Enter a name, for example `Commerce Assistant`.
4. Enter a **Description**.
5. Under **AI Profile**, select the profile from Step 5. You can also leave it empty to use the default chat profile.
6. Enter the **Instructions**. Instructions are required. They define the agent's role and tone, and they shape every answer. A minimal starting point:

{% code title="Instructions" overflow="wrap" %}

```
You are a read-only assistant for Umbraco Commerce. Use the Commerce tools to answer questions about the store, never invent numbers, and always say which store and period an answer is about.
```

{% endcode %}

For fuller Instructions, see [Example: A Commerce Assistant Agent](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/using-umbraco-commerce-ai/example-commerce-assistant-agent.md).

7. Click **Save**.

![The agent's Settings tab with Description, AI Profile, Contexts, and Instructions](https://1628770284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1uB1EIR48Mf1SP8Y1TEf%2Fuploads%2Fgit-blob-de4eac24eb4d78eabac0fd190dcef79d9ae1f6f6%2Fagent-settings.png?alt=media)

## Step 7: Give the agent access to the Commerce tools

An agent has no tools until you allow a tool scope. Without this step, the agent can chat, but it cannot read your store.

1. Open the agent and go to the **Governance** tab.
2. Under **Allowed Tool Scopes**, find the **Commerce** group and enable **Commerce (Read)**.
3. Leave every write, save, and publish scope off. The agent is meant to be read-only.
4. Click **Save**.

![The Governance tab, with the Commerce (Read) tool scope enabled and its tools](https://1628770284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1uB1EIR48Mf1SP8Y1TEf%2Fuploads%2Fgit-blob-8a7b7a0fcc1d8a5ddfdca7e94e52e4d0b64ceaf6%2Fagent-governance-tool-scopes.png?alt=media)

## Step 8: Make the agent available in the Copilot section

An agent isn't offered in the **Copilot** section until you add the **Copilot Workspace** surface.

1. Open the agent and go to the **Availability** tab.
2. Under **Surfaces**, click **Add** and select **Copilot Workspace**.
3. If you also use the Copilot sidebar from `Umbraco.AI.Agent.Copilot`, you can select **Copilot** too. One agent can have both surfaces.
4. Click **Select**, then click **Save**.

![The Availability tab, with the Copilot and Copilot Workspace surfaces added](https://1628770284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1uB1EIR48Mf1SP8Y1TEf%2Fuploads%2Fgit-blob-bc72826f1fda2badb8665481615282b390956fc9%2Fagent-availability-surfaces.png?alt=media)

## Step 9: Ask your first question

1. Go to the **Copilot** section.
2. Click **New chat** and select your agent in the message box.
3. Ask a question, for example "How's the shop doing this week?".

You don't need a Commerce page open. Ask about a store by name, or let the Copilot find your stores. See [Asking Commerce Questions](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/using-umbraco-commerce-ai/asking-commerce-questions.md) for more example questions.


---

# 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.umbraco.com/umbraco-commerce-ai/17.latest/getting-started/installation.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.
