Open-Source AI Agent Code Copying Disputes: Provenance and License Compliance
Code similarity alone does not settle an open-source AI agent dispute. This article explains how to assess code provenance through textual, structural, historical, and dependency evidence, review license obligations, preserve evidence during disputes, and integrate SBOMs, software composition analysis, and compliance gates into development workflows.
1. The Real Issue: Not Just Similarity, but Compliance
Public discussions of alleged copying in open-source AI agent projects often focus on subjective observations such as similar interfaces or overlapping features. From an engineering and legal perspective, the more useful distinction is this: code similarity is evidence to investigate; compliance with the original license’s attribution, notice, and modification requirements is central to the conclusion.
General-purpose agent projects commonly share several architectural elements:
- A unified, extensible mechanism for loading skills.
- Abstraction layers for tool invocation and model orchestration.
- Persistent conversations and memory.
- Scheduled tasks and messaging gateways.
These designs have converged across the industry, so independently developed implementations may have similar structures. Allegations therefore require reproducible evidence, not visual impressions alone.
2. Building an Evidence Chain: Four Layers
2.1 Textual Evidence
Residual text is often the easiest evidence to discover and the hardest to explain: comments, log messages, error strings, sample configurations, or even distinctive spelling mistakes and author initials from the original project.
Such details generally have no functional reason to appear verbatim in an independent implementation. They can therefore provide strong clues about provenance.
2.2 Structural Evidence
Abstract syntax tree comparisons, control-flow graph isomorphism checks, function boundaries, and naming patterns can help identify code that has been copied and then renamed or superficially rewritten.
Locality-sensitive hashing techniques are also used for large-scale approximate matching. The following example illustrates a SimHash-based approach:
import hashlibfrom collections import Counterdef shingles(text: str, k: int = 5):tokens = text.split()return [" ".join(tokens[i:i + k]) for i in range(len(tokens) - k + 1)]def simhash(text: str, k: int = 5, bits: int = 64) -> int:vector = [0] * bitsfor gram in shingles(text, k):h = int(hashlib.md5(gram.encode()).hexdigest(), 16)for i in range(bits):vector[i] += 1 if (h >> i) & 1 else -1out = 0for i in range(bits):if vector[i] > 0:out |= 1 << ireturn outdef similarity(a: str, b: str) -> float:ha, hb = simhash(a), simhash(b)return 1 - bin(ha ^ hb).count("1") / 64
Similarity scores must be interpreted carefully. Formatting changes, language ports, and framework rewrites can reduce textual similarity without establishing independent authorship. Structural comparisons should therefore be combined with repository history rather than treated as standalone proof.
2.3 Historical Evidence
Commit timelines can be among the strongest sources of evidence. Relevant questions include:
- In what order did files first appear?
- How large was the initial commit?
- Were many files imported at once, with little evidence of incremental development?
- Was author metadata uniformly rewritten?
Projects developed over time typically show repeated, incremental changes. A bulk import deserves investigation, although the timeline must be assessed alongside the other evidence.
2.4 Dependency and Build Evidence
Lockfiles, dependency mirror settings, build scripts, cache directory names, and residual paths in packaged artifacts can reveal the original engineering environment.
This layer is frequently overlooked, yet it can be decisive in tracing where a codebase came from.
3. License Obligations Must Be Checked Individually
Different license families impose different requirements. The following table provides a high-level comparison; the applicable license text determines the precise obligations.
| License family | Attribution and notices | Modification notices | Copyleft scope | Network-service provisions |
|---|---|---|---|---|
| Permissive, such as MIT and BSD variants | Retain copyright and license notices | Generally not required | None | None |
| Permissive with an explicit patent grant, such as Apache 2.0 | Retain required notices | Mark modified files | None | None |
| Weak copyleft, such as LGPL variants | Retain required notices | Identify modifications as required | Library-level obligations | None |
| Strong copyleft, such as GPL variants | Retain required notices | Identify modifications as required | Covered derivative work as a whole | No network-use-only trigger |
| Network copyleft, such as AGPL variants | Retain required notices | Identify modifications as required | Covered derivative work as a whole | Source-access obligations can apply to modified software used over a network |
Two points matter especially.
First, permissive licenses generally do not require derivative code to be released as open source. However, removing required copyright or license notices is itself a compliance violation and can jeopardize the permission to use the code.
Second, for network-copyleft licenses, “we do not distribute it; we only provide an online service” does not necessarily avoid source-code obligations. The relevant license provisions must still be reviewed.
4. Why Deleting Accounts Does Not Resolve a Dispute
Deleting a repository or closing an account is a technical governance anti-pattern. It can destroy commit history, weaken the team’s ability to demonstrate independent development, and potentially raise concerns about evidence destruction.
A more defensible response follows a structured process:
- Freeze and preserve. Pause distribution of the affected versions and preserve complete repository history and snapshots of build artifacts.
- Commission an independent comparison. Have a party without a conflict of interest review structural and historical evidence and produce a reproducible report.
- Classify the findings. Distinguish among independently implemented functionality, reuse without required attribution, and a substantially derivative implementation.
- Remediate. Restore attribution and license notices, publish modification notices, and, where required, release the corresponding source code under the original license or replace the implementation.
- Improve the process. Introduce automated compliance gates to reduce the likelihood of recurrence.
5. Enterprise Risk Controls: SBOMs, Composition Analysis, and Gates
For enterprises, the central risk is not whether open source is used, but whether that use is visible and controllable. Three practical layers can support that goal.
Layer 1: Software Bill of Materials
The build pipeline should generate a software bill of materials (SBOM) for each release. It should record component names, versions, licenses, sources, and hashes, then archive the results in object storage to establish a traceable release baseline.
Layer 2: Software Composition Analysis Gates
Software composition analysis (SCA) in continuous integration can scan source code and dependencies for license classifications and known vulnerabilities. Policy violations should block merging.
The following platform-neutral example illustrates the intended gate rather than a specific CI platform’s syntax:
# Platform-neutral illustration of a pipeline compliance gatestages:- name: license-gatesteps:- run: sca scan --license-policy ./policy.yml --fail-on violation- run: sbom generate --format spdx --output dist/sbom.spdxrules:- on: pull_requestaction: block_merge
Layer 3: License Allowlists and Exception Approval
Classify licenses as allowed, requiring review, or prohibited for the relevant use case. Exceptions should be documented and assigned a review interval.
allow: [MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0]review: [LGPL-2.1, LGPL-3.0, MPL-2.0]deny: [GPL-3.0, AGPL-3.0] # Example policy for closed-source distribution
Supporting controls should include signed commits, protected branches, and mandatory code review on the code-hosting platform. Logs and monitoring alerts should feed into a centralized logging service so that large code imports remain auditable.
When using cloud container platforms and pipeline services, make these gates release prerequisites rather than post-release cleanup tasks.
6. A Compliance Checklist for In-House Agent Projects
Enforce License Headers
Maintain consistent license identifiers and copyright lines in source-file headers, using templates and checks to enforce them.
The following script checks for an SPDX license identifier in the first five lines of Python and TypeScript files:
#!/usr/bin/env bashset -euo pipefailmissing=0while IFS= read -r f; dohead -n 5 "$f" | grep -q "SPDX-License-Identifier" || { echo "Missing license identifier: $f"; missing=1; }done < <(find src -name '*.py' -o -name '*.ts')exit $missing
Apply the Checklist Beyond Source Code
- When studying open-source implementations, distinguish borrowing design ideas from copying implementation text. If code is reused, preserve its provenance and document modifications.
- Include skills, prompt templates, and sample datasets in license management. Compliant code does not automatically make the accompanying assets compliant.
- Before external distribution, review the complete SBOM and retain the review record.
- Establish a dispute-response plan that assigns responsibility for evidence preservation and defines consistent external communications.
7. Conclusion
The open-source AI agent ecosystem depends on respecting license terms. Disputes should be resolved through a complete evidence chain and an assessment of applicable obligations—not through public attention or superficial similarity.
Deleting history or closing accounts only makes the situation harder to evaluate. For developers and teams, integrating SBOMs, composition analysis, and license gates into everyday pipelines is a practical, cost-effective way to protect both their projects and the open-source work they depend on.
