Skip to content

@vercel/detect-agent: consider also checking AGENT env var #15336

Description

@ianlet

Context

@vercel/detect-agent checks AI_AGENT as the universal agent variable, then falls back to 9+ tool-specific vars.

Meanwhile, a parallel convention is emerging around AGENT=<agent-name>:

  • Goose ships AGENT=goose (PR)
  • Amp ships AGENT=amp (docs)
  • Bun checks AGENT=1 in its isAIAgent() detection (PR #21135)

There's a community proposal to standardize on AGENT (similar to CI=true): agentsmd/agents.md#136

Question

Would it make sense for detect-agent to also check AGENT alongside AI_AGENT? Converging early would help avoid two competing conventions gaining traction independently.

Happy to open a PR if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions