> For the complete documentation index, see [llms.txt](https://docs.amesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amesa.com/tutorials/material-fusion/evaluate-agent-performance.md).

# Evaluate Agent Performance

Once your agent has trained, you'll want to know how it performed - how well did it control the system? Was it successful? Did it beat benchmarks?

To determine this, after training is finished AMESA runs "benchmark episodes." In these episodes, the agent is controlling the process, with the simulation giving feedback, but unlike in experimental training episodes, the agent is always making what it has learned is the best decision. The default is one benchmark episode; you can set the number of benchmark episodes under Advanced Configuration when you start your training job.

## Benchmark and KPI

When you set up your use case, you set the KPI and the benchmark.

<figure><img src="/files/3mossYAO0ssaCzZhjX6J" alt=""><figcaption></figcaption></figure>

In this case, the benchmark is a quality rating of 87 - that is the number that your agent needs to beat to succeed.

## Performance Graphs

<figure><img src="/files/hkzxi3nWag0aBb3Xep7z" alt=""><figcaption></figcaption></figure>

On the Benchmarks page, you will see multiple visualizations of your agents' performance. This bar chart compares every agent orchestration within the use case to each other and to the benchmark, represented by a dotted line. You can see that for the Material Fusion use case, both the single agent systems and the multi-agent system beat the benchmark by similar margins.

## Investigate Agent Behavior

Further down the Benchmarks page, additional plots allow you to visualize agent behavior in detail.

<figure><img src="/files/efeZoawV6jYAk1bRFE3Q" alt=""><figcaption></figcaption></figure>

This plot shows the quality rating in green and the material fusion metric variable in red. The important thing to note is that at the beginning, the material fusion metric is high, leading to a quality rating that is low. But because the agent has learned well, it quickly adjusts its control so that the material fusion metric and quality rating are more favorable.

Think back to [activity clusters](/tutorials/material-fusion/generate-activity-clusters-and-scenarios.md). What you see in this plot is the agent moving from an unsuccessful cluster to a successful one.

When you see results like this, you know you have a successful agent and you can begin thinking about testing it for deployment.

## Dig Deeper

To dig deeper into agent performance, AMESA allows you to export a benchmark.json file with detailed information about every decision made during the benchmarking episodes. You can analyze this using your preferred data analysis tool. If you have [AMESA's Assist Agents](https://github.com/Composabl/amesa-agents/tree/main), you can also use the Analyst to gain insight about what happened during the benchmarking episodes and how your agent performed.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.amesa.com/tutorials/material-fusion/evaluate-agent-performance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
