Agent Detection Overview
Superline Agent Detection provides real-time detection of AI agents in browser sessions using metadata and behavioral patterns. This page provides an overview of how the library works and its key components.How It Works
1
Feature Extraction
The library extracts features from browser metadata and user behavior (mouse movements, keyboard patterns, scroll behavior, clicks)
2
Data Processing
Extracted features are processed through standardization, normalization, and one-hot encoding where appropriate
3
Model Scoring
A logistic regression model analyzes the processed features to calculate a detection probability
4
Classification
The probability value is compared to a threshold to classify the session as human or AI agent
Key Components
Agent Detector
Agent Detector
The core component that manages the detection process, including initialization, data collection, and result generation. This is your main point of interaction with the library.
Feature Extractors
Feature Extractors
Components that collect and analyze different aspects of the browser session. The library includes extractors for browser metadata, mouse events, keyboard events, scroll events, and click events.Each extractor focuses on a specific aspect of user behavior and contributes specific features to the detection model.
Detection Model
Detection Model
A logistic regression model that processes the extracted features to calculate a confidence. The model is trained on a large dataset of labeled browser sessions from both humans and AI agents.The model parameters (weights and intercepts/bias) are included in the library, making it work “out of the box” without requiring server-side processing.
Environment System
Environment System
A pluggable system that adapts the library to different operational contexts. The default browser environment provides real-time event collection, while a replay environment is available for offline analysis.
Storage System
Storage System
A system for persisting events and metadata during the detection process. The default implementation uses IndexedDB in browser environments to ensure data is available across page loads.
Detection Result
When you callAgentDetector.finalizeDetection()
or AgentDetector.getCurrentDetectionResult()
, you receive a detection result with the following structure: