> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.agentchat.contrib.agent_eval.criterion.Criterion

<h2 id="autogen.agentchat.contrib.agent_eval.criterion.Criterion" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">Criterion</span>
</h2>

```python theme={null}
Criterion(**data: Any)
```

A class that represents a criterion for agent evaluation.<br />Create a new model by parsing and validating input data from keyword arguments.<br />Raises \[`ValidationError`]\[pydantic\_core.ValidationError] if the input data cannot be
validated to form a valid model.<br />`self` is explicitly positional-only to allow `self` as a field name.

<b>Parameters:</b>

| Name     | Description   |
| -------- | ------------- |
| `**data` | **Type:** Any |

### Class Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### accepted\_values

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### description

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### model\_config

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### name

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### sub\_criteria

<br />

<br />

### Static Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### parse\_json\_str

```python theme={null}
parse_json_str(criteria: str) -> 
```

Create a list of Criterion objects from a json string.<br />

<b>Parameters:</b>

| Name       | Description                                                       |
| ---------- | ----------------------------------------------------------------- |
| `criteria` | Json string that represents the criteria<br /><br />**Type:** str |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### write\_json

```python theme={null}
write_json(criteria) -> 
```

Create a json string from a list of Criterion objects.<br />

<b>Parameters:</b>

| Name       | Description                              |
| ---------- | ---------------------------------------- |
| `criteria` | A list of Criterion objects.<br /><br /> |

<br />
