Commit 3eab106
committed
✨ Add AI agent detection context with Tier 1 & Tier 2 signals
Detect AI agents and automation frameworks visiting instrumented pages.
Tier 1 (zero false positives): cooperative window global, cooperative
cookie, navigator.webdriver, user-agent pattern matching, and
automation framework globals (Playwright, Puppeteer, Selenium).
Tier 2 (low false positives): WebGL software renderer detection,
headless environment heuristics, and CDP connection probing.
Detection is gated behind the ai_agent_detection experimental feature
flag. When an agent is detected, isAgentSession and aiAgentContext are
added to the event context via the Assemble hook.1 parent 930babc commit 3eab106
8 files changed
Lines changed: 783 additions & 0 deletions
File tree
- packages
- core/src/tools
- rum-core
- src
- boot
- domain/contexts
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| |||
0 commit comments