Nubank splits its ETL monolith with Devin coding agents
Nubank had to break an eight-year-old ETL monolith into sub-modules, so it fine-tuned Cognition's Devin agent on its engineers' past migrations and let the agent move the data classes.
NubankBrazil, Mexico, and ColombiaBankingIn production
- Scale
- About 100,000 data class implementations in an ETL repository of over 6 million lines of code
- Scenario
- Large-scale code migration
- Business function
- Software engineering
- Kind of solution
- Software engineering assistant
- Who built it
- Built with a partner (Cognition)
- Human oversight
- People approve each output
- Organization
- Enterprise, part of Nu Holdings
- AI types
- Generative AI, Agentic AI
- People served
- over 110 million customers
tl;drDevin cut engineering hours per data class migration 8-12x and migration cost over 20x.See the results
Nubank uses Devin, Cognition’s autonomous AI coding agent, to split its core ETL monolith into smaller sub-modules1. Engineers delegate each data class migration to the agent and approve its changes1.
The ETL repository held over 6 million lines of code, and the migration covered about 100,000 data class implementations1. Engineering hours per data class migration fell 8-12x, and the cost of the delegated work fell over 20x1.
In September 2026, Cognition opened its first Latin American office in São Paulo and described the Nubank migration as going from years to weeks2, 3.
Before the deployment
Nubank’s core ETL had grown for eight years as one centralized monolith1. Customer growth and expansion beyond the original credit card business left it entangled, with countless cross-dependencies1.
- Slow transformations: Business-critical data transformations took longer and longer to run, with chains of dependencies as deep as 701.
- Ownership: Too few formal agreements set out who maintained what1.
- Size: The repository held over 6 million lines of code, and the ETL had become a primary bottleneck to scale1.
- Planned effort: The migration scope involved more than 1,000 engineers moving about 100,000 data class implementations over an expected 18 months1.
Each data class move meant tracing imports, performing several delicate refactoring steps and handling edge cases1. When the project started in 2023, engineers made these code changes by hand1.
In late 2023, Nubank’s CTO sent a direct message on X to Cognition’s CEO, while Cognition was still a research lab with a first Devin prototype3. Nubank became Cognition’s first enterprise customer3.
What was built
Nubank runs many Devin sessions in parallel, each on one migration sub-task, after a one-time effort to teach the agent how to approach those sub-tasks1. Cognition calls the result the Custom ETL Migration Devin, a version fine-tuned on Nubank’s own past migrations1.
- Devin: Moves each data class implementation to the sub-module architecture, traces its imports, performs the refactoring steps and handles edge cases1.
- Scripts that Devin wrote: Run the most common mechanical steps. One script detects a data class’s country extension, br, co or mx, from its file path in a single step1.
- Engineers: Delegate migrations to Devin, review its changes, make minor adjustments and merge the pull request1.
- Project lead: A person manages the project and approves Devin’s changes1.
“Devin provided an easy way to reduce the number of engineering hours for the migration, in a way that was more stable and less prone to human error.”
Alternatives considered
- Manual refactoring across the engineering organization: The original plan, a multi-year effort that spread the repetitive work over more than one thousand engineers1.
- A conventional script: Ruled out, because each data class migration involved variations, edge cases and ad hoc decisions that were too complex to script1.
Within weeks of Devin’s launch, Nubank saw a way to accelerate the refactor at a fraction of the engineering hours1.
Technology and architecture
- AI component
- Data
- Trigger or control
- Handoff to people
- Feedback
Devin is an autonomous AI software engineer that writes, runs and tests code5. People can follow its work and take over in its embedded IDE5. At Nubank, Cognition fine-tuned it on examples of the bank’s own migrations, because the task had a vast number of variations1.
| Layer | What they used | Role | Source |
|---|---|---|---|
| Task agent | Custom ETL Migration Devin | Moves each data class to the new sub-module architecture, tracing imports and handling edge cases | 1, 5 |
| Tools and actions | Scripts written by Devin | Run the most common mechanical steps, such as detecting a data class’s country extension, in one step | 1 |
| Offline evaluation | Benchmark evaluation set | Held-out past migrations that score Devin’s task completion and speed | 1 |
| Business or operational system | Core ETL repository | The monolith that Devin splits into sub-modules | 1 |
| Review workbench | Engineer review of Devin’s changes | Engineers review each change, make minor adjustments and merge the pull request | 1 |
Data inputs
- ETL repository code: The data class implementations that Devin moves, each marked by country in its file path1.
- Past manual migrations: Examples that Nubank engineers had migrated by hand, collected by the Nubank team. Some of them fine-tuned Devin1.
- Benchmark evaluation set: The rest of those examples, held out to score Devin’s task completion and speed1.
Devin also built itself classical tools and scripts for the most common mechanical parts of the migration, and the gains added up across tens of thousands of sub-tasks1.
How one data class migrates
- An engineer delegates a data class migration to Devin1.
- Devin reads the data class in the ETL monolith and traces its imports1.
- Devin runs its own script to detect the country extension from the file path1.
- Devin performs the refactoring steps that move the class to its sub-module, and handles the edge cases1.
- The engineer reviews Devin’s changes and makes minor adjustments1.
- The engineer merges the pull request1.
Results
Data, Collections and Risk were among the business units that verified and completed their migrations in weeks instead of months or years1.
| Metric | Before | After | Scope and timeframe | Reported by |
|---|---|---|---|---|
| Engineering time efficiency per data class migration | Not disclosed | 8-12x | Data class migration tasks delegated to Devin, 2023-2024 ETL migration | Cognition, measured1 |
| Cost savings on the migration scope delegated to Devin | Not disclosed | over 20x | The scope of the migration delegated to Devin | Cognition, estimate1 |
| Time per migration sub-task after fine-tuning | Roughly 40 minutes | 10 minutes | Benchmark evaluation set of past manual migrations | Cognition, measured1 |
| Devin’s task completion scores after fine-tuning | Not disclosed | doubled | Benchmark evaluation set of past manual migrations | Cognition, measured1 |
- Efficiency: Compares the typical engineering hours for one data class migration task with the hours engineers spent prompting and reviewing Devin on the same task1.
- Cost: Compares the cost of running Devin with the hourly cost of an engineer doing the same task, on the scope of the migration delegated to Devin1.
- Fine-tuning: On the benchmark evaluation set, task completion scores doubled and task speed rose 4x. Each sub-task fell from roughly 40 minutes to 10 minutes1.
In September 2026, Cognition described the Nubank migration as going from years to weeks at over 20x lower cost2. Cognition’s head of strategy and operations for Latin America, Guilherme Grupenmacher, said that the Nubank migration with Devin was one of the fastest in the bank’s history3.
Lessons learned
The task suited an agent because it repeated one discretionary change about 100,000 times1. Cognition’s lesson is that after a small, fixed cost to teach Devin the sub-tasks, a migration of this kind can run autonomously1.
Holding out part of the past migrations as a benchmark gave the team a measure of what fine-tuning changed1.
Devin needed a learning period. In its first weeks, it often left errors to fix and small problems it couldn’t solve, and it avoided rabbit holes more often as it saw more examples1.
People stayed in the loop for every change. Engineers still review Devin’s changes and make minor adjustments before they merge them, which moved their work from writing each migration to reviewing it1.
Cognition’s own accounts give different figures. The customer story’s headline gives 8x and its overview 12x, and it puts the original scope at more than 1,000 engineers over 18 months1. ZenML’s summary of a 2026 talk by a Cognition deployed engineering lead describes a project staffed with 50 engineers that finished in about one-third of the planned timeline4.
Every figure is Cognition’s own, from its customer story, its blog and its talk1, 2, 4. ZenML calls the talk’s examples selective success stories, and says that pull request counts and timeline reductions might not capture code quality, maintainability or technical debt4.
Case study scorecard
- 8-12x Engineering time efficiency per data class migration1
- over 20x Cost savings on the migration scope delegated to Devin1
- 10 minutes Time per migration sub-task after fine-tuning1
- doubled Devin's task completion scores after fine-tuning1
Sources by publication date
- Vendors and partners 3
- Press, academic, and regulators 2
Build this solution yourself
Analysis
What you need
- A record of the task done by hand: Nubank’s engineers had already migrated data classes manually, which gave examples to fine-tune Devin and a held-out set to test it1. Check that you have enough finished examples to teach and measure an agent.
- One change that repeats many times: The migration repeated the same kind of move about 100,000 times, so the fixed cost of teaching the agent spread over tens of thousands of sub-tasks1.
- Engineers who review each change: Every Devin change went to an engineer who reviewed, adjusted and merged it1. You need reviewers who know the codebase well enough to approve the agent’s work at that volume.
Reference architecture
Software engineering assistant
A software engineering assistant writes, reviews, tests, or migrates code in the tools that developers already use, and a developer approves its output. A language model writes a change, a test, or a review comment from the code for a task, and automated checks and a checker model build, test, and filter it. A reviewer approves each checked proposal in code review before it merges, and developers do the work that fails the checks by hand.
- Developer tools
- Assistant platform
- Code repository (documented in this case study)
- Code index
- Deterministic code analysis
- Standards and guidelines
- Code and platform map
- Prompts and context
- Language model
- Automated checks
- Checker model
A check mark shows a building block that this case study's sources document.
Open the reference architectureOthers who built it
- Uber: How Uber scaled coding agents and cut cost per session. Cost per agent session fell 52% from its June peak as weekly agent requests grew 9.4x.
- Pictet Group: Pictet takes Claude Code from developers to business teams. About 700 Pictet staff now use Claude Code and Cowork, and prototypes take 2 hours, not 2 weeks.
- TUI Group: TUI cuts external IT staff with AI coding assistants. TUI's external IT workforce fell from thousands to maybe 30 or 50 as its developers coded with AI.
- eBay: eBay's Copilot pilot cut pull request merge time by 17%. Developers with Copilot cut pull request merge time 17% in eBay's 300-developer A/B test.
- Meta: Meta's just-in-time LLM tests catch bugs before code lands. JiTTests helped catch 74 serious privacy bugs at Meta before they landed in the first half of 2026.
- Deutsche Bank: AI coding assistants speed up software work at Deutsche Bank. Developers save an estimated 1.5 to 2.5 hours per week and report 10x gains on some tasks.
Cite this case study
Enterprise AI Case Studies. "Nubank splits its ETL monolith with Devin coding agents." Updated Nov 25, 2026. https://case-studies.ai/case-studies/engineering-and-research/ER-048-etl-monolith-code-migration-nubank/
@misc{csai-er-048,
author = {{Enterprise AI Case Studies}},
title = {{Nubank splits its ETL monolith with Devin coding agents}},
year = {2026},
note = {Updated 2026-11-25},
url = {https://case-studies.ai/case-studies/engineering-and-research/ER-048-etl-monolith-code-migration-nubank/}
}Sources
The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership
- Source 1:
How Nubank refactors millions of lines of code to improve engineering efficiency with Devin
Supporting excerpts (38)
Nubank is the largest financial technology bank in Latin America, serving over 110 million customers across Brazil, Mexico, and Colombia since its founding in 2013.
One of Nubank's most critical, company-wide projects for 2023-2024 was a migration of their core ETL
an 8 year old, multi-million lines of code monolith
To handle such a large refactor, their only option was a multi-year effort that distributed repetitive refactoring work across over one thousand of their engineers.
engineers were able to delegate Devin to handle their migrations and achieve a 12x efficiency improvement in terms of engineering hours saved, and over 20x cost savings
Among others, Data, Collections, and Risk business units verified and completed their migrations in weeks instead of months or years.
geographic and product expansion beyond their original credit card business, led to an entangled, behemoth ETL with countless cross-dependencies
business critical data transformations started taking increasingly long to run, with chains of dependencies as deep as 70 and insufficient formal agreements on who was responsible for maintaining what
it became clear that the ETL would be a primary bottleneck to scale
split up their monolithic ETL repository, amassing over 6 million lines of code, into smaller, more flexible sub-modules
Moving each data class implementation from one architecture to another while tracing imports correctly, performing multiple delicate refactoring steps, and accounting for any number of edge cases was highly tedious
the total migration scope involved more than 1,000 engineers moving ~100,000 data class implementations over an expected timeline of 18 months
At project outset in 2023, Nubank had no choice but to rely on their engineers to perform code changes manually.
Migrating one data class was a highly discretionary task, with multiple variations, edge cases, and ad hoc decision-making
far too complex to be scriptable, but high-volume enough to be a significant manual effort
The Decision: an army of Devins to tackle subtasks in parallel
Within weeks of Devin's launch, Nubank identified a clear opportunity to accelerate their refactor at a fraction of the engineering hours.
after investing a small, fixed cost to teach Devin how to approach sub-tasks, Devin can go and complete the migration autonomously
A human is kept in the loop just to manage the project and approve Devin's changes.
The Solution: Custom ETL Migration Devin
A task of this magnitude, with the vast number of variations that it had, was a ripe opportunity for fine-tuning.
The Nubank team helped to collect examples of previous migrations their engineers had done manually, some of which were fed to Devin for fine-tuning. The rest were used to create a benchmark evaluation set.
Against this evaluation set, we observed a doubling of Devin's task completion scores after fine-tuning, as well as a 4x improvement in task speed.
Roughly 40 minutes per sub-task dropped to 10
Devin contributed to its own speed improvements by building itself classical tools and scripts it would later use on the most common, mechanical components of the migration.
based on its file path was a few-step process for each sub-task
Devin's script automatically turned this into a single step executable
improvements from which added up immensely across all tens of thousands of sub-tasks
In the first weeks, it was common to see outstanding errors to fix, or small things Devin wasn't sure how to solve.
as Devin saw more examples and gained familiarity with the task, it started to avoid rabbit holes more often and find faster solutions to previously-seen errors and edge cases
Devin provided an easy way to reduce the number of engineering hours for the migration, in a way that was more stable and less prone to human error.
Rather than engineers having to work across several files and complete an entire migration task 100%, they could just review Devin's changes, make minor adjustments, then merge their PR
Jose Carlos Castro, Senior Product Manager
8-12x efficiency gains
This is calculated by comparing the typical engineering hours required to complete a data class migration task against the total engineering hours spent prompting and reviewing Devin's work on the same task.
Over 20x cost savings on scope of the migration delegated to Devin
This is calculated by comparing the cost of running Devin versus the hourly cost of an engineer completing that task.
engineering time efficiency gain
- Source 2:
Building the Future of Software Engineering in Latin America
Supporting excerpts (3)
we announced Cognition's expansion into Latin America
Some of the region's most demanding engineering teams already build with Devin: banks like Itaú, Nubank, and Santander
At Nubank, Latin America's largest digital bank with roughly 140 million customers, Devin took a multi-million-line monolith migration from years to weeks, at over 20x lower cost.
- Source 3:
Com mais de 10 grandes clientes no Brasil, Cognition se apronta para escalar
Supporting excerpts (5)
A Cognition, startup de IA para engenharia de software, abriu seu primeiro escritório na América Latina, localizado em São Paulo.
no fim de 2023, quando a Cognition ainda era um laboratório de pesquisa com o primeiro protótipo do Devin, o CTO do Nubank mandou uma mensagem direta ao CEO da empresa no X
O banco digital virou o primeiro cliente enterprise da história da companhia.
o Nubank fez com o Devin uma das migrações mais rápidas da própria história
Guilherme Grupenmacher, head de Estratégia e Operações da empresa para a América Latina
- Source 4:
Cognition: Deploying AI Agents at Enterprise Scale with Forward-Deployed Engineering
Supporting excerpts (4)
The presentation by Gia, a deployed engineering lead, provides insight into how Cognition operationalizes AI agents in production environments
Nubank, a major Latin American financial institution, had an ETL migration project staffed with 50 engineers. Cognition delivered the migration in approximately one-third of the planned timeline using Devin autonomously.
The case studies presented are selective success stories, and we do not see failure modes, challenges encountered, or situations where the approach did not work well.
The reliance on metrics like PR counts and timeline reductions, while practical, may not capture important dimensions like code quality, maintainability, or technical debt.
- Source 5:
Supporting excerpts (2)
Devin is an autonomous AI software engineer that can write, run and test code.
Devin is designed to be a conversational user interface, and allows you to follow and take over Devin's development process in the embedded IDE.
Comments
Start the conversation.
Invited members of the library comment here. Sign in to join the conversation.