Technology
Agent Trace: The Open Standard for Code Context Graphs
Agent Trace is an open, vendor-neutral specification for recording AI contributions alongside human authorship in version-controlled codebases. It marks the beginning of a new era where code is commodity and context is the precious resource.
What is Agent Trace?
On January 29, 2026, Cognition AI—the company behind the AI software engineer Devin—announced Agent Trace, an open specification for recording AI contributions alongside human authorship in version-controlled codebases. The specification was released as an RFC (Request for Comments) by Cursor, signaling broad industry alignment on the need for a standardized approach to AI code attribution.
At its core, Agent Trace answers a question that has become increasingly urgent as AI coding assistants reshape software development: who actually wrote this code, and what was the context behind it? In a world where AI-generated code is becoming the norm rather than the exception, the ability to trace authorship—and more importantly, the conversational reasoning that produced it—is no longer optional. It is essential infrastructure.
“If git tracked ‘Lines of Code’ as the primary measure in the pre-AI era, Agent Traces mark the new era where code is commodity and context is the precious resource.”
Agent Trace doesn't just record whether code was human-authored or AI-generated. It connects every code range to the conversation that produced it—the prompts, the reasoning, the iterations, and the decisions that led to the final implementation. This conversational context is what transforms raw code attribution into a genuine context graph for software development.
The Collaborators Behind the Standard
What makes Agent Trace remarkable is not just the specification itself, but the breadth of industry support it received from day one. Cognition AI joined forces with a coalition of leading AI and developer tooling companies to back the standard:
AI Coding Tools
- ✓Cursor — Published the RFC and hosts the specification
- ✓Cognition AI (Devin) — Announced and championed the standard
- ✓Google Jules — Google's AI coding agent
- ✓Amp — AI-powered development platform
Infrastructure & Open Source
- ✓Cloudflare — Global cloud infrastructure provider
- ✓Vercel — Frontend cloud and Next.js creators
- ✓OpenCode — Open-source AI coding tools
- ✓git-ai — AI-aware git tooling
The specification is published on GitHub at cursor/agent-trace under the CC BY 4.0 license, ensuring it remains open, forkable, and accessible to the entire developer ecosystem. The choice of Creative Commons licensing rather than a more restrictive software license underscores the intent: this is a shared standard, not a proprietary advantage.
The collaboration between competing AI coding tools is itself a signal of how fundamental this problem is. When Cursor, Cognition, and Google Jules all agree that a shared attribution standard is needed, it reflects a collective recognition that the industry cannot afford fragmented approaches to code provenance in the AI era.
How Agent Trace Works
At the technical level, Agent Trace introduces a JSON-based “trace record” that connects code ranges to conversations and contributors. The design is intentionally minimal yet expressive, capturing the essential metadata without imposing heavy tooling requirements.
1File or Line-Level Tracking
Contributions can be tracked at the granularity of entire files or specific line ranges. This flexibility allows teams to adopt Agent Trace incrementally—start with file-level attribution and move to line-level tracking as tooling matures. A single file might contain lines authored by a human developer, lines generated by Claude in Cursor, and lines produced by Devin operating autonomously.
2Conversation-Linked Attribution
Every code contribution is categorized by the conversation that produced it. This is the critical differentiator from simple authorship tagging. The trace record links code back to the specific prompt, the AI model's reasoning, and the iterative back-and-forth that shaped the final implementation. This conversation trail is what makes the attribution genuinely useful for understanding intent.
3Attribution Classification
Each contribution is classified into one of four categories: human, AI, mixed, or unknown. The “mixed” category acknowledges the reality of modern AI-assisted coding: a developer might prompt an AI model, then manually edit the result, creating a blended authorship that neither “human” nor “AI” fully captures.
4Optional Model Identifiers
Trace records can optionally include identifiers for the specific AI model used (e.g., Claude 3.5 Sonnet, GPT-4o, Gemini). This metadata enables teams to analyze code quality and patterns across different models, track model version impacts on code output, and make informed decisions about which models to use for different tasks.
5Storage-Agnostic Design
The specification intentionally does not define a storage mechanism. Agent Trace records could live in local files alongside source code, in git notes attached to commits, in a dedicated database, or in any other storage system a team prefers. This storage-agnostic approach maximizes adoption by letting teams integrate Agent Trace into their existing workflows without migration.
Conceptual structure of a trace record:
{
"version": "0.1",
"traces": [
{
"file": "src/components/Dashboard.tsx",
"ranges": [
{ "start": 1, "end": 45 }
],
"attribution": "ai",
"model": "claude-3.5-sonnet",
"conversation_ref": "conv_abc123",
"timestamp": "2026-01-30T14:22:00Z"
},
{
"file": "src/components/Dashboard.tsx",
"ranges": [
{ "start": 46, "end": 78 }
],
"attribution": "human",
"contributor": "developer@example.com"
},
{
"file": "src/utils/api.ts",
"attribution": "mixed",
"model": "gpt-4o",
"conversation_ref": "conv_def456"
}
]
}Why Agent Trace Matters
The emergence of Agent Trace signals a fundamental shift in how we think about software development. For decades, git has tracked “who committed what” as the canonical record of authorship. But in a world where an increasing share of code is generated, reviewed, or substantially modified by AI systems, git's commit-level attribution model is no longer sufficient.
Consider the practical implications. A developer opens Cursor, describes a feature in natural language, receives a multi-file implementation from Claude, manually adjusts a few lines, and commits the result. Git records that developer as the sole author. But the real story is richer—and the real value lies in understanding that story: the conversation that guided the implementation, the model that generated it, and the specific human judgment applied to the output.
In 2026, AI Engineers will spend more time crafting and reading context than writing code. Agent Trace is the infrastructure that makes this context durable and searchable.
Agent Trace matters for several overlapping reasons:
- ●Code Review and Trust — Reviewers can see which parts of a pull request were AI-generated and which were hand-written, applying appropriate levels of scrutiny to each
- ●Debugging and Maintenance — When a bug surfaces in AI-generated code, engineers can trace back to the conversation that produced it, understanding the original intent and constraints
- ●Compliance and Licensing — Organizations can track their AI code footprint for licensing, intellectual property, and regulatory compliance purposes
- ●Team Analytics — Engineering leaders can understand AI adoption patterns, measure productivity gains, and identify where AI-assisted development is most effective
- ●Knowledge Preservation — The conversational context behind code decisions is preserved as institutional memory, rather than being lost when a chat session ends
Connection to Context Graphs
Agent Trace is, fundamentally, the code-specific implementation of the broader context graph concept. Foundation Capital's definition of a context graph as “a living record of decision traces stitched across entities and time so precedent becomes searchable” maps directly onto what Agent Trace provides for software development.
| Context Graph Concept | Agent Trace Implementation |
|---|---|
| Decision Traces | Trace records linking code to conversations and reasoning |
| Entity Relationships | Code ranges connected to files, contributors, and models |
| Temporal Context | Timestamps and version history of AI contributions over time |
| Provenance Metadata | Attribution type, model identifier, conversation reference |
| Searchable Precedent | Ability to query “how was this code generated and why?” |
The connection runs deeper than surface-level analogy. In the same way that enterprise context graphs capture the “why” behind business decisions—the exceptions, overrides, and escalation paths that live in Slack threads and people's heads—Agent Trace captures the “why” behind code decisions: the prompt engineering, the model selection, the iterative refinement that shaped the final output.
“Over time, that context graph becomes the real source of truth for autonomy. Agent Trace is how that truth gets recorded in codebases.”
As AI coding agents become more autonomous—writing entire features, fixing bugs independently, and even reviewing each other's code—the context graph they build through Agent Trace records becomes the institutional memory of the codebase. New agents (or new human engineers) joining a project can query this context to understand not just what the code does, but why it was written this way, what alternatives were considered, and what constraints shaped the implementation.
Performance Impact
Beyond attribution and compliance, Agent Trace has direct implications for AI coding performance. The core insight is that Agent Traces that progressively expose context to coding agents lead to significant improvements in output quality, cost efficiency, and developer productivity.
Without Agent Traces
- ✗AI agents start each session with zero context about prior decisions
- ✗Developers repeatedly re-explain architectural choices and constraints
- ✗Token budgets wasted on re-supplying lost context
- ✗Inconsistent code patterns across AI-generated modules
With Agent Traces
- ✓AI agents retrieve specific context triggered by the code they are reading
- ✓Architectural decisions and constraints are automatically surfaced
- ✓Reduced cost through targeted context retrieval instead of full re-prompting
- ✓Consistent patterns as agents learn from prior conversations
The performance mechanism is straightforward. When an AI coding agent encounters a file or function that has associated trace records, it can retrieve the original conversation context—the requirements, the design rationale, the edge cases discussed—and use that context to inform its current task. Instead of generating code in a vacuum, the agent is building on the accumulated understanding of the codebase.
The ability to retrieve specific context triggered by code improves cost, accuracy, and reduces human time wasted resupplying lost context.
This is the compound intelligence effect: every traced conversation makes every future AI interaction more effective.
For engineering teams, this translates to measurable productivity improvements. Developers spend less time re-explaining context to AI assistants. Code review cycles shorten because reviewers can see the original intent alongside the implementation. And onboarding new team members becomes faster when the codebase carries its own decision history.
The Technical Specification
The Agent Trace specification defines a minimal but extensible schema for trace records. Understanding the key components helps teams plan their adoption strategy.
Trace Records
The top-level container for attribution data. A trace record includes a version identifier for the specification and an array of individual traces. Each trace maps a code region to its authorship metadata.
Conversation References
Each trace can include a reference to the conversation that generated it. This is intentionally left as an opaque identifier—implementations can use session IDs, URLs, UUIDs, or any other reference scheme. The critical requirement is that the reference allows retrieval of the original conversational context.
Attribution Types
The specification defines four attribution categories:
- human— Code written entirely by a human developer
- ai— Code generated entirely by an AI model
- mixed— Code produced through human-AI collaboration (AI generated, human edited, or vice versa)
- unknown— Attribution cannot be determined (e.g., legacy code)
Line Ranges
For fine-grained tracking, traces can specify start and end line numbers within a file. Multiple ranges can be associated with a single trace, allowing non-contiguous code regions to share the same attribution. When line ranges are omitted, the trace applies to the entire file.
Model Identifiers
An optional field for recording which AI model generated the code. This uses free-form strings (e.g., “claude-3.5-sonnet”, “gpt-4o-2025-01-13”, “gemini-2.0-flash”) rather than a fixed enumeration, allowing the specification to remain future-proof as new models are released.
Getting Started
Agent Trace is designed for incremental adoption. Teams don't need to overhaul their existing workflows to begin capturing value. Here is a practical path to getting started:
- 1
Read the Specification
Start by reviewing the RFC on GitHub at cursor/agent-trace. The specification is concise and well-documented. Understanding the schema before implementing helps teams make informed decisions about granularity and storage.
- 2
Start with File-Level Attribution
Begin by tracking attribution at the file level. This is the simplest entry point and provides immediate value for code review and team analytics. As tooling matures, you can transition to line-level tracking for critical codepaths.
- 3
Choose a Storage Strategy
Decide where trace records will live. Options include JSON sidecar files in the repository, git notes attached to commits, or an external database. Each approach has tradeoffs around discoverability, version control, and query performance.
- 4
Integrate with Existing Git Workflows
Agent Trace is designed to complement, not replace, git. Trace records can be generated as part of commit hooks, CI/CD pipelines, or IDE integrations. Tools like Cursor and Devin are already building native Agent Trace support into their platforms.
- 5
Build Context Retrieval
The highest-value integration is enabling AI agents to query trace records when working on code. When an agent opens a file with associated traces, it can automatically retrieve the conversation context that produced that code—making every subsequent interaction more informed and accurate.
Ready to Build Your Code Context Graph?
Agent Trace is the foundation. The Context Graph Marketplace helps you turn attribution data into searchable institutional intelligence.
Join the WaitlistFrequently Asked Questions
What is Agent Trace?
Agent Trace is an open, vendor-neutral specification for recording AI contributions alongside human authorship in version-controlled codebases. It was announced on January 29, 2026 by Cognition AI and released as an RFC by Cursor, with backing from Cloudflare, Vercel, Google Jules, Amp, OpenCode, and git-ai.
How does Agent Trace work?
Agent Trace uses a JSON-based “trace record” that connects code ranges to conversations and contributors. Contributions can be tracked at file or line level, categorized by conversation, and classified as human, AI, mixed, or unknown. The spec intentionally leaves storage open—traces can live in local files, git notes, or a database.
Who created and supports Agent Trace?
Agent Trace was announced by Cognition AI (creators of Devin) and released as an RFC by Cursor. It is supported by Cloudflare, Vercel, Google Jules, Amp, OpenCode, and git-ai. The specification is published on GitHub at cursor/agent-trace under the CC BY 4.0 license.
How does Agent Trace relate to context graphs?
Agent Trace is the code-specific implementation of the broader context graph concept. While context graphs capture decision traces across all enterprise operations, Agent Trace focuses specifically on recording the conversational context, reasoning, and AI/human attribution behind code changes in version-controlled repositories.
References
This article is based on insights from the following sources:
- •Cursor / Agent Trace RFC — GitHub Repository (cursor/agent-trace)
- •Foundation Capital — “Context Graphs: AI's Trillion-Dollar Opportunity”
Continue Learning
What is a Context Graph?
The definitive guide to understanding context graphs and their role in AI.
RELATEDDecision Traces Explained
Deep dive into the core data structure that powers context graphs.
TECHNOLOGYModel Context Protocol (MCP)
The open standard for AI agent integration and tool connectivity.
INDUSTRYThe Era of Context
Why context is the new competitive advantage in the AI era.