---

title: Bots
description: The bot signal says whether automation drove the browser and names the kind of tool, so your backend can refuse or challenge scripted visits.
---

`signals.bot` says whether the visit was driven by automation: a browser under remote control, a headless browser, an automation framework with a stealth layer, or a client that names itself a crawler. knownprint reports the verdict and never blocks anything on its own. What a visit marked `bad` may do on your site is your decision.

## The signal

A visit where automation was found:

```json
{
  "bot": {
    "value": "bad",
    "confidence": 1,
    "reasons": ["..."],
    "detail": {
      "version": "v2",
      "bot_type": "headless_chromium",
      "rules": ["..."]
    }
  }
}
```

The codes in `reasons` and `detail.rules` are elided in this example.

A visit where nothing was found:

```json
{
  "bot": {
    "value": "not_detected",
    "confidence": 1,
    "reasons": [],
    "detail": { "version": "v2" }
  }
}
```

| Field             | Type                       | Meaning                                                                                                                                                                                                                             |
| ----------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `value`           | string                     | `bad` when automation was found, `not_detected` otherwise.                                                                                                                                                                          |
| `confidence`      | number                     | How sure the verdict is. See [Confidence](#confidence).                                                                                                                                                                             |
| `reasons`         | array of strings           | For a `bad` verdict, codes for the findings that decided it. Empty for `not_detected`. Informational: do not build rules on individual codes.                                                                                       |
| `capped`          | boolean, optional          | `true` when the confidence is lowered for this kind of install: it is then at most 0.7 and the `value` is unchanged. This is normal under the standard proxy rule. See [Connection availability](/signals#connection-availability). |
| `detail.version`  | string                     | The version of the bot verdict, currently `v2`.                                                                                                                                                                                     |
| `detail.bot_type` | string                     | For a `bad` verdict: the kind of automation. See [Bot types](#bot-types).                                                                                                                                                           |
| `detail.declared` | string, optional           | For a `bad` verdict on a client that names itself a crawler: the name it gave in its User-Agent, such as `Googlebot` or `bingbot`.                                                                                                  |
| `detail.rules`    | array of strings           | For a `bad` verdict: the same codes as `reasons`.                                                                                                                                                                                   |
| `detail.evidence` | array of strings, optional | For a `not_detected` verdict: codes for hints that were seen but did not add up to a verdict. Informational.                                                                                                                        |

The signal is rarely `null`. Treat `null` as unknown.

`detail` can carry other members on some verdicts. They are informational.

## Bot types

`detail.bot_type` names the kind of automation behind a `bad` verdict:

| `bot_type`          | What drove the browser                                                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `selenium`          | Selenium.                                                                                                                                                |
| `playwright`        | Playwright.                                                                                                                                              |
| `puppeteer`         | Puppeteer.                                                                                                                                               |
| `phantomjs`         | PhantomJS.                                                                                                                                               |
| `nightmare`         | Nightmare.                                                                                                                                               |
| `stealth`           | An automation tool with a stealth layer that tries to pass the browser off as an ordinary one.                                                           |
| `headless_chromium` | Headless Chrome or Chromium, tool not named.                                                                                                             |
| `webdriver`         | A browser under remote control through WebDriver, tool not named.                                                                                        |
| `crawler`           | A client that names itself a crawler, a link previewer, a monitor, an audit tool, a script runtime or an HTTP library. `detail.declared` holds the name. |
| `automation`        | Automation of another kind, or one that could not be named.                                                                                              |

The type helps you understand traffic and write messages for your team. For decisions, the `value` is what matters: a `bad` verdict means automation, whatever the type.

## Confidence

| Verdict        | `confidence`                       | Meaning                                                                                                     |
| -------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `bad`          | `1`                                | A finding that only automation produces.                                                                    |
| `bad`          | `0.9`                              | Several hints that together point to automation and that no ordinary browser setup explains.                |
| `not_detected` | `1`                                | Nothing pointing to automation was found.                                                                   |
| `not_detected` | `0.8`                              | Some hints were seen (listed in `detail.evidence`), not enough for a verdict. The visit is not shown clean. |
| any            | at most `0.7`, with `capped: true` | The verdict above, with the confidence lowered for this kind of install. The `value` is unchanged.          |

`not_detected` is not a promise of a human. Well-built automation can look like an ordinary browser. Combine the bot signal with the [suspect score](/signals/suspect-score), the [activity signal](/signals/activity), and your own counts.

## When the verdict changes

The bot verdict can turn to `bad` for up to 30 minutes after the event, and the [suspect score](/signals/suspect-score) is then summed again. A `bad` verdict never turns back.

What this means for your backend:

- Read the event when the visitor acts (submits the form, places the order), not only when the page loads. The read returns the verdict as it is now.
- The `event.identified` webhook carries the verdict at identification and is not sent again when the verdict changes. See [Webhooks](/webhooks).
- This is part of the agent and needs no setup.

## What to do

| Situation                                                          | Suggested handling                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bad` on a signup, login, checkout, vote, post or any other write  | Refuse, or hold for review. No crawler has business submitting forms.                                                                                                                                                                                                                       |
| `bad` with `bot_type` `crawler` on a page view                     | Usually fine to serve: link previewers and search engines read pages. knownprint does not verify the name a client gives, so do not grant a self-named crawler anything a visitor would not get. To admit a search engine's crawler, verify it with the method the search engine publishes. |
| `bad` from your own monitoring or end-to-end tests                 | Expected: your test tools are automation. Tag those identifications (the agent's `tags` option) or run them against a separate environment and key so they stay out of your rules.                                                                                                          |
| `not_detected` with `detail.evidence`                              | Treat as unknown rather than clean. Let the other signals decide.                                                                                                                                                                                                                           |
| `not_detected` with a high [suspect score](/signals/suspect-score) | Another signal found something. Read the score's parts.                                                                                                                                                                                                                                     |

A sketch of a login handler:

```js title="login.js"
const bot = event.signals?.bot;

if (bot?.value === 'bad') {
  log.warn('bot login refused', {
    request_id: event.request_id,
    bot_type: bot.detail?.bot_type,
    declared: bot.detail?.declared ?? null,
  });
  return res.status(403).send('Please try again from your usual browser.');
}

if (bot === null || bot === undefined || (bot.detail?.evidence?.length ?? 0) > 0) {
  // Unknown or not shown clean: let the rest of your rules decide, perhaps with a second factor.
}
```

## Related signals

Automation often shows up in other signals too. Read them together:

- [`tampering`](/signals/browser#tampering) with `method` `automation`: an automation tool that hides itself or rewrites the page.
- [`virtual_machine`](/signals/browser#virtual-machine): bots often run on virtual or cloud machines.
- [`developer_tools`](/signals/browser#developer-tools): true both when a person has developer tools open and when a tool drives the browser the same way. The bot signal says which.
- [`vpn` and `datacenter`](/signals/network): automation usually runs in a datacenter or behind a proxy.
- [`high_activity`](/signals/activity): a visitor far busier than the rest of your traffic.

## Find bot traffic

List the events whose bot verdict is `bad`, newest first:

```bash
curl -G "$KNOWNPRINT_API/v1/events" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  --data-urlencode "bot=bad" \
  --data-urlencode "limit=100"
```

Add `start` and `end` (RFC 3339 times) to look at one period. See [Search events by signal](/signals#search-events-by-signal) and the [events API reference](/api/events).

For a step-by-step approach to scrapers, credential stuffing and scripted signups, see the [bots and scrapers guide](/guides/bots-and-scrapers).
