$npx skillfedfor your agent

detect_agent

Detect if code is running in an AI agent or automated development environment

Worth itPyPI Software DevelopmentReleased Aug 2026652.1K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — detect_agent-0.6.0-py3-none-any.whl
v0.6.0 · released 2026-08-12 · Python >=3.9

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—the metadata does not declare one, which is a gap you should resolve before committing to a dependency.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low friction installation with no runtime dependencies.
  • Active maintenance as of 2026-08-12 with recent releases.

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before using in proprietary or restricted contexts.

last release 2026-08-12 (2 days) · last repo commit 2026-08-12

0 known vulnerabilities (OSV.dev, 2026-08-14) · 652,133 downloads/mo, #5,545 on PyPI

Verify before relying

from detect_agent import determine_agent

result = determine_agent()
if result["is_agent"]:
    print(f"Running in {result['agent']['name']} environment")
  • Exact license under which detect_agent is distributed (SPDX identifier not provided).
  • How frequently the vendored agents.json is synced with upstream Vercel repository.
  • Whether detection rules cover all current AI coding assistants or if gaps exist.
Same gist for agents: .md · .json

What it is and 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.

The package supports detection of many AI coding assistants and development environments—including Cursor, Claude Code, GitHub Copilot, Devin, Gemini CLI, and others—plus 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

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—the metadata does not declare one, which is a gap you should resolve before committing to a dependency.

Install

detect-agent on PyPI

Before you install

Low friction installation with no runtime dependencies. Active maintenance as of 2026-08-12 with recent releases.

Requires Python 3.9 or later.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before using in proprietary or restricted contexts.

Quickstart

from detect_agent import determine_agent

result = determine_agent()
if result["is_agent"]:
    print(f"Running in {result['agent']['name']} environment")

Verify before relying

  • Exact license under which detect_agent is distributed (SPDX identifier not provided).
  • How frequently the vendored agents.json is synced with upstream Vercel repository.
  • Whether detection rules cover all current AI coding assistants or if gaps exist.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 2 days since the last release
Last repo commit
First released
Downloads652,133 / month, #5,545 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: detect_agent-0.6.0-py3-none-any.whl

Tags

Capabilities
detect ai agent environmentcheck if running in ai development toolidentify ai coding assistantai agent detectionautomated environment detectioncursor claude copilot detectionai_agent environment variable
Topics
ai-detectionenvironment-detectiondevelopment-tools

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “detect ai agent environment”

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also deepagents-code · vermin · google-agents-cli · lib-detect-testenv · claude-tap · serena-agent · plugin-scanner · ci-info · shellingham · opencode-agent-hub

Further reading