Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Agent Detector Laravel Package

shipfastlabs/agent-detector

Lightweight PHP 8.2+ utility to detect if your app is running inside an AI agent or automated dev environment. Supports Claude, Cursor, Gemini, Codex, Replit, Devin, and more via env vars or file checks, with a simple API and helper function.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Expanded AI Agent Coverage: Adds support for Antigravity (a new AI-driven development tool), broadening the package’s applicability to emerging AI-assisted workflows. Justifies adoption for teams using niche or proprietary agents beyond GitHub Copilot or Cursor.
  • Developer Experience (DX) for AI Tools: Enables granular control over Antigravity interactions (e.g., blocking sensitive commands or adapting CLI behavior), reducing friction for developers integrating AI tools into Laravel workflows.
  • Future-Proofing for AI Ecosystem: Demonstrates active community contributions (e.g., new agent detection PRs), signaling long-term viability for AI-driven Laravel development. Aligns with roadmaps for agent-aware features like dynamic CLI defaults or context-aware error handling.
  • Compliance and Security for Niche Agents: Extends auditability and logging to Antigravity-driven operations, supporting compliance teams tracking interactions with specialized AI tools.
  • Build vs. Buy Reinforcement: Highlights the package’s adaptability to new agents without custom development, reducing technical debt for teams adopting evolving AI tools.

When to Consider This Package

Adopt if:

  • Your Laravel application interacts with Antigravity or other emerging AI agents where environment-based detection is supported (e.g., via ANTIGRAVITY_* env vars).
  • You need lightweight, zero-configuration agent detection for new AI tools without maintaining custom logic.
  • Your team uses multiple AI agents (e.g., Copilot, Cursor, Antigravity) and wants a unified detection solution.
  • You are evaluating the package for pilot projects with niche AI tools and can tolerate minor risks (e.g., false negatives for untested agents).
  • Your Laravel roadmap includes agent-aware features (e.g., dynamic CLI behavior, adaptive telemetry) and you want a foundational detection layer.

Avoid if:

  • Antigravity or other new agents rely on non-environment-based detection (e.g., custom headers, network patterns), making this package ineffective.
  • Your security or compliance requirements demand 100% detection accuracy for all agents, as the package’s low adoption (33 stars, 0 dependents) and minimal testing may introduce edge-case risks.
  • You require enterprise-grade support or SLA-backed maintenance for critical workflows.
  • Your CI/CD or agent environments lack consistent env var patterns (e.g., Antigravity not setting ANTIGRAVITY_* vars).
  • You prioritize minimal dependencies and prefer a Laravel-native solution (e.g., custom middleware) over community-driven packages with unproven long-term viability.

How to Pitch It (Stakeholders)

For Executives: *"This update adds support for Antigravity, a growing AI tool in developer workflows, to our existing agent detection package. By adopting this, we:

  • Future-proof Laravel security against new AI risks (e.g., accidental data leaks via Antigravity).
  • Reduce engineering overhead by centralizing agent detection for all AI tools, not just Copilot or Cursor.
  • Improve compliance by logging and restricting Antigravity-driven operations in automated environments. The package remains lightweight, with no custom development required. The risk is minimal—test in non-production first—but the upside for security, compliance, and developer productivity is clear. This is a low-effort way to stay ahead of AI-driven risks in Laravel."*

For Engineering: *"New in v1.1.2: Antigravity detection! Use this to:

  • Gate Antigravity interactions in Laravel:
    if (AgentDetector::detect()->isAgent && AgentDetector::detect()->name === 'Antigravity') {
        $this->error('Antigravity detected: Restricting sensitive operations.');
        return;
    }
    
  • Optimize CI/CD for Antigravity workflows: Skip prompts or enforce non-interactive modes.
  • Adapt behavior dynamically: Customize logging, telemetry, or error messages for Antigravity contexts.
  • Integrate into existing middleware/commands: Reuse your CheckAgent middleware or command guards.

How to test Antigravity detection:

  1. Set env vars in your Antigravity workflow (e.g., ANTIGRAVITY_API_KEY).
  2. Verify detection:
    $agent = AgentDetector::detect();
    dd($agent->isAgent, $agent->name); // Should return `true` and `'Antigravity'`.
    
  3. Pilot in a non-production Antigravity workflow before production use.

Caveats:

  • Limited validation: Antigravity support is new (1 PR, no dependents). Test thoroughly in your CI setup.
  • False negatives possible: Combine with Laravel’s APP_DEBUG or custom middleware for defense in depth.
  • Monitor updates: The package’s low adoption (33 stars) suggests cautious adoption for critical systems."*

For Security/Compliance Teams: *"Antigravity support extends our agent detection to a new AI tool, helping mitigate risks like:

  • Accidental data exposure: Block sensitive Laravel operations (e.g., tinker, API keys) in Antigravity-driven workflows.
  • Audit trails: Log Antigravity interactions for compliance (GDPR/CCPA) or internal policies.
  • Least-privilege enforcement: Restrict Antigravity to non-interactive modes in CI/CD. Recommendation: Pilot this in a non-production Antigravity workflow to validate detection accuracy. Pair with existing Laravel security layers (e.g., APP_DEBUG, middleware) for layered protection. Avoid for high-risk systems until adoption grows."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests