agentdiff is an open-source, Rust-based provenance tracking tool designed to establish Git-native attribution for AI-generated code. Created by Prakhar (codeprakhar25), it records which specific AI coding assistant modified or authored each line of code, binding that metadata cryptographically into the repository's native history. In day-to-day operations, agentdiff works alongside local agents and development environments either via CLI commands or as a Model Context Protocol (MCP) server. It captures attributions across leading coding tools including Claude Code, Cursor, GitHub Copilot, Codex, Windsurf, OpenCode, and Gemini. Every line attribution is signed with ed25519 keys, ensuring verifiable and tamper-evident records stored directly in Git. Unlike traditional git-blame or generic CI logging, agentdiff differentiates between human edits and multiple distinct AI agents at the line level. By embedding cryptographic signatures into Git without requiring external database dependencies, teams maintain persistent authorship records across complex multi-agent workflows. agentdiff is open source and dual-licensed under Apache 2.0 and MIT.
Git-Native Code Provenance — Records line-by-line AI agent authorship directly within git history metadata without external databases. - Ed25519 Cryptographic Signatures — Signs all attribution records cryptographically to provide tamper-evident proof of authorship. - Multi-Agent Compatibility — Tracks edits originating from Claude Code, Cursor, Copilot, Codex, Windsurf, OpenCode, and Gemini. - Model Context Protocol (MCP) Server — Offers MCP integrations to allow agent harnesses to inspect and append provenance during autonomous execution. - Rust Implementation — Delivered as a high-performance, compiled native binary with minimal CLI execution overhead.
Use cases
Use Case: AI Compliance and IP Audits Organizations with IP compliance policies or regulatory review requirements can verify exactly which lines of code were generated by automated models versus human engineers using signed Git metadata.
Use Case: Multi-Agent Collaboration Tracking Engineering teams utilizing multiple AI tools—such as Cursor for IDE editing and Claude Code for background tasks—can differentiate which tool introduced a specific pattern or refactor across commit histories.
Use Case: Contextual Agent Handoffs via MCP Coding agents connected via MCP can query agentdiff to inspect previous agent actions and authorship contexts before refactoring or fixing regressions in generated blocks.
Who it is for
agentdiff is designed for software teams, security engineers, and open-source maintainers who utilize AI coding agents and require auditable, cryptographic provenance for generated code. It is less suited for solo hobby developers who do not need formal authorship auditing or multi-agent lineage tracking.
Install guide
Installation Install agentdiff using the official shell script or compile directly from source using Cargo: bash # Via installation script curl -fsSL https://raw.githubusercontent.com/codeprakhar25/agentdiff/main/install.sh | bash # Or build from source cargo install --git https://github.com/codeprakhar25/agentdiff
First Run Initialize agentdiff in your local Git repository to configure cryptographic signing keys: bash cd /path/to/your/repo agentdiff init
Example Session Inspect AI attributions or start the MCP server interface: bash # Check line-level AI attribution on a specific file agentdiff blame src/main.rs # Start the MCP server for agent integration agentdiff mcp
Continue — Continue is an open-source AI code assistant and agent framework originally developed by the Continue team (continuedev) and recently acquired…
Agentless — Agentless is an open-source automated software development framework developed by OpenAutoCoder. Unlike complex multi-agent architectures that rely on autonomous exploration…
Amp — Amp (developed by AmpCode) is an autonomous coding agent platform and remote development harness designed to execute software engineering tasks…
Cline — Cline is an open-source autonomous coding agent runtime maintained by Cline Bot Inc. and an active open-source community. Available as…
Kiro — Kiro is an agentic engineering platform and CLI coding agent built and operated by AWS. It extends beyond standard code-completion…
OpenHands — OpenHands (formerly OpenDevin) is an open-source autonomous AI software development agent and orchestration platform. It provides an extensible runtime environment…