# 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](https://docs.akamas.io/akamas-docs/3.1.2/cli-reference#clireference-operations) as they are defined as part of an optimization study. The construct to define KPIs is described on the [KPIs](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/construct-templates/study-template/kpis) page of the [Study template](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/construct-templates/study-template) section.

## Commands

KPIs are not an [Akamas resource](https://docs.akamas.io/akamas-docs/3.1.2/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://2641073690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ubiK4vpNilxkD7Fauar%2Fuploads%2FlaPWzVWCBWTxZlZROsos%2FScreenshot%202023-01-23%20at%2015.39.25.png?alt=media&#x26;token=639d39d4-1425-4157-a8e5-a2a3aef1dba0" 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://2641073690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ubiK4vpNilxkD7Fauar%2Fuploads%2FU3TkFZf6j7CTpl9DcZRz%2FScreenshot%202023-01-23%20at%2015.38.01.png?alt=media&#x26;token=db0bd7a5-cd38-4ced-bc42-cc10d6603ea8" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/glossary/kpi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
