---
title: Agent admin API
slug: feature-experimentation/docs/admin-api
docTags: 
createdAt: 2026-08-05T20:39:52.000Z
---

By default, the Agent admin listener is configured on port 8088.

## Info

The `/info` endpoint provides basic information about the Optimizely Agent instance.

Example request

```shell
curl localhost:8088/info
```

Example response

```json
{
    "version": "v0.10.0",
    "author": "Optimizely Inc.",
    "app_name": "optimizely"
}
```

## Health check

The `/health` endpoint is used to determine service availability.

Example request

```shell
curl localhost:8088/health
```

Example response

```json
{
   "status": "ok"
}
```

Optimizely Agent will return an `HTTP 200 - OK` response if and only if all configured listeners are open and all external dependent services can be reached.

A non-healthy service will return an `HTTP 503 - Unavailable` response with a descriptive message to help diagnose the issue.

This endpoint can be used when placing Optimizely Agent behind a load balancer to indicate whether a particular instance can receive inbound requests.

## Metrics

The `/metrics` endpoint exposes telemetry data of the running Optimizely Agent.

Optimizely Agent currently exposes two metrics data types ([expvar](https://pkg.go.dev/expvar) and [prometheus](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus)) based on the user's input. Expvar metrics are used by default. To configure the metrics, update the `config.yaml` file or set the value of the `OPTIMIZELY_ADMIN_METRICSTYPE` environment variable.

Supported values

- `expvar` (default)
- `prometheus`

```yaml
admin:
    ## http listener port
    port: "8088"
    ## metrics package to use
    ## supported packages are expvar and prometheus
    ## default is expvar
    metricsType: ""
    ## metricsType: "prometheus" ## for prometheus metrics
```

### Expvar metrics

The core Optimizely Agent runtime metrics are exposed through the [Go expvar package](https://pkg.go.dev/expvar), which provides a standardized interface to public variables. Documentation for the various statistics can be found as part of the [mstats package](https://go.dev/src/runtime/mstats.go).

Example request

```shell
curl localhost:8088/metrics
```

Example response

```json
{
    "cmdline": [
        "bin/optimizely"
    ],
    "memstats": {
        "Alloc": 924136,
        "TotalAlloc": 924136,
        "Sys": 71893240,
        "Lookups": 0,
        "Mallocs": 4726,
        "HeapAlloc": 924136,
        ...
        "Frees": 172
    },
    ...
}
```

Custom metrics are also provided for the individual service endpoints and follow the pattern of the following:

```shell
"timers.<metric-name>.counts": 0,
"timers.<metric-name>.responseTime": 0,
"timers.<metric-name>.responseTimeHist.p50": 0,
"timers.<metric-name>.responseTimeHist.p90": 0,
"timers.<metric-name>.responseTimeHist.p95": 0,
"timers.<metric-name>.responseTimeHist.p99": 0,
```

### Prometheus metrics

Optimizely Agent supports [Prometheus](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus) metrics. Prometheus is an open-source toolkit for monitoring and alerting. You can use it to collect and visualize metrics in a time-series database.

To access the Prometheus metrics, you can use the `/metrics` endpoint with a Prometheus server. The metrics are exposed in a format that Prometheus can scrape and aggregate.

Example Request

```shell
curl localhost:8088/metrics
```

This will return a plain text response in the [Prometheus exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/#exposition-formats), including the metrics Prometheus is currently tracking.

:::hint{type="info"}
**Note**
You must configure your Prometheus server to scrape metrics from this endpoint.
:::

For information on how to use Prometheus for monitoring, see the [official Prometheus documentation](https://prometheus.io/docs/introduction/overview/).

Example Response

```javascript
...
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 1
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP timer_decide_hits 
# TYPE timer_decide_hits counter
timer_decide_hits 1
# HELP timer_decide_response_time 
# TYPE timer_decide_response_time counter
timer_decide_response_time 658.109
# HELP timer_decide_response_time_hist 
# TYPE timer_decide_response_time_hist histogram
timer_decide_response_time_hist_bucket{le="0.005"} 0
timer_decide_response_time_hist_bucket{le="0.01"} 0
timer_decide_response_time_hist_bucket{le="0.025"} 0
timer_decide_response_time_hist_bucket{le="0.05"} 0
timer_decide_response_time_hist_bucket{le="0.1"} 0
timer_decide_response_time_hist_bucket{le="0.25"} 0
timer_decide_response_time_hist_bucket{le="0.5"} 0
timer_decide_response_time_hist_bucket{le="1"} 0
timer_decide_response_time_hist_bucket{le="2.5"} 0
timer_decide_response_time_hist_bucket{le="5"} 0
timer_decide_response_time_hist_bucket{le="10"} 0
timer_decide_response_time_hist_bucket{le="+Inf"} 1
timer_decide_response_time_hist_sum 658.109
timer_decide_response_time_hist_count 1
# HELP timer_track_event_hits 
# TYPE timer_track_event_hits counter
timer_track_event_hits 1
# HELP timer_track_event_response_time 
# TYPE timer_track_event_response_time counter
timer_track_event_response_time 0.356334
# HELP timer_track_event_response_time_hist 
# TYPE timer_track_event_response_time_hist histogram
timer_track_event_response_time_hist_bucket{le="0.005"} 0
timer_track_event_response_time_hist_bucket{le="0.01"} 0
timer_track_event_response_time_hist_bucket{le="0.025"} 0
timer_track_event_response_time_hist_bucket{le="0.05"} 0
timer_track_event_response_time_hist_bucket{le="0.1"} 0
timer_track_event_response_time_hist_bucket{le="0.25"} 0
timer_track_event_response_time_hist_bucket{le="0.5"} 1
timer_track_event_response_time_hist_bucket{le="1"} 1
timer_track_event_response_time_hist_bucket{le="2.5"} 1
timer_track_event_response_time_hist_bucket{le="5"} 1
timer_track_event_response_time_hist_bucket{le="10"} 1
timer_track_event_response_time_hist_bucket{le="+Inf"} 1
timer_track_event_response_time_hist_sum 0.356334
timer_track_event_response_time_hist_count 1
...
```
