{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/7"}],"enrichment":{"capability":"Detects whether code is running in an AI agent or automated development environment by checking environment variables and conditions against a curated list of known agents.","skillfed_tags":["ai-detection","environment-detection","development-tools"],"use_cases":["Adapt application logging, error handling, or output formatting when running under an AI agent versus human execution.","Track telemetry and analytics separately for AI agent runs versus human-driven sessions.","Enable or disable experimental features conditionally based on whether an AI development tool is detected.","Implement custom behavior in libraries or frameworks when they detect they're running in an AI-assisted coding environment.","Support the AI_AGENT standard by setting it in your own tool to allow downstream code to detect your presence."],"what_it_does":"detect_agent is a lightweight utility that identifies whether code is executing inside an AI agent or automated development environment. It works by checking environment variables and conditions against a vendored list of detection rules sourced from Vercel's upstream detect-agent package, returning both a boolean flag and metadata about the detected agent if one is found.\n\nThe package supports detection of many AI coding assistants and development environments\u2014including Cursor, Claude Code, GitHub Copilot, Devin, Gemini CLI, and others\u2014plus a standard AI_AGENT environment variable that any tool can set to identify itself. It's designed for scenarios where application behavior needs to adapt based on whether a human or an AI agent is running the code, such as adjusting logging verbosity, enabling experimental features, or tracking telemetry differently.","worth_installing":"Yes, with a license caveat. The package is actively maintained, has zero dependencies, and solves a real problem for code that needs to behave differently in AI agent contexts. However, verify the actual license terms before use\u2014the metadata does not declare one, which is a gap you should resolve before committing to a dependency."},"id":"detect-agent","links":{"html":"https://skillfed.io/packages/detect-agent","md":"https://skillfed.io/packages/detect-agent.md","pypi":"https://pypi.org/project/detect-agent/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-12","license_spdx":null,"license_treatment":"unclear","name":"detect_agent","python_support":"supports_current","summary":"Detect if code is running in an AI agent or automated development environment"},"popularity":{"monthly_downloads":652133,"position":5545,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.6.0"}
