---
title: Optimizely Agent Platform
slug: commerce-connect-15/docs/optimizely-agent-platform
docTags: 
createdAt: 2026-07-30T20:34:41.000Z
---

Optimizely Agent Platform tools bring AI-powered campaign and promotion management to Optimizely Commerce Connect websites. Enable the tools to let business users create, update, and analyze campaigns and promotions through Mark.

## Prerequisites

- .NET 10.0 or later.
- `EPiServer.Commerce.Core` 15.x.
- `Optimizely.Opal.Tools` 0.4.0 or later.
- Opti ID.
- `Optimizely.Commerce.Graph` (required for tools that query data).

## Install

Install the NuGet package from GitHub packages:

```bash
dotnet add package Optimizely.Commerce.Opal.Tools
```

## Register services

Add Commerce Connect Agent Platform tools to your service collection in `Startup.cs` or `Program.cs`.

```csharp
public void ConfigureServices(IServiceCollection services)
{
    // Add EPiServer Commerce services first
    services.AddCommerce();

    // Add Commerce Opal Tools
    services.AddCommerceOpalTools();
}
```

## Configure endpoints

Choose one of the following options to expose the tool endpoints.

### Option A – UseCommerceOpalTools (recommended)

```csharp
public void Configure(IApplicationBuilder app)
{
    app.UseCommerceOpalTools(
        basePath: "",
        includeExperimentalTools: false
    );
}
```

### Option B – MapCommerceOpalTools (minimal APIs)

```csharp
var app = builder.Build();

app.MapCommerceOpalTools(options =>
{
    options.BasePath = "";
    options.IncludeExperimentalTools = true;
});
```

### Option C – Manual endpoint mapping

```csharp
app.UseEndpoints(endpoints =>
{
    endpoints.MapControllerRoute(name: "Default", pattern: "{controller}/{action}/{id?}");
    endpoints.MapOpalTools("");

    // Optional: Separate endpoint for experimental tools
    endpoints.MapOpalTools("/experimental/",
        filter: t => t.IsExperimentalTool());
});
```

## Configure the Agent Platform instance

:::hint{type="info"}
**Note**
To configure the Agent Platform instance, you must be an Opal Admin.
:::

1. Go to the following Agent Platform instance: `https://inte.opal.optimizely.com/instances/OPAL_INSTANCE_ID`.
2. Go to the **Tools** > **Registries** tab.
3. Select **Add tool registry**.
4. Enter the registry name and the discovery URL from your Commerce Connect site, such as `https://YOUR_COMMERCE_SITE/discovery`.

On success, Agent Platform lists all tools. Enable the tools you need.

## Configure Content Graph (optional)

If you plan to use Graph tools, add the Content Graph configuration to `appsettings.json`:

```json
{
  "Optimizely": {
    "ContentGraph": {
      "GatewayAddress": "https://YOUR_GATEWAY.optimizely.com",
      "AppKey": "YOUR_APP_KEY",
      "Secret": "YOUR_SECRET"
    }
  }
}
```

## Authentication

All tools require Opti ID authentication. Include the authorization token in your requests:

```http
Authorization: Bearer YOUR_OPTI_ID_TOKEN
```

The tools use the `OptiID` scheme with the `default` scope.
