Yes, you can sell your source code to AI companies, and in 2026 there's a real market for it. Frontier labs have consumed most of the public internet and most open-source code, so they're now paying for what never made it onto public GitHub (private repositories with real commit history, the tickets and design docs around them, and the workflows that show how a team built and ran software). Startups winding down are the most visible sellers, and operating companies with years of engineering history can license selectively too. Read on to find out what buyers want, how codebases get priced, what you have to clear before anything ships, and how to get a first read on what you hold.
Why AI labs want private code now
The last generation of coding models learned from public repositories. Labs want the next generation to work like an engineer (take a vague ticket, read an unfamiliar codebase, make a change, survive code review, and fix what breaks in production). Public code teaches the syntax. It doesn't teach the process, because the process was never published. Labs are after the design argument in a pull request, the incident that led to a refactor, and the three failed approaches before the one that shipped. Our guide to where AI labs source training data maps that as one of the sourcing channels.
The market moved fast on this. In late 2025 Turing launched a program to acquire full private repositories, design docs, testing logs, and internal wikis from defunct startups. Closure platforms now broker code and workspace archives from companies shutting down, and research labs buy them to build realistic environments where agents practice real engineering work. This is the code-shaped corner of a broader shift toward enterprise operational data, and the same logic applies. Buyers pay for how work happened, and files on their own show little of it. If you've built those practice environments yourself, our guide to how to sell RL environments to AI labs covers what labs pay for them.
What sells is a codebase with its history
A snapshot of source code with no history is worth little to a lab, because there's already a lot of code in the world. Buyers pay for production history and the context that travels with it.
| Asset | Why buyers pay for it |
|---|---|
| Full commit history | Shows how the code evolved, what broke, and how it was fixed |
| Pull requests and code review | Captures engineering judgment (what was accepted, rejected, and why) |
| Issues and tickets linked to code | Connects a request to the change that resolved it and the outcome |
| Design docs, incident notes, runbooks | Records the reasoning behind decisions, which public code never includes |
| CI config, Dockerfiles, setup instructions | Lets a buyer run the code, which is what makes it usable for agents |
| Production track record | Code that ran real workloads carries real edge cases and real tradeoffs |
Half of that table is workflow data (the trail of tickets, reviews, discussions, and decisions around the code). If you've ever asked whether you can sell your company's workflows to AI labs, this is the answer. A repository plus the Jira or Linear history plus the engineering chat that references both is a workflow trajectory in raw form, and it's worth considerably more as a connected package than as three separate exports. Our guide to what kind of code AI labs pay for covers the languages buyers prefer and what raises the price.
How codebases are priced
There's no universal price per repository, and anyone quoting one without seeing your code is guessing. What the market has published gives you a floor and a shape. One codebase-buying platform lists a 5,000 dollar baseline per repository, adjusted up or down after grading. SimpleClosure, which brokers assets from shuttering startups, has told reporters its deals run from about 10,000 to 100,000 dollars and that it handled roughly a hundred of them in a year. At the top of the range, one founder reported hundreds of thousands of dollars for a company's complete dataset, code included. Those are reported figures from a young market, and most of them describe defunct-company sales rather than licenses from operating businesses.
Six things move the number, and they're consistent across buyers:
- how much production history the code carries
- how much surrounding context comes with it (tickets, reviews, docs, chat)
- how clean the rights are
- how unique the domain is (a fintech ledger or a logistics routing engine beats another CRUD app)
- whether the buyer can run it
- whether the license is exclusive
Buyers price a single repository as a repository. They price a whole engineering organization's history, connected across systems and spanning years, as an operational archive, which is a different conversation. Our guide to how AI data licensing deals work covers the mechanics behind those structures, and our breakdown of what AI training data costs gives the buyer's view of the same factors.
You license the code and keep it
For an operating company, "selling your code" almost always means licensing it. You keep ownership and keep running your product, and you grant a defined right to use the code and its history for defined purposes, for a defined period, exclusively or not. A non-exclusive license leaves you free to license again and to keep building. An exclusive one commands a premium and stops you signing other deals for the term. Permitted uses matter too, because training, evaluation, and environment construction are different rights with different prices. The one case where an outright sale is common is a shutdown, where the company has no further use for the code and the buyer wants a clean transfer. Our guide to selling data to AI companies covers licensing vs selling in more depth, and the same rules apply to code.
Rights you have to clear first
Code has rights problems that a video archive doesn't, and serious buyers check every one of them. You can only license what you own, so the first question is about ownership. Did every contributor, including contractors and agencies, assign their work to the company? Open-source dependencies come next. Permissively licensed libraries are usually fine to leave in place; copyleft code and anything under a license that restricts redistribution needs to be identified and handled, and a dependency inventory is part of any credible package. Then the contents. Secrets and credentials in history and customer data in seed files or fixtures have to come out, and personal information in tickets and commit messages gets replaced with pseudonyms to mask identities. Third-party confidential material, anything under a customer contract, and regulated data stay out. The same principle governs rights-cleared training data in every other category. The buyer's legal exposure depends on your diligence, so the diligence is part of what they're paying for. If your code was written for clients, our guide to what agencies and consultancies can license to AI labs covers what you own and what your clients own.
Two kinds of seller
Most of the code deals reported so far involve startups that shut down, because a defunct company can transfer everything cleanly and has every reason to. If that's you, package the full history (every branch, every commit) and gather the docs and tickets before the SaaS subscriptions lapse and the archives disappear. Our owner's guide to licensing company data for AI lays out the step-by-step process from inventory through rights review to deal structure. If you're winding down right now, our guide to selling your code and data to AI labs when shutting down walks through what to export first, what buyers check, and how long it takes.
The larger and less visible opportunity is the operating company with a decade of engineering history and no intention of going anywhere. Those companies license selectively (a retired product line, a legacy system that's been replaced, an internal tool with years of tickets behind it) under a non-exclusive license with clear exclusions. If a process starts with "give us your whole GitHub org," walk away. You define what's in scope, what's excluded, and what safeguards apply. Our guide to how tech startups and SaaS companies can license their data to AI covers what the rest of that company's stack is worth, beyond the code.
What about evaluation datasets and tasksets?
Evaluation datasets and tasksets are a related product with a different business behind it. Labs pay domain experts to write tasks, grade outputs, and produce reasoning traces, which is a services model, and it's the business of the RL environment and evaluation companies. An operating company's data enters that market as the raw material. Real tickets with verified resolutions, real support cases with outcomes, and real engineering tasks with the code change that closed them are the inputs environment builders use to make their tasks realistic. If you hold production tasks with recorded outcomes, they belong in the same inventory as your code, and buyers price them as workflow data.
How much is your code worth?
It depends on history, context, rights, and domain. The quickest way to get a first read is to take Troveo's free, five-minute data value assessment (ten questions about your company's systems and history). It returns a score for the AI-training value of what you have, code and engineering workflow included, and it starts the inventory you'd need anyway (repositories, years of history, ticketing and docs systems, and how much of it connects).
Where Troveo fits
Troveo helps companies understand what proprietary data they hold, protect what matters, and selectively license what's valuable. We've paid more than 20 million dollars to rights holders across video, audio, gaming, robotics, and text, and our business data program covers code and structured data alongside communications, documents, and operational systems. We run the process from inventory and rights review through scoping, privacy review, and packaging to buyer matching, and you decide what's in and what's out at every step. Your company is never named publicly, and you get paid on every sale. Start with the data value assessment, or talk to us about what your engineering history might be worth.
