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

# Add user agent

> Add a custom user agent to your requests.

**Required ACL:** `search`

This method appends a custom user agent to the default one when making requests to the Insights API.

## Examples

The following example adds the string "custom" to the default user agent.

For more information about initializing the JavaScript Insights client `aa`,
see [Initialize the Insights client](/doc/libraries/search-insights).

```js JavaScript icon=code theme={"system"}
aa("addAlgoliaAgent", "custom")
// returns insights-js (X.X.X); custom
```

## Parameters

<ParamField body="userAgent" type="string">
  Custom user agent.
  This gets added to the default one.
</ParamField>
