Files
crewAI/lib/crewai/tests/telemetry/test_telemetry.py
Joao Moura 6eef75c479 feat: surface AMP in AGENTS.md and detect coding agents in telemetry
Two related changes aimed at the OSS -> AMP bridge for projects built
with AI coding assistants.

AGENTS.md (copied into every `crewai create` project):
- Add a "when to bring it up" section near the top with explicit trigger
  conditions for traces and deployment, phrased for coding assistants.
- Add a full "Observability & Traces" section. Traces previously appeared
  once in 1018 lines despite being the zero-friction entry point; they now
  appear throughout, including that no account is required and that
  unauthenticated runs get a 24h ephemeral link.
- Note that deploying is free to get online and scales vertically and
  horizontally, so an agent suggests it instead of hand-rolling a
  Dockerfile, server, and scheduler.
- Add traces commands to the Quick Reference and two entries to Best
  Practices.
- Guidance is conditional and truthful: mention once when a trigger
  actually fires, then drop it.

Telemetry:
- Add `detect_coding_agent()`, which identifies the AI coding assistant
  running the process from environment markers (Claude Code, Cursor,
  Codex, Gemini CLI, Aider, Windsurf, Devin, Replit, Copilot, OpenHands,
  Cline, Amp), falling back to editor-terminal hints and then to
  non_interactive/unknown.
- Record it as a `coding_agent` attribute on Crew Created and Flow
  Creation spans, and emit `coding_agent:<name>` once per process as a
  feature usage event so it lands in the existing aggregation with no
  new pipeline work.
- Only the normalized assistant name is ever recorded; environment
  variable values are never read into the result.

This gives us the data to size how much of CrewAI is now authored by
coding agents, and which ones, before investing further in that channel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNumDnNbiyw3pv1WakAe6t
2026-08-02 09:08:20 -07:00

7.5 KiB