# KPI

A **KPI** is a metric that is worth considering when analyzing the result of an offline optimization study, looking for (sub)optimal configurations generated by Akamas AI to be applied.

Akamas automatically considers any metric referred to in the defined optimization goal and constraints for an offline optimization study as a **KPI**. Moreover, any other metrics of the system component can be specified as a KPI for an offline optimization study.

### Construct

A KPI is defined as follows (from the UI or the CLI):

| Field name  | Field description                                                                               |
| ----------- | ----------------------------------------------------------------------------------------------- |
| Name        | Name of the KPI that will be used on UI labels                                                  |
| Formula     | Must be defined as \<Component\_name>.\<metric\_name>                                           |
| Direction   | Must be 'minimize' or 'maximize'                                                                |
| Aggregation | A valid metric aggregation such as min, max, avg, sum, p95, etc. If unspecified, default is avg |

KPIs are not an [Akamas resource](../../cli-reference#clireference-operations) as they are defined as part of an optimization study. The construct to define KPIs is described on the [KPIs](../construct-templates/study-template/kpis) page of the [Study template](../construct-templates/study-template) section.

## Commands

KPIs are not an [Akamas resource](../../cli-reference#clireference-operations) and are always defined as part of an optimization study.

## User Interface

The number and first KPIs are displayed in the Akamas UI in the header of each offline optimization study.

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-4354bbd68aafbef69a5c4ea1ef4676131626e296%2FScreenshot%202023-01-23%20at%2015.39.25.png?alt=media" alt=""><figcaption><p>Number and first KPIs diplayed in the optimization study</p></figcaption></figure>

The full list of KPIs is displayed by drilling down to the KPIs section.

<figure><img src="https://1840531935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC1d2wNp5yTa9gnHgSILG%2Fuploads%2Fgit-blob-b97a1e130ccc4e54fe56cc17de1b46310c71c306%2FScreenshot%202023-01-23%20at%2015.38.01.png?alt=media" alt=""><figcaption><p>KPI section displaying all KPIs</p></figcaption></figure>

From this section, it is possible to modify the list of KPIs and change their names and other attributes.
