Detecting AI Agents with JA4 TLS Fingerprinting

Published 2026-04-05 | CounterAgent Research

The Problem

AI agents are increasingly making HTTP requests that look identical to human browser traffic. User-Agent strings are trivially spoofed, and many agent frameworks now mimic browser headers. Traditional bot detection fails.

JA4: A Deeper Signal

JA4 fingerprints are derived from the TLS ClientHello — the very first packet in any HTTPS connection. This captures the cipher suites, extensions, and ALPN protocols offered by the client's TLS library. Unlike User-Agent strings, these are extremely difficult to spoof without recompiling the TLS library itself.

Key Findings

Detection Methodology

CounterAgent uses a 5-layer detection approach:

  1. JA4 vs User-Agent mismatch (cipher count, known bot hashes, TLS version)
  2. Header anomalies (missing Accept-Language, Sec-Fetch-*, header count)
  3. Path patterns (agent discovery endpoints, API probing, favicon behaviour)
  4. Timing analysis (sub-100ms intervals, machine-like variance)
  5. Known JA4 matching against reference probe catalogue

Try It

Use the detection API or connect via MCP to test your own traffic.

Related