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.
| Intent | What it means | What shows it |
|---|---|---|
browse | Browsing, exploring | Several home, listing and product pages |
research | Researching, comparing | Site search or filters; pricing, plan or compare pages; the same product or plan opened again |
read | Reading content | Articles, docs or media read at reading pace (30 seconds or more a page) |
task | Completing a task; task_kind: signup, login, contact, book, purchase, download | Signup, login, form, cart or checkout pages; typed calls to action clicked; forms submitted; an order (a verified Shopify or Stripe order wins) |
support | Looking for help | Help and account pages; contact, chat or FAQ elements clicked |
crawl | Indexing and crawling; purpose: search, seo, training, feed, preview | A known crawler from the catalog (Googlebot, GPTBot, Bingbot…) |
ai_fetch | An AI assistant fetching pages for its user | ChatGPT-User, Claude-User, Perplexity-User and other user-triggered fetchers |
monitor | Uptime monitoring or ad verification | A known monitoring or ad verification service |
probe | Probing for weaknesses | See Probing |
scrape | Scraping at scale | 50 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_attack | Credential stuffing or account takeover | Repeated failed logins your backend reported through evaluate() |
flood | Request floods and API abuse | A request rate your backend reported through evaluate(); 1,200 or more requests from one client in 10 minutes |
prompt_probe | Asking an AI agent to set aside or reveal its instructions | Public agents only: see Agent endpoints |
unknown | Not enough evidence | A single ordinary page, or evidence below the threshold. The default |
How the primary intent is picked:
- A hostile intent (
probe,scrape,cred_attack,flood, and on agent endpointsprompt_probe) atmediumorhighrisk wins. - 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. - Otherwise a
low-risk hostile pattern (one stray probe path, a declared scanner), elseunknown.
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:
intenton/v1/check,GET /v1/sessionsand 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
| Evidence | Plain words | Risk on its own |
|---|---|---|
path.secrets | Asked for secret or credential files (/.env, /.git/, /.aws/credentials, wp-config.php) | low |
path.admin | Asked for admin panels this site does not run (/phpmyadmin/, /server-status, /wp-login.php on a site that isn't WordPress) | low |
path.backup | Asked for backup or database files (*.bak, *.sql, /backup.zip) | low |
path.exploit | Asked for known exploit paths (/cgi-bin/, /vendor/phpunit/, web shells; xmlrpc.php off WordPress) | low |
path.traversal | Tried to climb out of the site with ../ paths | high |
query.sqli, query.xss, query.traversal, query.ssrf, query.cmd, query.template | Sent SQL, script, file-path, internal-address, shell or template injection in the address | high |
search.injection | Typed injection payloads into your site search | high |
rate.404_sweep | Asked for 10 or more different missing pages within 10 minutes (Cloudflare edge only) | medium |
trap.hit | Touched a trap your backend set for automated attacks (evaluate()) | high |
catalog.scanner | A declared security scanner from the catalog | low |
- Risk is
lowfor one stray probe,mediumonce 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.phpand/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
| Evidence | Plain words | Intent |
|---|---|---|
journey.browse | Moved through home, listing and product pages | browse |
journey.search | Used site search or filters | research |
journey.compare | Compared plans or prices, or came back to the same pages | research |
journey.content | Read articles or docs at reading pace | read |
journey.help | Looked for help, their account or a way to get in touch | support |
journey.task:<kind> | Went to sign up, log in, book, download, a contact form, or added to cart / went to checkout | task |
journey.submit:<kind> | Submitted a signup, login, contact or booking form | task |
journey.form | Submitted a form or reached a confirmation page | task |
journey.converted | Completed an order | task / purchase |
catalog.crawler, catalog.user_fetch, catalog.monitor | A known crawler, AI assistant fetcher, or monitoring service | crawl, ai_fetch, monitor |
scrape.volume, catalog.data_collection | Fetched a very large number of pages with almost no time on each; a declared data collection service | scrape |
auth.failures | Failed to log in many times, as your backend reported | cred_attack |
rate.burst | Sent requests far faster than visitors do | flood |
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.
| Evidence | Plain words | Intent | Risk |
|---|---|---|---|
tool.unlisted | Called 10 or more tools this agent does not offer | probe | medium |
tool.sweep | Tried 25 or more different tools within a minute | probe | medium |
resource.enumerate | Read 50 or more resources in 10 minutes | scrape | medium |
args.injection | Sent tool arguments asking the agent to set aside or reveal its instructions | prompt_probe | high |
auth.rejected_burst | Was refused authorization 10 or more times in 10 minutes | cred_attack | high |
calls.burst | Sent 600 or more calls in one minute | flood | medium |
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 }.
| Field | Required | What |
|---|---|---|
ts | Yes | Time of the request, epoch ms, within the last hour |
m | Yes | HTTP method, upper case |
h | Yes | Host |
p | Yes | Path, without the query string (up to 2,048 characters) |
s | Yes | The response status |
id | No | Your id for the hit (16 to 64 of A-Z a-z 0-9 _ -). A resend with the same id is stored once |
ua | No | User agent (up to 1,024 characters) |
ip | No | Client IP. Send it only from a source your platform sets, never from a header the client controls |
hd | No | Up to 24 request headers, 512 characters each. Never cookies or authorization |
cf | No | Network facts in Cloudflare's shape (asn, org, country, …) |
qf | No | Up 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"
| Key | Meaning |
|---|---|
v | Format version, 1 |
wba=1 | Web 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=1 | Cloudflare marks it a verified bot |
cfs=<1-99> | Cloudflare bot score (1 means bot) |
dc=1 | The 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.