If you’re training a coding model or a coding agent, you’ve already used the public code. So has every other lab. The data that’s left, and the data that teaches a model to work like an engineer, is private code with its history attached. Read on to find out the three kinds of code data labs train on, why public repositories aren’t enough, what makes a private codebase useful, what to check before you license one, and where to get it.
The three kinds of code data
| Kind of data | What it teaches a model | Where it falls short |
|---|---|---|
| Public repositories and open code datasets | Syntax, common patterns, how popular libraries get used | Every lab has them, and the license on each repository still applies |
| Benchmarks and expert-written tasks | How to solve a defined problem with a known answer | Small, expensive to write, and a model may have already seen the public ones |
| Private codebases with their history | How a team builds, reviews, breaks and fixes a real product over years | Has to be licensed from the company that owns it, with the rights checked |
The best-known open sets sit in the first two rows. The Stack and CodeSearchNet collect source code from public repositories, and SWE-bench turns real issues from open-source projects into tasks. They’re where most teams start.
Why public repositories aren’t enough
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.
What’s missing is the design argument in a pull request, the incident that led to a refactor, and the three failed approaches before the one that shipped. That record lives inside companies, in the commit history and in the tickets and reviews linked to it.
Coding labs like Magic, Cognition, Poolside and Factory, and frontier labs like OpenAI, Anthropic and Google DeepMind, are all building models and agents that write software. They face the same gap, and public code doesn’t close it.
What makes a private codebase useful
A snapshot of source code with no history is worth little to a training team. Six things raise the value.
- The full commit history. It shows how the code evolved, what broke and how it was fixed.
- Pull requests and code review. They capture what was accepted, what was rejected and why.
- Tickets linked to the code. A linked ticket connects a request to the change that resolved it and to the outcome.
- Design docs, incident notes and runbooks. They record the reasoning behind decisions.
- A setup you can run. CI config, Dockerfiles and setup instructions let you execute the code, which is what makes it usable for agents.
- A production track record. Code that ran real workloads carries real edge cases and real tradeoffs.
The product and the language matter too. A complex product a team built in-house and ran in production is worth more than another simple app, and a private repository in a language that’s thin on public GitHub is worth more than one in a language the models have already seen plenty of. Our guide to what kind of code AI labs pay for covers the languages and signals buyers ask for.
The value is highest when the records link. A ticket, the docs, the code change and the review for the same piece of work let a model follow one job from the request to the merged pull request. Our guide to training data for AI agents covers why that connected record matters.
Training, evaluation and environments are three different uses
Labs do three things with licensed code, and each one is a separate right in the license.
- Training. The model learns from the code and its history.
- Evaluation. The code is held back and used to test the model on work it hasn’t seen. Private code is useful here because it was never public.
- Building environments. A real repository with its tickets becomes a place where a coding agent practices and gets scored. Our guide to what RL environments are covers how that works, and our guide to RL environment companies covers who builds coding environments.
Decide which of the three you need before you negotiate, and get each one named in the agreement.
What to check before you license a code dataset
Code has rights problems other data doesn’t, and they become yours once you train on it. Seven checks cover them.
- Does the company own all of it? Every contributor, contractors and agencies included, should have assigned their work to the company.
- Are the open-source dependencies listed? Permissively licensed libraries are usually fine. Copyleft code and anything that restricts redistribution needs to be identified.
- Are secrets and credentials out of the history, along with customer data in seed files and fixtures?
- Have names and personal details in tickets and commit messages been replaced with pseudonyms?
- Is anything in it under a customer contract or a confidentiality agreement? That stays out.
- Can you run it? Ask for the build and test setup with the code.
- Is the license exclusive, and which uses does it name? Our guide to exclusive vs non-exclusive data licenses covers the tradeoff.
Our guide to rights-cleared training data covers what clearing a dataset takes in every category.
Where to get code datasets
You have three routes, and most labs use all of them.
- Start with open datasets and public repositories. They’re free and large, and every other lab has them.
- Pay engineers to write tasks. Experienced developers write problems, solutions and tests to your brief. You control the format, and every hour is billed. Our guide to AI data collection companies covers the vendors that work to order.
- License private codebases from the companies that built them. Operating companies hold years of engineering history and license it selectively (a retired product line, a legacy system that’s been replaced, an internal tool with years of tickets behind it). Our guide for companies on how to sell source code to AI labs covers the owner’s side.
Where Troveo fits
Troveo is a data licensing marketplace, and we’ve paid rights holders more than 20 million dollars. Our business data program covers code alongside documents, messages and operating systems. Companies can license their codebases through us with the history attached, after contributor rights are confirmed, open-source dependencies are listed, and secrets and personal details are out. You see an anonymized snapshot of what a company holds before anything is exported, and you sign one agreement with us. Tell us what your coding model needs to learn from and we’ll show you what we hold.
