> For the complete documentation index, see [llms.txt](https://mozarkdocs.gitbook.io/appx_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mozarkdocs.gitbook.io/appx_documentation/agent-workspace-documentation/cleaner-agent/overview.md).

# Overview

## Cleaner Agent

Cleaner Agent helps you reduce duplicate coverage in your test repository.

Use it to find repeated or highly similar test cases, review grouped results, and decide what to keep, merge, or remove.

### Before you start

Your project must already contain test cases.

If the project is empty, Cleaner Agent will not find anything to compare.

### Open Cleaner Agent

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

Open **Test Cases** from the sidebar.

In the top-right toolbar, click **✦ AI Cleaner**.

A drawer opens from the right side of the page.

### Start a scan

At the bottom of the drawer, enter the journey you want to scan.

To scan the full repository, enter `scan all`.

You can also choose how the scan runs:

* **Semantic** — finds near-duplicates and similar intent
* **Exact** — finds word-for-word matches

In **Semantic** mode, you can also set a similarity threshold.

When you are ready, send your request.

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

### Review duplicate groups

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

When the scan finishes, Cleaner Agent opens a results panel on the left.

Each result appears as a group of similar test cases.

Open a group to review:

* why the test cases were grouped together
* which test case should stay
* which test cases may be merged or removed
* the similarity score for each related case

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

One test case is marked as the primary version for the group.

### Take action on results

From a result group, you can take action directly.

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

#### Delete a duplicate

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

Delete a test case when it adds no value beyond the primary version.

After deletion, the case is removed from the group and no longer appears in **Test Cases**.

#### Mark as not duplicate

Use **Not Duplicate** when a grouped case should remain separate.

This removes it from the duplicate group without deleting it.

#### Merge a group

Use **Merge** when multiple test cases contain useful details worth combining.

Cleaner Agent opens a merged draft that combines the best content from the group. Review it, then save it as a new test case.

#### Edit a test case

Open any test case from the results view to update its title, steps, or other details before you decide what to do with it.

### Filter and explore results

Use the filter field at the top of the results panel to narrow groups by title.

You can also ask follow-up questions in the chat, such as which journey has the most duplicates or how many exact duplicates are in the project.

### If no results appear

Cleaner Agent may return no groups when:

* the project has too few test cases to compare
* the selected journey has little or no matching content
* the threshold is set too high for near-duplicates to qualify

If needed, lower the threshold or expand the scan to a broader scope.

### Next step

Read [Cleaner Agent scan modes](/appx_documentation/agent-workspace-documentation/cleaner-agent/cleaner-agent-scan-modes.md) to understand the difference between Semantic and Exact scans, similarity thresholds, and result labels.


---

# 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://mozarkdocs.gitbook.io/appx_documentation/agent-workspace-documentation/cleaner-agent/overview.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.
