Black Friday: check your store for bots, free

File DA-025 View as Markdown

Intent

Every visit gets two answers: who is acting (human, bot or AI agent) and what they are trying to do. This page covers the second one, the intent. Use it to read the Intent column and the Threats page in the portal, and to set up edge reporting so scanners that never run JavaScript show up too.

A person can be comparing plans or probing for /.env. An AI agent can be buying a sofa for its user or scraping your catalog. The two answers are independent.

Intent is a tag. It never changes the class, the conduct label, the recommendation or the signed token, and Double Agent never blocks or challenges because of it.

The intents

Each session gets one primary intent. So does each client your edge reports.

IntentWhat it meansWhat shows it
browseBrowsing, exploringSeveral home, listing and product pages
researchResearching, comparingSite search or filters; pricing, plan or compare pages; the same product or plan opened again
readReading contentArticles, docs or media read at reading pace (30 seconds or more a page)
taskCompleting a task; task_kind: signup, login, contact, book, purchase, downloadSignup, login, form, cart or checkout pages; typed calls to action clicked; forms submitted; an order (a verified Shopify or Stripe order wins)
supportLooking for helpHelp and account pages; contact, chat or FAQ elements clicked
crawlIndexing and crawling; purpose: search, seo, training, feed, previewA known crawler from the catalog (Googlebot, GPTBot, Bingbot…)
ai_fetchAn AI assistant fetching pages for its userChatGPT-User, Claude-User, Perplexity-User and other user-triggered fetchers
monitorUptime monitoring or ad verificationA known monitoring or ad verification service
probeProbing for weaknessesSee Probing
scrapeScraping at scale50 or more pages at under 3 seconds each in one session; 200 or more different pages from one client in 10 minutes; a declared data collection or scraper service
cred_attackCredential stuffing or account takeoverRepeated failed logins your backend reported through evaluate()
floodRequest floods and API abuseA request rate your backend reported through evaluate(); 1,200 or more requests from one client in 10 minutes
prompt_probeAsking an AI agent to set aside or reveal its instructionsPublic agents only: see Agent endpoints
unknownNot enough evidenceA single ordinary page, or evidence below the threshold. The default

How the primary intent is picked:

  1. A hostile intent (probe, scrape, cred_attack, flood, and on agent endpoints prompt_probe) at medium or high risk wins.
  2. Otherwise the benign intent with the highest confidence wins, if it reaches 50 %. Finishing a task beats the research before it: a visitor who compared plans and then submitted a signup form reads task / signup.
  3. Otherwise a low-risk hostile pattern (one stray probe path, a declared scanner), else unknown.

Known crawlers, AI fetchers and monitors are never called scraping or a flood, however many pages they fetch. An agent acting for a person takes the intent of its task: an agent buying something is task / purchase with class agent.

Where you see it

  • Overview: the period's sessions by intent, for everyone or for humans, bots or agents alone, with task kinds

and crawl purposes.

  • Sessions: an Intent column and an Intent filter. Open a session for its intent, confidence and evidence in

plain words.

  • Threats (Sites › your site › Threats, on every plan): probing, scraping, credential attacks and floods over

time; the most probed paths, networks and countries; class by intent; the clients behind the requests (grouped by network and user agent in 10-minute windows); and recent hostile sessions.

  • Probing seen: a label next to the site in your sites list when there was probing in the last 7 days.
  • Callers: the intent of each caller. See Callers.
  • API: intent on /v1/check, GET /v1/sessions and its detail,

GET /v1/intents (the breakdown) and the Debrief webhook.

"intent": { "code": "task", "confidence": 0.93, "risk": "none",
            "evidence": ["journey.task:signup", "journey.submit:signup"],
            "task_kind": "signup", "purpose": null, "source": "rules", "version": "intent-2026.10.3" }

task_kind is set for task and purpose for crawl; both are null otherwise. risk is none, low, medium or high, and always none for a benign intent. confidence goes from 0 to 0.99 and grows with each piece of evidence.

Probing

