Skip to main content
Blog
Blog Attacks

Detect AI agents by behavior: mouse, scroll, typing

Behavioral signals catch AI agents that pass CAPTCHA and rotate IPs: mouse paths and keystroke timing automation can't fake. See how cside scores it.

Jul 14, 2026 10 min read
Detect AI agents by behavior: mouse, scroll, typing

You can spoof almost everything a browser reports. A modern AI agent runs inside real Chrome, rotates through residential IPs, presents a clean fingerprint, and solves a CAPTCHA without slowing down. What it cannot fake convincingly is how a real person moves, scrolls, and types across an entire session.

That is what behavioral signals read, and it is the basis of behavioral AI agent detection. Instead of checking an identity once at the door, they watch how the visit actually unfolds: the curve of a mouse path, the rhythm of a scroll, the spacing between keystrokes, and the pauses an agent takes while a model decides what to do next. cside reads more than 100 signals from your own first-party JavaScript, on the live page, and the behavioral layer is the part automation struggles most to suppress.

This is a practical guide to those signals, why they work, and how to turn them into a decision.

TL;DR

  • Fingerprint, IP, and CAPTCHA checks are point-in-time and spoofable. Behavior is produced live across a session and far harder to fake.
  • The behavioral layer has four parts: mouse trajectory, scroll cadence, keystroke spacing and typing rhythm, and an AI layer (reasoning latency plus AI-generated text).
  • Modern LLM agents no longer rely on scripted input, so single-signal cadence checks miss them. The catch is cross-signal correlation.
  • cside reads these signals from first-party JavaScript in real visitor sessions and feeds a real-time risk score into your login, checkout, and fraud stack.
  • Never block on one signal. Score on convergence and respond in graduated steps.

Why behavioral signals catch what fingerprinting misses

Behavioral detection reads how a session moves, scrolls, and types over time to separate real people from automation, rather than trusting what the browser reports at a single moment.

Static identity signals describe what a browser claims to be: its user-agent, platform, screen, fonts, and GPU. Every one of them can be rewritten. Anti-detect browsers exist to make a scripted session look like a fresh, ordinary device, and good ones stay internally consistent enough to pass a fingerprint check.

Behavior is different because it has to be produced live, every session, in response to your actual page. A real hand is governed by physics and a real brain by cognition. Mouse paths curve and overshoot, scroll speed rises and falls, and typing carries pauses, typos, and corrections. None of that is a value an operator can set in advance.

There is also a structural gap in one-time checks. A challenge tests the visitor once, at the door, and assumes everything after that is fine. That assumption is why visible challenges fail as a primary defense: a bot only has to look human for the length of the puzzle. Reading behavior across the whole session removes that blind spot.

None of this is new as a field. Analyzing keystroke and mouse patterns to tell people and machines apart is decades old. Keystroke-timing research goes back to the 1980s, and continuous authentication has used mouse and typing dynamics for years. What changed is the urgency. Now that AI agents drive real browsers at scale, the behavioral layer moved from a nice-to-have to the signal that actually separates a human from a capable agent.

PropertyFingerprint / IP / CAPTCHABehavioral signals
What it checksWhat the browser reports at one momentHow the session moves, scrolls, and types over time
TimingPoint-in-time, checked at the doorContinuous, across the whole session
SpoofableYes; anti-detect browsers rewrite itMuch harder; produced live in response to the page
Catches an agent in real ChromeNoYes

The behavioral AI agent detection layers cside reads

cside groups interaction signals into four layers, weighted by how hard each is to fake.

Behavioral layerWhat a real person producesWhat automation tends to produceWhy it resists faking
Mouse trajectoryCurved paths, micro-corrections near a target, physiological tremorStraight lines or clean curves, identical velocity, same originMost mature layer in cside's stack; automation libraries have not reproduced human motion at scale
Scroll cadenceShort bursts with rising and falling velocity, pauses to readFlat or step-function velocity, perfectly even intervalsCheap to read and expensive to fake well, because natural reading rhythm depends on content the agent is not reading
Keystroke spacing and typing rhythmUneven intervals, characteristic hold times, backspaces and correctionsNear-zero variance, or an instant paste with no rhythmThe layer most detection stacks underuse, so it is rarely spoofed
AI layer: reasoning latency and generated textHuman think-time, human-written textInference round-trip pauses, model-generated textTargets the agent's model itself, which scripted tooling cannot mask

