What Alberta found when it pointed 50 agents at its own code
Janak Alford, Alberta’s deputy minister of technology and innovation, was sitting on stage at Upper Bound in Edmonton in May while his laptop ran an agent on the other side of the room.
The agent had been working 18 of the previous 24 hours on a question a colleague had called Alford, Alberta’s deputy minister of technology and innovation, about the morning before. She wanted to know how Alberta’s approach to reducing red tape compared to every other province’s without gutting what the underlying laws were designed to do.
Six months ago, that kind of comparative analysis took six to nine months of consulting work. Alford’s agent was still building the proof of concept on his laptop while he answered questions on stage.
Last week, Alberta made the method public. On July 6, the province released 21 technical documents called The Velocity White Papers that walk through how they pointed AI agents at their entire codebase, what came back, and how the province is using the results to find vulnerabilities and rebuild legacy systems.
Anthropic, the AI company whose Claude models powered the audit, published a case study on the project the same day, laying out the scan totals, timelines, and rebuild figures underneath the announcement.
The audit that produced the documents scanned 466 million lines of code and found that a system of 1,280 applications was really doing about 700 things. The rest were doing work other ministries were already doing.
That finding is where the rebuild starts, and it’s what most large organizations sitting on decades of code haven’t yet done for themselves.
Alberta pointed the agents at itself first
The audit that produced the papers ran earlier in 2026, before Alford came to Upper Bound.
Alberta’s ministry of technology and innovation runs the digital infrastructure behind all 27 provincial ministries, including case management tools, benefits portals, registries, and cybersecurity systems. Everything from wildfire response to social services to public safety sits on top of it.
That works out to roughly 1,280 applications and 3,400 code repositories, as per the Anthropic case study. Many had never been through a systematic security review.
“Nowhere, I think, are the tools needed more and more urgently than in the public service,” said Alford.

The audit was a separate project from the overnight demo Alford was running from his laptop on stage in Edmonton. Roughly 50 agents ran in parallel across the ministry’s infrastructure using Claude Code with Opus and Sonnet models. They scanned 466 million lines of code in about 20 hours. Anthropic’s own estimate for a human-led equivalent is 6.5 years.
Roughly 50 agents ran in parallel using Claude Code with Opus and Sonnet models. They scanned 466 million lines of code in about 20 hours. Anthropic’s own estimate for a human-led equivalent is 6.5 years.
Alberta says applying AI agents to legacy systems can cut modernization time by as much as 95% and speed delivery by up to 20 times. It estimates a conventional modernization of the same systems would run to $2 billion and take more than a century.
Alberta’s minister of technology and innovation, Nate Glubish, talked about the security case for the audit in Anthropic’s case study.
“Albertans trust their government with some of the most sensitive information in their lives, and it is our responsibility to protect it,” said Glubish. “By using AI to find and fix vulnerabilities across our systems, we accomplished in hours what would have taken a traditional approach years to complete.”
What Alford talked about at Upper Bound was the audit that came before the rebuild.
He told the room AI can spit out code at 10,000 rows per hour by anyone, coder or not. Doing that on top of decades of code nobody had a full picture of produces what he called “the onslaught of the potential slop of what AI could produce.”
First, his team pointed agents at Alberta’s entire code base and boiled the results down to “something in the realm of 700, give or take, business functions of government being served by code,” said Alford.
That 700-function count exposed how much duplication was hiding underneath.
Different ministries had built their own logins, case tools, and ticket systems for the same underlying jobs. Because why have one logical login screen when you can let 27 different ministries build 27 different login screens to do the exact same job?
“If you don’t have those pre-built pieces, you can’t build your car,” said Alford.
What Alberta is now building toward is a set of shared components that plug into new applications so no ministry rebuilds what already exists.

One ministry has 185 legacy apps that Alberta plans to consolidate into 16 modern ones, built on the components the audit surfaced.
A rebuild of the province’s subsidy program portal took four to five days. The original Java version took about five months to build roughly 25 years ago.
Of course, the tech debt underneath is not an Alberta problem alone. Gartner puts about 40% of infrastructure systems across asset classes into the tech debt category.
McKinsey estimates that tech debt amounts to 20% to 40% of the value of an enterprise’s technology estate. The same report found roughly 30% of CIOs said more than 20% of the budget intended for new products was being diverted to deal with it.
Other large organizations are trying similar approaches. Morgan Stanley is running its own version and the bank’s global head of technology and operations Mike Pizzi told Bloomberg in October AI coding has had “a pretty profound impact” on how software gets built inside the bank.
What’s different about Alberta is that it’s published their method. The harder question (and probably one that every CEO will raise) is what happens to the time AI gives back.
Saved time doesn’t stay saved
Alford’s answer is the Jevons Paradox, named after a British economist who noticed in 1865 that as steam engines got more efficient, England burned more coal. Cheaper coal meant more people used it, for more things, in more places. Efficiency unlocked demand rather than shrinking it.
Alford walked through more contemporary versions. Cars got more fuel efficient, and Canadians drove more. Dial-up gave way to fibre, and internet consumption exploded.
“The more efficient you make a system, the more demand there is for that system,” said Alford. “I have not found myself personally working less.”
The 21 free Velocity White Papers walk through the whole play, from scanning the code to rebuilding it to training the people who work with the agents.
One of those papers documents the Alberta AI Academy, the ministry’s own training program. More than 2,000 Alberta public servants have been trained through the Academy since it launched in September 2025, and more than 15,000 people across Canada have used the platform.

The agent working on Alford’s laptop while he sat on stage produced a working proof of concept for his colleague’s problem in under 24 hours. The ministry-wide scan did the same thing for 466 million lines of code.
Alford’s read on where all of it leaves us came at the end of his Jevons argument.
“I’ve not seen an upper limit on humanity’s appetite to invent or accelerate or develop new and creative things,” said Alford.
Final shots
- Everyone wants to talk about the agents. Alberta spent more time on what they found. Across 1,280 applications, different ministries had built their own version of the same underlying jobs, over and over.
- The 21 Velocity White Papers show the work. Most organizations doing agent-led modernization keep it behind closed doors.
- Every enterprise carrying decades of software eventually has to answer the same question Alberta did. Before you modernize it, do you actually know what you’ve built?
What Alberta found when it pointed 50 agents at its own code
#Alberta #pointed #agents #code