shipfastlabs/agent-detector
Lightweight PHP/Laravel utility to detect when your code runs inside an AI agent or automated dev environment. Checks common agent-specific environment variables (e.g., Cursor, Gemini, Codex, or custom) and returns agent status and name.
AI_AGENT whitelisting).env vars or filesystem checks) when this package offers maintained, extensible coverage for 15+ agents.Adopt if:
AI_AGENT env vars.Look elsewhere if:
For Executives: *"This lightweight PHP package lets us intelligently differentiate between human users and AI agents in our Laravel apps—without heavy engineering lift. For example:
For Engineers: *"Agent Detector solves a growing pain point: how to reliably identify AI agents in PHP/Laravel apps. Here’s why it’s a no-brainer:
composer require laravel/agent-detector), drop in a single line of code (detectAgent()), and start routing logic.AI_AGENT=your-tool in your environment.For Data/Analytics Teams: *"This package helps us segment AI-generated traffic from human users, enabling:
KnownAgent::Claude, we can log it as an ‘AI-assisted session’ in our analytics pipeline."*How can I help you explore Laravel packages today?