cside AI agent detection dashboard

Mouse trajectory

Human cursor motion has structure that scripts rarely reproduce: micro-corrections near a target, acceleration and deceleration that follow Fitts's law, small lateral drift, and a physiological tremor that never fully settles. Automation tends to move in straight lines or mathematically clean curves, returns to the same origin, and reacts with identical velocity.

This is the most mature part of cside's behavioral stack, and the mouse-movement work is covered in depth in its own post. The short version: a behavioral model (cursor_v2) scores mouse motion against patterns automation libraries have not reproduced at scale. On controlled tests, it catches raw Playwright sessions at 98.2% recall and stealth-mode browserless sessions at 100%, at a human false-positive rate under 1% (see the headless browser detection method). Tooling that tries to learn human-like motion still leaves the cursor tells cside catches on Playwright and browserless traffic.

Scroll cadence

Scrolling produces the same kind of signal. Real users scroll in short bursts with a natural velocity profile: a push, a glide, a stop to read. Scripts that call window.scrollTo() or drive scroll through the DevTools Protocol produce flat or step-function velocity, perfectly even intervals, or jumps with no ramp. Scroll cadence is cheap to read and expensive to fake well, because natural reading rhythm depends on content the agent is not actually reading. cside reads scroll velocity and dwell directly from first-party JavaScript on the live page and scores it as one input into the convergence model, where a flat, content-independent scroll profile becomes meaningful only when it lines up with the other behavioral signals.

Keystroke spacing and typing rhythm (keystroke dynamics)

This is the layer most detection stacks underuse. Human typing is uneven in a specific way. The interval between keystrokes varies with finger travel and how familiar a letter pair is, the time spent holding each key sits in a characteristic range, and real input is full of backspaces and corrections. Scripted form fills go the other way: near-zero variance between keystrokes, or an instant paste of the whole value with no typing rhythm at all.

cside reads keystroke spacing and typing rhythm directly, measuring the variance in the timing between entries rather than the content of them. A field completed with metronomic precision, or filled faster than a human could physically type, is a strong signal on its own and a stronger one when it lines up with a linear mouse path.

The AI layer: reasoning latency and generated text

Scripted bots and LLM-driven agents fail differently, and the AI layer targets the difference.

An autonomous agent usually pauses between actions while its model decides what to do next. That pause has a machine signature: it is a round-trip to an inference step, not a person reading the screen and hesitating. cside reads the latency between entries and actions and flags the reasoning-latency pattern that agent-driven sessions leave, which looks different from human think-time even when the agent adds delays to appear more human.

The second AI signal is the content itself. Alongside behavioral timing, cside includes an AI-generated-text detection engine: when a visitor submits text through a form, cside scores whether a person wrote it or a model generated it. That turns the text of a support message, a review, or a signup field into another input for separating a trusted agent from an abusive one.

[MID_BLOG_CTA]

The misconception: behavioral analytics only catches scripted bots

The common objection is that behavioral detection only works against crude, scripted bots, and that a capable AI agent walks right through it. That was closer to true when the main tell was a hardcoded mouse.move(x, y) call. It is not true now.

Modern agents do not always use scripted input. Some drive a real browser and even train on human interaction traces to move and type more naturally. What they still cannot do is stay coherent across every signal at once. An agent can smooth its mouse path and still fill a form faster than any human. It can jitter its typing and still pause with a machine-perfect reasoning latency between steps. The catch is not one perfect signal; it is the contradictions between them.

No single signal decides: cross-signal correlation

