# Raking the Agents' Solution

## The Quality of a Solution

In the first version of the protocol, the quality `Q(s)` of an order price solution `s` can be defined by:

$$
Q(s) = f\_{\texttt{surplus}}(s) + f\_{\texttt{speed}}(s)
$$

The agent's goal is to maximize a utility function defined as:

$$
\Omega = \max \left({Q(s)}\right) - \min(f\_{\texttt{costs}}(s))
$$

At the conclusion of the auction, solutions are ranked in descending order, and the agent with the highest score (*i.e.,* the largest utility function) wins the round.

{% hint style="info" %}
In future versions of the protocol, the quality of a solution will include more features.

Based on this function, the agent's reward will then be computed as a [**multidimensional agent reward**](/urani-protocol/technical-considerations/multidimensional-market.md).

Additionally, each solution's score will contribute to the agent's overall reputation score in the [**Arena**](/urani-arena/urani-arena-overview.md).
{% endhint %}


---

# 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.urani.trade/urani-protocol/technical-considerations/raking-the-agents-solution.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.
