The AI_SECURITY_DETECTION event is generated when Box AI performs a security scan on input or retrieved content and detects a potential security risk, such as a prompt injection attempt. These events allow you to monitor and audit AI security detections across agent sessions and AI-powered workflows.
AI security detection events are generated only for Box Agents. Legacy agents are not scanned. Box Shield Pro agents, including the and the , are also not scanned.
All AI security detection events are produced within the stream. These events follow the standard object schema, with event_type set toAI_SECURITY_DETECTION and detection-specific details nested inside additional_details.
{
"created_by": {
"type": "user",
"id": "1234"
},
"created_at": "2026-01-01T00:00:00-08:00",
"event_type": "AI_SECURITY_DETECTION",
"type": "event",
"session_id": null,
"additional_details": {
"ai_security_detection_event": {
"agent_id": "box-ai-agent",
"items": null,
"detector_type": "PROMPT_INJECTION",
"scan_source_type": "PROMPT",
"confidence_level": "MEDIUM",
"action": "ALLOW"
}
}
}
additional_details fields
| Field | Description |
|---|
agent_id | The ID of the Box AI agent that processed the request. |
items | Always returns null. |
detector_type | Indicates what triggered the detection. See Detector types. |
scan_source_type | Indicates that the user’s input to the agent was scanned. |
confidence_level | Confidence level of the detection: LOW, MEDIUM, HIGH. |
action | The action taken after the detection. See Actions. |
Detector types
The detector_type field indicates what triggered the detection. Additional detector types may be added in the future.
| Detector type | Description |
|---|
PROMPT_INJECTION | Box AI detected an attempt to manipulate or override agent instructions through malicious or adversarial input during an agent interaction or AI-powered workflow. |
Actions
The action field indicates what Box AI did in response to the detection. All detections, including those with a LOW confidence level, are recorded in the enterprise event stream.
| Action | Description |
|---|
LOG_ONLY | The detection was recorded. The request was permitted to proceed. |