AgentTrace
also: agent trace · AI authorship record
An AgentTrace is a single structured record of one AI agent's contribution to a commit: the agent, model identifier, files and line ranges changed, an optional prompt excerpt, the commit revision, and an ed25519 signature. It is the atomic unit of AI code provenance — file contents and full prompts are not included.
The atomic unit of provenance
If line-level provenance is the goal, the AgentTrace is the building block. Each trace captures exactly one agent's contribution to one commit, with enough structure to support attribution and policy decisions, and little enough that no sensitive content is exposed.
What an AgentTrace contains
- Agent — the tool that produced the change, e.g. claude-code, cursor, codex.
- Model — the specific model identifier behind the change.
- Files and line ranges — the precise lines attributed to the agent.
- Prompt excerpt — an optional snippet of intent, not the full prompt.
- Commit revision — the exact commit the trace belongs to.
- Signature — an ed25519 signature over the record.
What it deliberately omits
An AgentTrace records metadata, not your code. File contents and full prompts are never stored. That is what lets the record live in git and travel with the repo without creating a new source-code exposure path — provenance you can share with an auditor without sharing the code itself.
Toward a shared standard
As multiple vendors converge on the need for AI authorship records, a shared, cross-vendor trace format becomes valuable — one schema any tool can emit and any reviewer can read. AgentDiff's traces are designed to be vendor-neutral and open, so attribution is not locked to a single agent or platform.
Frequently asked questions
What is in an AgentTrace?+
The agent, model identifier, files and line ranges modified, an optional prompt excerpt, the commit revision, and an ed25519 signature. It does not include file contents or full prompts.
Does an AgentTrace contain my source code?+
No. It records only metadata about authorship. File contents and complete prompts are never stored, which is why the record can safely live in your git history.
Where are AgentTraces stored?+
They are appended to a dedicated git ref (refs/agentdiff/meta) in your own remote, signed with keys your organization controls.
See line-level provenance on a real repo.
AgentDiff records which agent wrote which line, signs it, and keeps it in your git history. Open the live dashboard or book a walkthrough.