ergebnis/agent-detector
Detect the presence of coding agents in your PHP app by checking environment variables. Supports Amp, Antigravity, Augment, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, and more via a simple Detector::isAgentPresent() API.
AI_AGENT variable enables future-proofing for unknown agents.$detector->isAgentPresent(getenv())) reduces onboarding time for security/feature flags. No framework dependencies mean it works in any PHP app, including Laravel.Adopt if:
AI_AGENT environment variable.Look elsewhere if:
fake-useragent).For Executives: "This MIT-licensed PHP package lets us automatically detect and block bots—including AI coding tools like GitHub Copilot—with a single line of code. It’s lightweight, maintained, and works seamlessly in Laravel, reducing fraud risk and cloud costs without heavy engineering. No vendor lock-in, just plug-and-play security that scales with our growth."
For Engineering: *"We can replace custom bot-detection logic with this battle-tested detector, which:
if ($detector->isAgentPresent()) { abort(403); }).For Security/Compliance Teams: "This package simplifies GDPR/CCPA compliance by reliably distinguishing human vs. bot traffic via environment variables. The MIT license and active maintenance ensure no vendor risks, and it integrates cleanly with Laravel’s middleware for automated policy enforcement."
How can I help you explore Laravel packages today?