EvidencePlain wordsRisk on its own
path.secretsAsked for secret or credential files (/.env, /.git/, /.aws/credentials, wp-config.php)low
path.adminAsked for admin panels this site does not run (/phpmyadmin/, /server-status, /wp-login.php on a site that isn't WordPress)low
path.backupAsked for backup or database files (*.bak, *.sql, /backup.zip)low
path.exploitAsked for known exploit paths (/cgi-bin/, /vendor/phpunit/, web shells; xmlrpc.php off WordPress)low
path.traversalTried to climb out of the site with ../ pathshigh
query.sqli, query.xss, query.traversal, query.ssrf, query.cmd, query.templateSent SQL, script, file-path, internal-address, shell or template injection in the addresshigh
search.injectionTyped injection payloads into your site searchhigh
rate.404_sweepAsked for 10 or more different missing pages within 10 minutes (Cloudflare edge only)medium
trap.hitTouched a trap your backend set for automated attacks (evaluate())high
catalog.scannerA declared security scanner from the cataloglow
  • Risk is low for one stray probe, medium once three different probe paths or a sweep make the pattern clear,

and high with an injection payload. A successful response never raises it: some setups report 200 before the page renders.

  • On WordPress and WooCommerce sites, /wp-admin, /wp-login.php, xmlrpc.php and /wp-content/ are normal and

never count. Until the script has detected your platform, they are not counted at all.

  • The patterns are careful: ordinary paths and searches ("select chair", "men's shoes", a docs page about SQL) never

match.

Evidence for the other intents

EvidencePlain wordsIntent
journey.browseMoved through home, listing and product pagesbrowse
journey.searchUsed site search or filtersresearch
journey.compareCompared plans or prices, or came back to the same pagesresearch
journey.contentRead articles or docs at reading paceread
journey.helpLooked for help, their account or a way to get in touchsupport
journey.task:<kind>Went to sign up, log in, book, download, a contact form, or added to cart / went to checkouttask
journey.submit:<kind>Submitted a signup, login, contact or booking formtask
journey.formSubmitted a form or reached a confirmation pagetask
journey.convertedCompleted an ordertask / purchase
catalog.crawler, catalog.user_fetch, catalog.monitorA known crawler, AI assistant fetcher, or monitoring servicecrawl, ai_fetch, monitor
scrape.volume, catalog.data_collectionFetched a very large number of pages with almost no time on each; a declared data collection servicescrape
auth.failuresFailed to log in many times, as your backend reportedcred_attack
rate.burstSent requests far faster than visitors doflood

Form submits (script 0.14.0 and later): each page counts the forms submitted on it by kind (signup, login, contact, booking, search, newsletter, other), read from the form's structure and its submit button. Only the counts leave the page, never values, field names or the button's text.

Agent endpoints

Callers of your public agents (MCP servers, A2A agents) get an intent too, on the Callers and Threats pages of each agent. The rules look at one caller's operations over the range you are viewing.

EvidencePlain wordsIntentRisk
tool.unlistedCalled 10 or more tools this agent does not offerprobemedium
tool.sweepTried 25 or more different tools within a minuteprobemedium
resource.enumerateRead 50 or more resources in 10 minutesscrapemedium
args.injectionSent tool arguments asking the agent to set aside or reveal its instructionsprompt_probehigh
auth.rejected_burstWas refused authorization 10 or more times in 10 minutescred_attackhigh
calls.burstSent 600 or more calls in one minutefloodmedium

args.injection runs only for agents with content capture on. The phrases are matched when the message arrives and only the code is stored, never the text. prompt_probe is not used for website sessions.

Edge adapter

Most scanners and scrapers never run JavaScript, so the browser script cannot see them. To see them, report requests from your edge (a Cloudflare Worker, or your Next.js proxy) to POST /v1/hits. Requests are grouped into clients (network and user agent) in 10-minute windows, which is where scraping and floods from scripts show. Known crawlers are tagged crawl with their purpose, and show on the Crawlers page.

Before you start: a secret key (sk_live_…) and a verified domain. Unverified sites get 403 site_not_verified.

A Cloudflare Worker that reports hits

Route this Worker in front of your site (for example shop.example.com/*) and store the key with wrangler secret put DA_SECRET_KEY. It passes every request through unchanged, then reports page requests in batches of up to 100.

const API = 'https://api.doubleagent.so/v1/hits';
const STATIC = /\.(js|mjs|css|map|png|jpe?g|gif|webp|avif|svg|ico|woff2?|ttf|otf|mp4|webm|mp3)$/i;
const HEADERS = ['accept', 'accept-language', 'accept-encoding', 'from', 'via', 'sec-fetch-site', 'sec-fetch-mode',
  'sec-fetch-dest', 'sec-ch-ua', 'sec-ch-ua-mobile', 'sec-ch-ua-platform', 'signature-agent', 'signature-input'];
const batch = [];
let timer = null;

async function flush(secretKey) {
  const hits = batch.splice(0, 100);
  if (!hits.length) return;
  try {
    await fetch(API, {
      method: 'POST',
      headers: { authorization: `Bearer ${secretKey}`, 'content-type': 'application/json' },
      body: JSON.stringify({ v: 1, hits }),
      signal: AbortSignal.timeout(5000),
    });
  } catch {
    // Reporting must never break your site: drop the batch.
  }
}

function flushSoon(secretKey) {
  timer ??= new Promise((resolve) => setTimeout(resolve, 5000)).then(() => { timer = null; return flush(secretKey); });
  return timer;
}

export default {
  async fetch(req, env, ctx) {
    const res = await fetch(req);
    const url = new URL(req.url);
    if (env.DA_SECRET_KEY && !STATIC.test(url.pathname)) {
      const hd = {};
      for (const name of HEADERS) {
        const value = req.headers.get(name);
        if (value) hd[name] = value.slice(0, 512);
      }
      batch.push({
        id: crypto.randomUUID(), ts: Date.now(), m: req.method, h: url.host, p: url.pathname.slice(0, 2048), s: res.status,
        ua: req.headers.get('user-agent')?.slice(0, 1024), ip: req.headers.get('cf-connecting-ip') ?? undefined, hd,
        cf: { asn: req.cf?.asn, org: req.cf?.asOrganization, country: req.cf?.country },
      });
      ctx.waitUntil(batch.length >= 100 ? flush(env.DA_SECRET_KEY) : flushSoon(env.DA_SECRET_KEY));
    }
    return res;
  },
};

Check it worked: fetch a page with curl https://your-site/, then open Sites › your site › Crawlers. The request shows there as an HTTP client. A request for /.env shows on Threats as probing.

The /v1/hits body

{ "v": 1, "hits": [ … ] }, at most 100 hits a batch. The API answers 202 with { "accepted": n }.

FieldRequiredWhat
tsYesTime of the request, epoch ms, within the last hour
mYesHTTP method, upper case
hYesHost
pYesPath, without the query string (up to 2,048 characters)
sYesThe response status
idNoYour id for the hit (16 to 64 of A-Z a-z 0-9 _ -). A resend with the same id is stored once
uaNoUser agent (up to 1,024 characters)
ipNoClient IP. Send it only from a source your platform sets, never from a header the client controls
hdNoUp to 24 request headers, 512 characters each. Never cookies or authorization
cfNoNetwork facts in Cloudflare's shape (asn, org, country, …)
qfNoUp to 8 injection codes your own matcher found in the query: sqli, xss, trav, ssrf, cmd, tpl. Never the query itself

Report probe paths (/.env, /backup.zip, *.bak) whatever their file type. Send the real status, so 404 sweeps show: a Next.js proxy runs before the page and always sees 200, so sweeps are not visible there. Limits: 100 batches a minute per key and 1,000 a minute per account.

The browser script (0.13.0 and later) checks the page's own query the same way and sends codes only.

Edge hint

An edge can also add a hint header to HTML pages, which the browser script reads as extra evidence:

Server-Timing: doubleagent;desc="v=1&wba=1&ua=claude&cfv=1&cfs=12&dc=1"
KeyMeaning
vFormat version, 1
wba=1Web Bot Auth headers are present (not checked at the edge; the API verifies the signature)
ua=<family>The user agent declares an agent family, such as claude or openai
cfv=1Cloudflare marks it a verified bot
cfs=<1-99>Cloudflare bot score (1 means bot)
dc=1The request comes from a hosting or datacenter network

Leave out keys you don't know. The hint is advice only: the server re-checks the same evidence from the request itself and never trusts the hint on its own. An edge with your secret key can also add an attested ticket.

Privacy

Only codes, counts and short probe paths are stored, never query strings, form values or field names. Paths are capped at 200 characters, with emails, long digit runs and token-like parts replaced by [redacted]. Intent is kept as long as the session it belongs to.

Next: Security for how reports are checked, or Callers for intent on agent calls.