Agent Trace is an open specification for recording attribution of AI-generated code in version-controlled repositories. Maintained by Cursor and released at version 0.1.0 as a Request for Comments, the project provides a vendor-neutral standard format that tracks which code contributions came from AI systems versus human developers, along with metadata about the models and conversations involved in generating that code.
The specification addresses a practical need as AI coding agents become more prevalent. Rather than creating a proprietary solution, Agent Trace defines how any tool can record and read attribution data in a compatible way. The core concept centers on trace records, which are metadata units that document the origin of code contributions at file and line granularity. Each trace record identifies the contributor type (human, AI, mixed, or unknown), the model used if applicable, the conversation or context that produced the code, and the specific lines affected. The specification supports multiple version control systems including Git, Jujutsu, and Mercurial, with revision identifiers formatted appropriately for each system.
The project explicitly defines what it does not do. Agent Trace does not track legal code ownership or copyright, does not attempt to trace training data provenance, does not assess code quality, and remains agnostic about user interfaces. This focused scope allows the specification to remain simple and broadly applicable across different tools and workflows.
GitGenius activity data shows the project maintains relatively quick response times on issues and pull requests, with a median response latency of 18 hours across tracked items. The most active contributor is leerob with 8 recorded events, followed by jonathansantilli with 3 events and Hanchenli with 2 events. The project connects to related repositories including anthropics/claude-code, LMCache/LMCache, and openclaw/openclaw through overlapping contributors, indicating integration with broader AI coding infrastructure.
The specification includes detailed technical guidance on trace record schemas, line-level attribution tracking, content hashing for tracking code movement, and model identifier conventions following the models.dev standard. It addresses practical concerns like how to handle rebases and merge commits, acknowledging that different implementations may approach these scenarios differently. The extensibility design allows vendors to add custom metadata using reverse-domain notation to avoid key collisions while maintaining compatibility.
A reference implementation is provided in TypeScript within the repository, demonstrating integration patterns for AI coding agents. The implementation includes a storage layer for reading and writing trace records and hook integration for automatic trace capture on file changes. The specification is intentionally unopinionated about storage mechanisms, allowing traces to live in local files, git notes, databases, or other systems depending on implementation needs.
The project has gathered support from numerous partners in the AI coding space, including Amp, Cloudflare, Cognition, Vercel, and others who helped shape the specification. The specification is released under CC BY 4.0 and actively accepts suggestions through GitHub, positioning Agent Trace as a collaborative standard-setting effort rather than a closed proprietary format.