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

# builtin__dedupe

> Removes duplicates from a list, keeping the first of each, with no model call.

## Behavior

* `by` is the field compared, as a dot path such as `url` or `meta.id`. Without `by`, whole items are compared.
* The first item of each key is kept, in the original order.
* Items missing the field are all kept.
* `removed` is how many items were dropped.

| Available to | Effect |
| - | - |
| Any agent or plan step | Read-only |

## Input

**by** `string`

Dot path into each item to compare, e.g. `url` or `meta.date`

**items** `any[]` *required*

The list, usually a template like \{\{E1.results}}

## Output

**items** `any[]` *required*

**removed** `integer` *required*

```yaml Plan step theme={null}
- id: E1
  tool_name: builtin__dedupe
  input:
    items: "{{input.items}}"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.