DetectionResult
TheDetectionResult
object contains the outcome of the agent detection process. It’s returned by the AgentDetector.finalizeDetection()
and AgentDetector.getCurrentDetectionResult()
methods and provides information about whether the current session is classified as an AI agent.
Properties
Indicates whether the current session is classified as an AI agent based on the default threshold (0.5).
true
: The session is classified as an AI agent (confidence >= 0.5)false
: The session is classified as a human user (confidence < 0.5)
The predicted probability/confidence from the detection model, ranging from 0 to 1.
- Higher values (closer to 1) indicate higher likelihood of being an AI agent
- Lower values (closer to 0) indicate higher likelihood of being a human user
The combined, preprocessed features used for scoring.This property contains the feature values after preprocessing (standardization, one-hot encoding, etc.) that were fed into the model.
It can be useful for debugging or understanding the model’s decision, especially when
debug: true
is enabled in the init
options.Example Result
Using the Result
Interpretation Guidelines
When interpreting detection results, consider the following guidelines:Confidence Thresholds
Confidence Thresholds
- confidence < 0.3: Strong indication of human user
- 0.3 ≤ confidence < 0.5: Likely human user
- 0.5 ≤ confidence < 0.7: Uncertain, could be either human or agent
- 0.7 ≤ confidence < 0.9: Likely AI agent
- confidence ≥ 0.9: Strong indication of AI agent
isAgent
boolean. You might adjust your application’s response based on the confidence
value for more nuanced handling.Edge Cases
Edge Cases
Some scenarios may lead to less reliable detection:
- Very short sessions with limited interaction (less data for extractors)
- Users with assistive technologies that modify input patterns
- Unusual input devices (e.g., trackballs, graphics tablets) or browser configurations
- High network latency affecting event timing