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

# Reporting

<a id="askui.reporting.CompositeReporter" />

## askui.reporting.CompositeReporter

```python theme={null}
class CompositeReporter(Reporter)
```

A reporter that combines multiple reporters.

Allows generating different reports simultaneously. Each message added will be forwarded to all reporters passed to the constructor. The reporters are called (`add_message()`, `generate()`) in the order they are ordered in the `reporters` list.

**Arguments**:

* `reporters` *list\[Reporter] | None, optional* - List of reporters to combine

<a id="askui.reporting.CompositeReporter.add_message" />

#### add\_message

```python theme={null}
def add_message(
    role: str,
    content: Union[str, dict[str, Any], list[Any]],
    image: Optional[Image.Image | list[Image.Image]] = None
) -> None
```

Add a message to the report.

<a id="askui.reporting.CompositeReporter.generate" />

#### generate

```python theme={null}
def generate() -> None
```

Generates the final report.

<a id="askui.reporting.Reporter" />

## askui.reporting.Reporter

```python theme={null}
class Reporter(ABC)
```

Abstract base class for reporters. Cannot be instantiated directly.

Defines the interface that all reporters must implement to be used with `askui.VisionAgent`.

<a id="askui.reporting.Reporter.add_message" />

#### add\_message

```python theme={null}
def add_message(
    role: str,
    content: Union[str, dict[str, Any], list[Any]],
    image: Optional[Image.Image | list[Image.Image]] = None
) -> None
```

Add a message to the report.

**Arguments**:

* `role` *str* - The role of the message sender (e.g., `"User"`, `"Assistant"`, `"System"`)
* `content` *str | dict | list* - The message content, which can be a string, dictionary, or list, e.g. `'click 2x times on text "Edit"'`
* `image` *PIL.Image.Image | list\[PIL.Image.Image], optional* - PIL Image or list of PIL Images to include with the message

<a id="askui.reporting.Reporter.generate" />

#### generate

```python theme={null}
def generate() -> None
```

Generates the final report.

Implementing this method is only required if the report is not generated in "real-time", e.g., on calls of `add_message()`, but must be generated at the end of the execution.

This method is called when the `askui.VisionAgent` context is exited or `askui.VisionAgent.close()` is called.

<a id="askui.reporting.SimpleHtmlReporter" />

## askui.reporting.SimpleHtmlReporter

```python theme={null}
class SimpleHtmlReporter(Reporter)
```

A reporter that generates HTML reports with conversation logs and system information.

**Arguments**:

* `report_dir` *str, optional* - Directory where reports will be saved. Defaults to `reports`.

<a id="askui.reporting.SimpleHtmlReporter.add_message" />

#### add\_message

```python theme={null}
def add_message(
    role: str,
    content: Union[str, dict[str, Any], list[Any]],
    image: Optional[Image.Image | list[Image.Image]] = None
) -> None
```

Add a message to the report.

<a id="askui.reporting.SimpleHtmlReporter.generate" />

#### generate

```python theme={null}
def generate() -> None
```

Generate an HTML report file.

Creates a timestamped HTML file in the `report_dir` containing:

* System information
* All collected messages with their content and images
* Syntax-highlighted JSON content
