Class AIAgentCustomValueProvider

java.lang.Object
io.github.gradle.conventions.customvalueprovider.BuildScanCustomValueProvider
io.github.gradle.conventions.customvalueprovider.AIAgentCustomValueProvider
All Implemented Interfaces:
BiConsumer<org.gradle.api.initialization.Settings,com.gradle.develocity.agent.gradle.scan.BuildScanConfiguration>

public class AIAgentCustomValueProvider extends BuildScanCustomValueProvider
Adds an "AGENT" tag to the build scan when an AI coding agent is detected. Also adds a custom value with the name of the detected agent.

Detection is based on environment variables commonly set by AI coding tools:

  • CLAUDECODE - Claude Code
  • CURSOR_AGENT - Cursor
  • GEMINI_CLI - Gemini CLI
  • CODEX_SANDBOX - Codex CLI
  • OPENCODE_CLIENT - OpenCode

Any tool can also be detected by setting the proposed standard AGENT environment variable (see agents.md#136).

  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
      Overrides:
      isEnabled in class BuildScanCustomValueProvider
    • accept

      public void accept(org.gradle.api.initialization.Settings settings, com.gradle.develocity.agent.gradle.scan.BuildScanConfiguration buildScan)