Every behavioral signal produces false positives in isolation. Assistive technology automates input. People on trackpads move nothing like people on mice. A fast, practiced typist can look almost scripted. Blocking on any one reading would punish real customers.

So the model works on convergence. cside scores across 100+ browser, device, and behavioral signals and looks for internal contradictions. A session that claims to be an ordinary desktop but runs an automation control surface, types with no variance, and arrives from a datacenter IP is telling a story that does not hold together. One soft signal is a question. Several independent signals pointing the same way is an answer.

Where you read the signals matters

Behavioral detection is only as good as its vantage point. cside runs as first-party JavaScript inside real visitor sessions, on the live page, so it reads raw interaction signals directly rather than inferring them after the fact. Those signals become a real-time risk score you can feed into the moments that matter: login, signup, and checkout.

That placement is also what makes the signals actionable. Because the score lands in your own stack, you decide the response per request instead of accepting a single verdict from an outside box.

What to do when you detect an AI agent

Detection is only useful if it drives a graduated response. Not every agent is abuse; some automation is welcome, and telling humans, good bots, and malicious agents apart is the point of intent scoring.

  1. Instrument the behavioral signals at runtime, inside the session, alongside device and network context.
  2. Score on converging independent signals, not on the single strongest one.
  3. Allow known-good automation and real customers to pass untouched.
  4. Challenge or step up medium-confidence sessions with friction.
  5. Block or hold high-confidence abuse at login, signup, and checkout, and keep the raw signals and risk reason as an audit trail.

cside's AI Agent Detection and Bot Detection run this from inside the page: they read mouse, scroll, and typing signals, capture device and real-IP context, score intent in real time, and let your team allow, challenge, or block per request through the SDK.

Further reading on cside

Simon Wijckmans
Founder & CEO

Founder and CEO of cside. Previously a product manager on Cloudflare Page Shield (now Cloudflare Client-Side Security). Co-chair of the W3C Anti-Fraud Community Group and a Forbes 30 Under 30 honoree. Building accessible security against client-side attacks, web security is not an enterprise-only problem.

FAQ

Frequently Asked Questions

Behavioral bot detection identifies automation by how a session behaves rather than what the browser reports. It reads the mouse path, scroll cadence, and keystroke timing a visitor produces live, then scores whether that behavior matches a real person or a machine. Because behavior is generated in real time in response to the page, it is much harder to fake than a fingerprint, so it catches AI agents that already passed CAPTCHA and IP checks.

Yes. Fingerprint and CAPTCHA checks test what a browser reports and whether it can solve a puzzle at one moment. An agent driving real Chrome passes both. Behavioral signals read how the session moves, scrolls, and types over time, which is produced live and much harder to fake. cside reads these signals from your own first-party JavaScript, so it catches automation that already cleared the WAF and solved the CAPTCHA.

Mouse movement is one layer. On its own it is beatable, and tooling now trains models to reproduce human-like cursor paths. Reading behavior means correlating mouse trajectory, scroll cadence, keystroke spacing and typing rhythm, the latency between actions, and whether submitted text was written by a person or generated by AI. The catch comes from those signals disagreeing with each other, not from any single stream.

They can if you block on a single signal. Screen readers, switch access, trackpads, and assistive input all produce timing and motion that looks unusual. That is why cside scores across 100+ signals and acts on convergence, not on one reading. A session that types with machine precision, runs a known automation surface, and arrives from a datacenter IP is very different from a real customer using assistive tech, and a graduated response keeps that customer moving.

The behavioral layer reads timing and motion, not identity: when keys are pressed and how the cursor moves, not who you are. cside's AI-generated-text engine is a separate signal that evaluates content a visitor submits through a form to judge whether it was written by a human or an AI. Both run as first-party signals on the site the visitor is already using, and feed a bot risk score rather than a personal profile.

Monitor and Secure Your Third-Party Scripts

Gain full visibility and control over every script delivered to your users to enhance site security and performance.

Start free, or try Business with a 14-day trial.

cside dashboard interface showing script monitoring and security analytics
Related Articles
Book a demo