The economics of modernization with AI

The cost and time to replace a legacy system have fallen far enough to change how a company plans, funds and runs its systems.

TL;DR
  • A legacy system can now be rebuilt, checked against the original and cleared for production in days. A Fortune Global 500 insurer's mainframe system of 895 COBOL programs reached a working replacement in about 24 hours and passed its readiness check in 96 hours, with about 200 hours of people's time.
  • The cost of a modernization is now model usage plus people's hours. For a mainframe application, that is a fraction of its annual operating cost: about $44,000 against $975,000 a year in a typical case.
  • The largest cost of a legacy system is the change a company cannot make to it. Akka Specify rebuilds such a system from outside, through the interfaces it already has.
  • A modernized estate lets the 2027 roadmap take in work planned for later years and capabilities the legacy systems could not support. Retiring each system ends its multi-year license, lease and support obligations.
  • A company that rebuilds in small, reversible steps, each checked against the original, can run its legacy modernization as projects inside its annual plan.

A legacy system can now be rebuilt and cleared for production in days

A legacy system now reaches a release-ready replacement in 100 to 300 hours of people's time, with functional and performance parity with the original.26 Once the old platform is switched off, its yearly operating cost falls by up to 98%.27

Figure 1

A modernization now takes hundreds of hours and lowers the cost to operate a system.

Sources: notes 26 and 27.

A company's legacy estate can hold decades of business rules that nobody wrote down. The rules live in COBOL programs, copybooks, batch jobs, database triggers, workflow tools and spreadsheets. The engineers who wrote them have retired or moved on, and the documentation describes the system as it was twenty years ago.

Replacing one of these systems has been a multi-year program. Under that model, a company replaced a few systems a decade and funded each one as a capital program. The company kept the rest. The rest kept their run costs, their license renewals and their dependence on a shrinking group of people who understand them.

Writing the new code is the smallest part of a replacement. Before a replacement takes production traffic, it has to clear every check the company sets for a system it depends on:

  • It gives the same answers as the system it replaces, case by case.
  • Each place where the old system and the written policy disagree has a decision from the system's owner.
  • It keeps its data intact through every failure and retry.
  • It meets its reliability and performance targets under production load.
  • It passes the company's security and compliance scans.
  • It can be monitored, operated and recovered by the teams who will run it.
  • It is documented, and each requirement is traced to the test that checks it.
  • A person with the authority to approve the release has approved it.

In a traditional program, each of those checks is a separate phase owned by a separate team, and the phases run one after another. AI coding tools made the code faster to write. The checks still take the time they took before, because each one waits for the one before it.

Akka Specify is a system that builds and modernizes software, and it is part of the Akka Agentic AI Platform. For a legacy system, Akka Specify records how the system behaves through the interfaces the system already has. Akka Specify writes those behaviors into a specification, and a person confirms what each behavior means. Akka Specify then builds the replacement from the specification and checks the replacement against the original. Engineers run Akka Specify from the coding tools they already use, such as Claude Code, Cursor and VS Code with Copilot. Business owners answer its questions in the Akka console.

Akka Specify shortens the time to production by running the checks during the build. A company chooses its exit conditions, the conditions a release must meet and the outcomes it must never produce, from a catalog of 1,210. The catalog covers functional behavior, data integrity, reliability, performance, security and compliance, operability, documentation, the build pipeline and its scans, and the safety of AI agents.21 Every build of the replacement runs against cases the original system has already answered, and against every exit condition in scope. The readiness check returns a verdict of ready or not ready, and each release records which conditions it met and any it waived.

Figure 2

A legacy system can be rebuilt and cleared for release in days.

Source: a Fortune Global 500 insurer's mainframe port.
Exit condition group Conditions in the catalog
Security and compliance 101
Data integrity 99
Experience 97
Repository hygiene 93
Code and test health 92
Documentation and training 90
Reliability 88
Operability 84
Functional 80
Performance 80
Environment and dependencies 74
Pipeline and scanning 73
Process integrity 63
Build efficiency 54
Content and brand governance 12
Agentic AI safety 11
Infrastructure and deployment 10
Enterprise integration 9
Total 1,210

The readiness check finds problems before a release. We recorded the rebuild of a loan-servicing system for our modernize film. Its first full readiness check covered 31 conditions: 18 met, 4 failed and 9 open. After the fixes, 28 were met and 3 remained open. The whole rebuild used $94.84 of model usage across 15 runs and 168.2 million tokens.2

Larger rebuilds also took hours of agent time. In September, we published the results of rewriting 65 open-source projects with Akka Specify. Ten of the 65 were rebuilt in full, from 280,837 lines of source to 147,173 lines, at a median of 8.5 hours of agent time each.1 In the same period, we redesigned a retrieval system of 200,000 lines in 48 hours. The new system has 9,000 lines, and its evaluation accuracy rose from 64% to 95%.1

A customer rebuild shows the same result. A Fortune Global 500 insurer used Akka Specify on a mainframe system that is part of its licensing and compensation platform. The system has 895 COBOL programs, 1,109 copybooks and 309 batch jobs. The replacement reached a working version in about 24 hours, and the whole port took about 200 hours of people's time.3 The replacement passed its readiness check against the original application 96 hours after the work began.

Two hundred hours is one person for five weeks. The people's time went to the decisions only a person can make: what a business rule means, which of two conflicting behaviors is correct, and whether the replacement is ready.

Model usage and people's hours are now the cost of a modernization, and a company measures both from the first day. Neither depends on assembling a program team for several years.

The largest cost of a legacy system is the change a company cannot make to it

A legacy system's run cost appears in the budget every year. The cost of the change a company cannot make to the system does not appear in the budget, and neither does the cost of the initiatives that wait on that change.

Some legacy systems are black boxes. A black box is a system whose behavior the company depends on and cannot explain: a vendor package with no source code, or code that nobody still employed can read. A company cannot change a black box safely, so it builds around it. Every system built around it inherits its limits, and the company's dependence on it grows with each one.

The limit becomes costly when a change cannot wait. In 2020, the US states had to pay new federal unemployment benefits within weeks. Their unemployment insurance systems ranged from 7 to about 50 years old, and most states lacked staff with the expertise to change them.4 Federal agencies run COBOL systems that depend on a shrinking number of people, and they report difficulty finding employees to maintain them.5 When a bank moved its customers to a new core platform in 2018, the failed migration cost £330.2 million after the move.6

A vendor package nearing the end of its support creates the same problem with a deadline. The company has to replace a system it cannot read before the vendor stops supporting it.

Figure 3

A black box delays each initiative that needs a change to it.

Sources: GAO-23-105478 (2023); GAO-25-107795 (July 2025); TSB Banking Group results, February 2019.

Akka Specify opens a black box from outside, through the interfaces the system already has: its services, its message queues, its transactions, its database and its batch files. Akka Specify records how the system behaves. A person confirms what each behavior means. The replacement is then built from that specification and checked against the original. A system with no source code and no remaining experts can be specified, rebuilt and checked this way.

Most of the portfolio is now worth modernizing

A company decides to modernize a system when the savings and the change it enables are worth more than the program costs. When a program took years and cost tens of millions, only a few systems in a portfolio were worth modernizing. The rest stayed, because the program cost more than the system's run cost would save in any period a board would approve.

The cost of rebuilding a system is now model usage plus people's hours. For a mainframe application of 300 MIPS, that is a fraction of its annual operating cost. In a typical case, the rebuild costs about $44,000 and the application costs about $975,000 a year to operate, so the rebuild costs less than 5% of one year's operating cost. At that cost, a system with a run cost like this example's repays its modernization within months of the switch-off.

Figure 4

Modernizing a system now costs a fraction of its annual operating cost.

The portfolio is drawn. The level of the line comes from the worked examples.

The decision then becomes the order in which a company modernizes its systems, set by each system's run cost and the changes it blocks. We modernize in this order: read-only capabilities first, rules-heavy capabilities with little state next, and capabilities with a lot of state last.

The order applies inside one system as well as across the portfolio. A mainframe application that answers policy questions, calculates commissions and posts payments has capabilities of each kind. The questions move first, the calculations next, and the payments last.

Agent access to a legacy estate belongs inside a modernization plan

Many companies now want their AI agents to read from and act on their legacy systems. Several products offer agents a way into a mainframe without building an API first. Some agent-access products drive 3270 terminal screens, the text screens an operator uses on a mainframe, in the way an operator uses them.

Every agent connected to a legacy system adds load to it. IBM's monthly license charge for mainframe software follows the peak rolling four-hour average of the capacity the system uses.7 Within one pricing tier, a rise in that peak raises the charge for each affected product by about the same percentage. Agent traffic that raises the peak raises the license bill. Agent traffic in the overnight batch window, away from the peak, does not raise that peak.

Figure 5

Agent traffic raises the legacy system's run cost unless capabilities move off it.

Source: IBM monthly license charge terms, note 7.

Agent access also deepens the company's dependence on the system. Every client or agent that depends on a legacy system has to be migrated when the system is replaced. Its calls are repointed to the replacement. Its data formats are checked against the new system's. Its tests run again, and its owner schedules its cutover. An agent built against a legacy interface, such as a terminal screen or a batch file layout, is rewritten when that interface goes away.

The migration cost grows with everything built on the legacy system. Each new client adds its own migration to the eventual replacement, and clients built on top of those clients add theirs. A company that opens its legacy estate to agents without a plan to modernize it raises its run cost now and deepens its migration cost with every agent it adds.

A company limits that cost by having clients and agents reach the legacy system through one governed access point in the platform. When a capability moves to the replacement, the route at that access point moves with it, and the clients behind it keep calling the same address.

Screen-driven access carries a cost of its own. Each interaction captures a screen, and a model has to read every screen it has not seen before. The model calls continue for as long as the agents use the system.

We recommend that every access path opened for agents be paired with a plan for the capabilities behind it. The same access paths serve agents, the study of the existing system, and the move to the replacement. Akka Specify observes a mainframe through probes, small utilities that each ask the system one question, and they use the same connections an agent would use. In the parallel run, those connections carry live traffic to the replacement. A company builds each access path once.

Modernization fits in the annual plan

A modernization program has been a capital program: a budget approved for several years, a team assembled for it, and a cutover at the end. Public-sector IT projects take 24% longer than planned on average. About 18% of them overrun their budgets by more than 25%.8 Of six completed US federal modernization projects that expected savings, two met or were on track to meet them, and four were not.9

When a system can be rebuilt in days, modernization becomes a set of projects a company runs inside its annual plan. Many modernization projects run at the same time. Each one is small enough to stop, reverse or re-plan without writing off a multi-year investment.

Figure 6

Multi-year programs split into projects that each finish within a year.

Sources: Flyvbjerg and Budzier, note 8; GAO-26-107737 (July 2026).

The funding changes with the size of the work. A project measured in weeks fits in an operating budget, and its cost is known within days of the start, because the model usage and people's hours are recorded as the work runs. Savings start when the old system is switched off, and from that date they can fund the next project.

Each step is small, reversible and checked against the original. A step that goes wrong is reversed, and the original keeps serving users until the replacement gives the same answers.

Modernization accelerates the innovation roadmap

A company's innovation roadmap is paced by its legacy systems. An initiative that needs a change to a legacy system waits for a change window, for the few people who understand the system, and for the testing cycle around them. A capability the legacy system cannot support at all, such as real-time pricing on a system that prices in a nightly batch, never reaches the roadmap.

When those systems are modernized, the waits go with them. The initiatives planned for 2028 and 2029 that waited on legacy changes can be delivered in 2027. Capabilities that were never planned, because the legacy system could not support them, become candidates for the same year. A modernized capability is a service the company's own teams can change, and every later initiative that needs it builds on the service instead of waiting on the legacy system.

Figure 7

The 2027 roadmap takes in work planned for later years and work that was never planned.

Every modernized capability can be reused by any application or agent

A legacy system keeps its business capabilities inside itself. The commission calculation, the eligibility rules and the policy history can be reached only through the system's own screens, files and transactions, so each new initiative that needs one of them either waits on the system or builds its own copy.

Akka Specify rebuilds a legacy system as services built from Akka SDK components. Entities hold the business objects, such as an account, a policy or a commission statement. Workflows run the multi-step business processes. Views answer queries. Consumers and producers carry events between services. Endpoints expose each capability over HTTP, gRPC, and the Model Context Protocol (MCP) that AI agents use to call tools.

That structure changes what a company can build next:

  • New applications call the capability: a new product calls the commission service instead of rebuilding the commission rules.
  • Agents call it as a governed tool: an agent reaches the capability through an MCP endpoint, with its identity checked and each call recorded. The agent no longer drives terminal screens.
  • Changes are published as events: every change to an entity is recorded as an event, so analytics, AI models and other services can subscribe to it as it happens. The data that used to leave the system in a nightly extract arrives in real time.
  • Each business rule has one implementation: a rule that lived in several systems, each with its own copy, now lives in one service. A change to the rule is made once, and every caller sees it.
  • Each later initiative costs less: an initiative that needs ten capabilities and finds eight already modernized builds two. Akka Specify records which components one project shares with another, so a company can see the reuse across its portfolio.

Figure 8

A capability locked in a legacy system becomes a service any application or agent can call.

A capability that leaves a black box becomes a service every later initiative can build on. The speed of the innovation roadmap then depends on how many of the capabilities it needs are already services.

Retiring a legacy system removes long-term obligations

A legacy system carries obligations that a CFO tracks beyond its yearly run cost. Software licenses and support contracts run for several years. When mainframe hardware is leased, the lease is reported on the balance sheet. Outsourcing agreements commit the company to a level of service for years ahead. The system also depends on specialist staff and contractors who are harder to replace each year.

The licenses, support contracts, leases and outsourcing commitments for a system end or shrink when the system is retired. A company that can replace a system in days can plan each system's retirement around its contract end dates and renew only what it still needs. Every system that leaves the legacy estate removes its future payments from the company's commitments and removes the risk of a system that nobody can change.

Figure 9

Each obligation of a legacy system ends at the system's retirement date.

The obligations differ by company and by contract. A CFO can list them for each legacy system from the company's own contracts and leases, and set each one beside the date that system can be retired.

Modernized systems stay documented

A system rebuilt with Akka Specify keeps its specification beside its code. The specification records each business rule. Each conflict a person resolved is recorded as a decision. Each requirement is traced to the task that builds it and the test that checks it.

Figure 10

A modernized system keeps its specification, decisions and tests beside its code.

Source: Akka Specify.

The company's own engineers maintain the result. The engineers change the specification, and the code, the tests and the checks follow from it. A later change runs through the same steps as the rebuild, so the specification stays current with the code.

The replacement is written in Java with the Akka SDK. A company's existing Java engineers can read it, change it and operate it. The knowledge held by a few COBOL specialists is now written in the specification, which any engineer can read.

The savings come from the legacy run cost, the program cost and the people who maintain both

These estimates use the most recent public data, customer data and our own modernization programs. Sources, dates and vendor figures are marked in the notes.

Figure 11

A legacy system's yearly run cost is compared with the one-time cost of replacing it.

Sources: notes 10 to 16.

Capacity: IBM does not publish a price per unit of mainframe capacity. Vendors that sell mainframe software and services publish all-in figures of about $1,000 to $5,000 per MIPS per year, where a MIPS is one million instructions per second of processing capacity.10 We use that range and treat it as a vendor estimate.

Licenses: The monthly license charges for mainframe software scale with the peak capacity the system uses.7 Independent vendors' tools on the mainframe add their own charges. A replacement that takes days to build changes the negotiation at every renewal, because the company can weigh the renewal against leaving.

People: A software developer in the United States earns a median of $135,980 a year.11 Employers pay about 1.43 times wages in total compensation, so a developer costs about $194,000 a year, or $93.50 an hour.12 Contract COBOL developers are paid about $115,000 a year on average in the US.13 The US federal government spends about 80% of its IT budget operating and maintaining existing systems.5

The program: A traditional modernization is priced in people-years. A rebuild with Akka Specify is priced in model usage and people's hours.

The parallel run: The old and new systems run side by side until their outputs agree on production inputs, so the legacy run cost continues until the old system is switched off. In vendor-reported moves off the mainframe, decommissioning took 8 to 18 months.14 The time to decommission sets when the run-cost savings arrive.

The platform: The Akka Agentic AI Platform charges a fee. The worked examples leave it out, and a company adds it to the modernization cost for its own estate.

After the move, reported cases show the yearly run cost falling by 20% to 98%.15, 27 The worked examples use 20% to 60%, the range of the vendor-reported cases.

Rehosting moves a mainframe application to other hardware without changing it. A rehosted application still scales as one unit, so its capacity is sized for its busiest hour and paid for every hour. Managed emulation runtimes on AWS list at about $1,360 to $24,100 per virtual CPU per year, before licenses, storage and staff.22 Rehosting changes where the cost is paid and keeps the application as it was.

A worked example: one 21,000-line service

The service in this example is the median size of the ten open-source systems we rebuilt in full. The service has an existing test suite or an agreed set of behaviors to check against.

Figure 12

The rebuild costs 84% to 98% less than the rewrite for a 21,000-line service.

Sources: notes 1, 11 and 12.
Traditional rewrite Rebuild with Akka Specify
People's time 4 engineers for 6 to 12 months: 4,160 to 8,320 hours 160 to 640 hours
People's cost at $93.50 an hour $389,000 to $778,000 $15,000 to $60,000
Model usage none $600 to $2,400
Total $389,000 to $778,000 $16,000 to $62,000

We assume a team of 4 engineers for 6 to 12 months for the rewrite. No public dataset gives the cost of rewriting a system of this size. The model usage comes from the ten full rebuilds: about 1.2 billion tokens each, at a blended price of $0.50 to $2.00 per million tokens. Most of those tokens are cache reads, which cost less than other tokens.1, 16

On these inputs the rebuild costs 84% to 98% less than the rewrite. People's hours on the rebuild decide the saving. If they are four times our assumption, at 2,560 hours, the rebuild costs about $242,000 and the saving falls to 38% to 69%. The insurer's mainframe port took about 200 hours for a larger system, which is below our assumption.

In this estimate, model usage is the smallest cost. Doubling it adds $600 to $2,400. Halving the people's hours saves $7,500 to $30,000.

A worked example: one mainframe application

This example uses an application of 300 MIPS and 500,000 lines of COBOL, maintained by three people. The insurer does not disclose its own run cost, so the run-cost inputs are the vendor ranges for capacity and the published wages for people.

Figure 13

Modernizing a mainframe application costs a fraction of its annual operating cost.

Sources: notes 1, 3 and 10 to 13.
Yearly run cost Low Typical High
Platform, 300 MIPS at $1,000, $1,700 and $5,000 per MIPS $300,000 $510,000 $1,500,000
Application team, 3 people at $115,000, $155,000 and $194,000 $345,000 $465,000 $583,000
Total $645,000 $975,000 $2,083,000
Modernization cost Low High
Model usage, 500,000 lines at about 41,000 tokens a line, at $0.50 and $2.00 per million tokens $10,000 $41,000
People, about 200 hours at $93.50 $18,700 $18,700
Total, before the platform fee $29,000 $60,000

The people's hours are the insurer's measured figure.3 The model usage is estimated from the open-source rebuilds, which used about 41,000 tokens per line of source.1 Data migration, cutover and decommissioning are excluded from both tables.

Modernizing the application costs a fraction of its annual operating cost, between about 1% and 9% across the ranges above. In a typical case, modernizing it costs about $44,000 and operating it costs $975,000 a year, so the modernization costs about 4.5% of one year's operating cost, the same as about two and a half weeks of running it.

After the old platform is switched off, the yearly run cost falls by between $129,000 and $1.25 million. In a typical case it falls by $390,000 a year, and the savings repay the modernization in about six weeks. The savings begin when decommissioning ends, 8 to 18 months after the start in the vendor-reported cases.

The rebuild is no longer the slow or expensive part of the move. The date the old platform can be switched off now decides when the savings begin, so a company plans the parallel run and the decommissioning with the same care it once gave the rewrite.

A worked example: a portfolio of legacy systems

The US Government Accountability Office lists 11 federal legacy systems most in need of modernization. Together they cost $754 million a year to operate.5 At a 20% to 60% reduction in run cost, they would cost $151 million to $452 million a year less. GAO does not publish the systems' sizes, so the cost of modernizing them cannot be computed from public data.

One of the 11, the US Department of Agriculture's National Finance Center system, costs $103.8 million a year to operate on its own.5 A 20% reduction in that one system's run cost is $20.8 million a year.

Figure 14

Eleven federal legacy systems cost $754 million a year to operate.

Source: GAO-25-107795 (July 2025).

The same report says agencies spend about 80% of their IT budget operating and maintaining existing systems. A lower modernization cost releases part of that budget for new work. A company whose legacy estate takes a similar share of its IT budget can measure the release the same way: the run cost of each system, the reduction after the move, and the date each system is switched off.

A company can estimate the model usage of a rebuild before it starts

Model usage is a new line in a modernization budget. Our 65 open-source ports recorded the tokens each port used, by type.1, 23 The ten full rebuilds give a range that a company can price at any provider's list price.

Almost every token in a rebuild is a cache read. A cache read is part of a prompt that the provider has already processed and kept, such as the specification or a source file the model reads again on a later turn. Across the 65 ports, 99.1% of 9.4 billion tokens were cache reads. Writes to the cache were 0.6% of the tokens, and output was 0.3%. Providers charge a cache read at a tenth to a twentieth of the input price, so the cache-read price decides most of a rebuild's model usage.

The size of a system did not set the number of tokens its rebuild used. The ten full rebuilds used between 0.49 billion and 2.15 billion tokens each, with a median of 1.19 billion, for systems of 8,898 to 63,053 lines. The largest system used 1.23 billion tokens, and a system of 16,783 lines used the most. Tokens per line fell from about 85,000 on the smallest system to about 20,000 on the largest.

Figure 15

The tokens a rebuild used did not rise with the size of the system.

Source: notes 1 and 23.
Model Per million tokens 0.49 billion tokens Median, 1.19 billion 2.15 billion tokens
Anthropic Claude Sonnet 5.5 $0.14 $69 $167 $303
OpenAI gpt-6.2-sol $0.14 $69 $167 $303
Google Gemini 3.8 Flash $0.18 $87 $211 $382
Google Gemini 4 Carbon $0.28 $135 $327 $593
Anthropic Claude Opus 5.5 $0.28 $138 $334 $605
OpenAI gpt-5.5 $0.61 $297 $719 $1,302

Each row of the table prices every token of a rebuild on one model, at the ports' mix of token types.24 A rebuild with Akka Specify uses several models. Akka Specify assigns each task to a model: routine tasks run on lower-cost models, and tasks that need deeper reasoning, such as working out what a business rule means, run on the most capable and most expensive models. The model usage of a rebuild is therefore a mix of the prices in the table, and of higher prices for the most capable models.

A complex mainframe system sends more of its work to the most expensive models. A customer estimated the model usage of its mainframe rebuild at more than $20,000 for about two billion tokens, about $10 per million tokens.25 The estimate priced every token at the full input and output price and counted no cache reads. At the ports' mix of token types, two billion tokens cost about $280 to $1,210 on the models in the table, so we expect the bill to be far below the estimate.

The estimate has limits:

  • Every port ran on an Anthropic Claude Sonnet or Opus model. The other rows apply the same token counts, and another model will use a different number of tokens for the same work. Providers also count the tokens in the same text differently.
  • No open-source rebuild was larger than 63,053 lines, and none was written in COBOL. The customer's mainframe figure is an estimate that counted no cache reads.
  • More exit conditions add work. The 65 ports used more tokens as exit conditions and auditors were added.1
  • List prices change often. Google's prices for Gemini 4 Carbon double on 1 December 2026, and its prices for Gemini 3.8 Flash double on 1 January 2027. The table uses the later prices.

The worked examples above price model usage at $0.50 to $2.00 per million tokens. The low end is above the price of every model in the table except gpt-5.5, and the high end is above all of them. Both examples therefore give upper estimates of model usage, as does the customer's estimate.

Data migration and cutover still take calendar time

Moving a system's data and switching its users still takes calendar time.

A system with a lot of state carries its data with it. The data has to be migrated, reconciled and checked, and the system's users have to be moved without losing a transaction. Migration and cutover follow the calendar of the business: month ends, batch windows and regulatory reporting dates.

Figure 16

Capabilities with a lot of state move last.

We plan each modernization in that order. Read-only use cases move first, because a replacement that only reads can be checked against the original without writing to the data. Capabilities with a lot of state move last, after the access paths, the parity checks and the parallel run have been proven on the others.

Change capture, a stream of every insert, update and delete on the mainframe database, keeps a replicated copy current while the new system is built and tested. The new system serves reads from that copy first. When its writes move over, the replicated copy has been checked against the original for the whole of the parallel run.

What we have measured

Sixty-five open-source projects: We rewrote 65 open-source projects with Akka Specify in 99.3 hours of agent time. Ten were rebuilt in full in 95.1 hours, from 280,837 lines of source to 147,173 lines. Across the ten, the rebuilt systems gave the same answers as the originals on 15,282 of 15,308 cases, measured against cases the porting program chose. Fifty-seven of the 65 ports reduced the line count or improved performance.1

Figure 17

Sixty-five open-source projects were ported, and ten were rebuilt in full.

Source: akka.io/blog, September 2026.

A recorded loan-servicing rebuild: We rebuilt a loan-servicing system and recorded the work. Discovery, the stage that observes the existing system with probes, ran against a running copy of the system and a read-only copy of its database. The rebuild used $94.84 of model usage across 15 runs and 168.2 million tokens. Testing submitted 23 cases to both systems: 17 gave the same answer, and each of the 6 that differed traced to a decision the system's owner had signed. The first full readiness check covered 31 conditions: 18 met, 4 failed and 9 open. After the fixes, 28 were met and 3 remained open.2

Figure 18

A recorded loan-servicing rebuild cost $94.84 in model usage.

Source: the modernize film, akka.io/modernize.

A Fortune Global 500 insurer: The insurer has used Akka Specify on two separate systems. Its underwriting calculator, built in spreadsheets and a workflow platform, was rebuilt and matched the original on all 2,000 test cases, 492,000 values in all.19 Its mainframe licensing and compensation system, of 895 COBOL programs, 1,109 copybooks and 309 jobs, reached a working replacement in about 24 hours and passed its readiness check in 96 hours, with about 200 hours of people's time.3

Figure 19

A Fortune Global 500 insurer rebuilt two separate systems.

Source: customer data, described by rank and industry.

Akka Specify: A modernization runs from the legacy system to production as one process

The lower cost and the shorter time in the sections above come from how a modernization is run. Akka Specify is the part of the Akka Agentic AI Platform that runs it. The sections from here on describe Akka Specify, and each heading begins with its name.

A modernization with Akka Specify has these parts:

Akka Specify: Building on an AI platform leaves less code to generate and less to check

Models now write most of the code in large migrations. Google reports that across 39 internal migrations, 74.45% of the code changes were generated by a model, with an estimated 50% reduction in the time the migrations took.17 Airbnb migrated about 3,500 test files in six weeks against a manual estimate of a year and a half.18

A system a business depends on needs durability, replication, failover and scaling as well as its business logic. Generated code has to provide those properties itself or be built on a runtime that provides them.

Akka Specify builds every replacement on the Akka Agentic AI Platform. It generates code only from the components of the Akka SDK: agents, workflows, entities, views, consumers, timers and endpoints. The set of components is fixed before any code is generated. The set is small enough that the model writes code only from it, and complete enough to compose any enterprise system.

Figure 20

The specification, the components and the runtime are fixed before code is generated.

Source: Akka Agentic AI Platform.

The platform guarantees how every component behaves. Each entity processes one message at a time, in order. Each workflow survives a restart and resumes where it stopped. The runtime supplies durability, replication across regions, failover and scaling to every system built from the components.

A constrained component model with guaranteed behavior changes where a modernization spends its time:

  • The design is simpler to declare: the specification names the business objects, processes, queries and interfaces the system needs, and the component that holds each one. It leaves out how state is stored, how messages are delivered and how the system recovers from a failure, because the platform decides those.
  • Less code is generated: the ten full rebuilds replaced 280,837 lines of source with 147,173 lines, about half as many.1
  • Fewer items need to be checked: the behaviors the platform guarantees are the same for every system, so a modernization does not test them again. Its checks cover the system's own business behavior and the exit conditions the company chose.

Most of a modernization's time therefore goes to conformity and parity: confirming what each business rule means, and showing that the replacement gives the same answers as the original and meets its exit conditions. Less of it goes to generating code or analyzing what the generated code does.

Figure 21

On the platform, the specification and the checks cover only the business behavior.

Sources: Akka Agentic AI Platform; note 1.

Our 65 ports showed what affected consistency and efficiency. The structure of the delivery harness, the sequence of commands and checks Akka Specify runs a model through, had a larger effect on consistency than the capability of the model. Low-effort model settings were more efficient than high-effort settings.1 The most expensive ports ran for more than 250 minutes and used more than 400 million tokens, and many of them had early specifications that left decisions implicit. We added a rule partway through the program: any claim about a group must list the group's members. Each later port cost more per step and needed fewer steps to reach accuracy.1

A rebuild that compiles and passes its tests against the original runs on the same runtime as every other system the company builds with Akka. The rebuild's cost is the work of describing the system's behavior and checking the replacement against it.

Akka Specify: Each step is proven against the legacy system

Each step we run is small and reversible, and it is checked against the legacy system before users depend on it.

Figure 22

The replacement serves users only after it gives the same answers as the original.

A modernization starts by observing the existing system and ends by retiring it:

  1. Observe the existing system from outside: Akka Specify records how the system behaves through the interfaces it already has, without changing it. The record lists every route, queue, transaction, table and job, and how the system answers at the boundary of each business rule.
  2. Build the replacement: Akka Specify writes the specification. A person confirms each business rule and resolves each conflict. The replacement is then built from the specification. Every build runs against the cases the original has already answered.
  3. Run both systems in parallel on production inputs: Both systems receive the same inputs. Users see only the legacy system's outputs, and every pair of answers is compared. A difference is either a defect in the replacement or a behavior the owner has decided to change, and each one is recorded.
  4. Move users to the replacement in stages: As the replacement's answers agree with the original's, a growing share of users sees the replacement's outputs. The share moves back if the answers stop agreeing.
  5. Retire the old system or keep it for recovery: The company winds the legacy system down, or keeps it running as a disaster recovery environment.

A mainframe's functions can be separated into areas that are modernized one at a time. We start with read-only use cases, move to rules-heavy capabilities with little state, and move capabilities with a lot of state last. Work moves off a mainframe one capability at a time through its existing connections:

  • Repoint a queue alias to the new system, so messages that went to a mainframe program go to its replacement.
  • Route by capability at a gateway, so each capability's requests go to the replacement once it passes parity.
  • Replace one step of a batch job and keep its outputs identical, so the jobs after it see no change.
  • Serve reads from the new system using replicated copies of the mainframe's data.

Each of these moves can be undone by pointing the alias, the route, the job step or the reads back at the mainframe.

Akka Specify: Probes reach a mainframe through its existing interfaces

Akka Specify observes an existing system with probes. A probe is a utility that asks one question of a running system and records the answer: the routes it exposes, the tables it keeps, how it behaves across a range of inputs, or what it returns when a dependency is withdrawn. The probe catalog holds 19 probes in five groups: interface and reachability, behavior, comparison, confidence, and appearance and performance. A company can write new probes in any language.20

Each probe runs at a study level. The read level studies the source code. The run level drives a running copy of the system. The diff level compares the original with the replacement. A system with no source code is studied at the run and diff levels, through traffic recorded in front of a running copy, through its request logs, or through its live database catalog.20

A mainframe often has no API a probe can call. We reach it through the interfaces it already has, in order of preference:

  1. Existing services and middleware: Many mainframe transactions are already exposed as REST or SOAP services. The probe records requests and responses in a test environment. The same request goes to both systems during the parallel run. A gateway routes each capability to the replacement once its answers match the original's.
  2. MQ request and reply: A mainframe program reads a request queue and writes to a reply queue, and a correlation identifier pairs each request with its reply. The probe puts test requests on a test queue manager and reads the replies. The replies from both systems are matched by correlation identifier. The queue alias is then repointed to the replacement.
  3. CICS and IMS transactions through their gateways: The probe calls a transaction with the record layout its copybook describes, a copybook being the COBOL definition of a record's fields. It submits inputs at the boundary of each business rule. Callers move to the replacement one transaction at a time.
  4. Database reads and change capture to a stream: The probe reads the database catalog, and change capture records how each transaction changes the stored data. When both systems receive the same inputs, the replacement's state is matched against the replicated state. Reads move to the replacement first.
  5. Files and batch jobs, with the file as the contract: The probe supplies input files, runs the job in a test environment and collects every output. The outputs of the two systems are compared for each record. Job steps are replaced one at a time, with their outputs kept identical.
  6. Screen interpretation, when no other path exists: The probe captures each 3270 terminal screen through the terminal protocol, and a model reads the screen and chooses the next keystrokes.

Figure 23

Probes reach a mainframe through its existing interfaces, cheapest first.

The order follows cost and risk. Screen interpretation works on any system with a terminal, and it costs the most per interaction, because every new screen needs a model to read it. A screen the probe has seen before is read from its field map with no model call, so the share of screens that need a model falls as the maps accumulate.

The insurer's mainframe port used the fifth path. Its batch jobs' input and output files recorded what the system returns for each input, and the same files were used to check that the replacement gives the same results.3

Every probe declares what it does to the system it reaches: it observes passively, reads, or changes state. Discovery runs against test copies. Production is observed only through imported logs, which keep status codes, header names, body shapes and hashes and drop the bodies themselves. When an access path carries live load in the parallel run, each write passes an approval and is audited.

Akka Specify: The replacement is built from the system's observed behavior

Akka Specify turns what the probes recorded into a specification, then builds the replacement and checks it against the original. Akka Specify runs in the coding tools engineers already use, including Claude Code, Cursor and VS Code with Copilot.

Figure 24

The original system is the answer key for every build.

Each finding about the existing system carries its evidence: the probe that observed it and the answer the system gave. Where the system's behavior conflicts with its documentation or with another finding, a person decides which is correct, and the decision is recorded. In the loan-servicing rebuild, the existing system accepted small business loans of up to 150,000 where the written lending policy allows 100,000, and it let an approver approve an application they had entered. The owner decided that the replacement follows the policy in both cases, and the parity run accepts those decisions.2

The plan breaks the work into tasks, and each task is traced to the requirement it implements and the test that checks it. Tasks that do not depend on each other run at the same time.

Every build of the replacement is run against cases the original has already answered, and a build that gives a different answer fails. A release waits on its exit conditions: the checks a company sets for done and for what must never happen. The catalog holds 1,210 of them.21 The readiness check runs every condition in scope and returns a verdict of ready or not ready, and a release records which conditions it met and any it waived.

Akka Specify: Modernization runs as a structured process that scales across many systems

A company with hundreds of legacy systems cannot modernize them one expert at a time. Akka Specify gives every modernization the same structure, so many can run at once and each person works only where a decision is needed.

Every modernization moves through the same stations in the same order: discover, specify, clarify, plan, tasks, implement, review, conform and ship. Each station writes a versioned record that the next station reads. When an earlier answer changes, the stations after it run again in order.

Figure 25

Many modernizations run at once, each through the same stations.

Each modernization has an owner, a spending limit, and a destination: deployment to Akka, or a commit to the company's own systems. The owner chooses whether it stops after each station for review or moves on by itself. When it moves on by itself, the next station starts as soon as the previous one closes, and the work stops only when a person is needed.

People take part only where a decision is needed. The work waits on a person for an approval, an answer to a question, a confirmation, a sign-off, a handover, or a deviation from the specification. Each wait is assigned to a person or to a role, such as credit risk or underwriting counsel. Business owners answer in the Akka console, in the words of their own business. Engineers work in the coding tools they already use, such as Claude Code, Cursor and VS Code with Copilot. A person sees every wait assigned to them across all the modernizations in progress.

The organization sets the rules once. It chooses the exit conditions every project must meet and the policies every project follows, and each project is checked against them before it ships. Within one modernization, tasks that do not depend on each other run at the same time.

Akka Specify: The replacement runs on the Akka runtime through the parallel run and after cutover

A replacement that passes its tests one request at a time can still fail under production load. On a mainframe, online transactions and batch jobs work on the same data at the same time, so the order of locks, batch runs and database commits is part of how the system behaves.

Figure 26

Two conflicting writes to one account apply in order.

A system built from Akka SDK components keeps each business object in an entity, a component that processes one message at a time, in order. Two conflicting writes to the same account apply one after the other, with no lock in the application code. The runtime supplies durability, replication across regions, failover, sharding and backpressure, so the replacement carries production load from its first day in the parallel run.

The parallel run is where those properties are tested. The replacement receives the full production input while users still see the legacy system's outputs. A replacement that falls behind under load, or loses a write when a node fails, shows it in the comparison before any user depends on it.

Akka Specify: The platform governs the modernization and the system it produces

The Akka Agentic AI Platform governs the actions taken on it: who may act, what each action may do, how much it may spend, and what is recorded. Akka Specify runs on the platform, so a modernization is governed the way an AI agent is governed. Each piece of work has an owner, a budget and a record of what it did.

Figure 27

A run pauses when its forecast reaches the spending limit.

Akka Specify records the cost of every run: its tokens by model, its requests and its dollar cost. Akka Specify records the cost of every task and forecasts the cost at completion from the pace of the work so far. Each piece of work carries a spending limit. When the limit is reached, the work pauses until a person resumes it, and a person can stop a run at any time.

Each task carries the model and effort level it runs at. A company runs the analysis on the models that are fastest and cheapest for each task and keeps the most capable models for the decisions that need them. In our 65 ports, Sonnet ran about twice as fast per port as Opus. Opus used about 40% fewer tokens per port than Sonnet. The effort level changed efficiency more than the choice of model did.1

The controls a company already applies to its AI agents apply to its modernization:

  • who may start a run
  • which access paths a probe may use
  • which writes need an approval
  • what is logged
  • how much may be spent
  • who may stop the work

The replacement then runs on the same platform. The identities, policies, spending limits and records that governed its modernization govern it in production. A company that modernizes on the platform its systems move to has one approach to governance for the modernization and for the systems it produces.

Figure 28

One governance covers the modernization and the system it produces.

Source: Akka Agentic AI Platform.

A company measures its modernization by reach, parity, legacy load and time to parity

A company tracks its modernization with these measures, which also feed its case for AI efficiency:

  • Reach: the share of the legacy estate's capabilities that agents and services can reach through the platform.
  • Parity: the share of cases on which each replacement gives the same answer as the original.
  • Legacy load: the capacity the legacy estate uses, which falls as capabilities move off it.
  • Time to parity: the time from the start of a modernization to the point its replacement matches the original.

Figure 29

The share of modernized systems rises as each one reaches parity.

Legacy load can be checked against the license charges each month. Capacity charges follow the peak load, so a falling peak shows up in the license charges month by month, before the old platform is switched off.

Limits of the evidence

  • The run cost per MIPS comes from vendors. IBM does not publish a price per unit of mainframe capacity.
  • The 20% to 60% reduction in run cost comes from vendor-reported cases. The 20% case is a state's mainframe that kept running under a managed-services contract.
  • The 98% reduction is one state agency's mainframe unit, whose costs fell from $25,500 a month to $350 a month.
  • No public dataset gives the cost of a traditional rewrite per line of code. The rewrite of the 21,000-line service is our assumption of a team and a duration.
  • People's hours were not measured in the open-source ports. The insurer's 200 hours is one measured figure, for one system.
  • The insurer is described by rank and industry.
  • The parity figures for the open-source ports were measured against cases the porting program chose. Production traffic was not part of the measurement.
  • Data migration, cutover and decommissioning are outside the modernization costs in the worked examples.

Where to start

Choose one legacy system whose behavior the company depends on and cannot change without risk. Give Akka Specify access to it through the interfaces it already has, starting with the cheapest interface. Record the people's hours and the model usage from the first day, and compare them with the run cost of the system being replaced.

Plan the order of the remaining systems from those measurements, starting with read-only capabilities. Pair every access path opened for AI agents with a plan for the capabilities behind it.

Akka will run a full modernization of one of your systems at no cost, in one week, on your premises. Contact Akka to choose the system and arrange the week.

Contact Akka

Notes

  1. Akka, "We Ported 65 OSS Projects With AI", akka.io/blog, September 2026. Agent time, tokens, line counts, parity cases and lessons from the 65 ports and the ten full rebuilds, and the retrieval system redesign.
  2. Akka, the recorded loan-servicing rebuild in the modernize film, akka.io/modernize, November 2026. Model usage, runs, tokens, parity cases, owner decisions and readiness checks from the run's own records.
  3. Customer data: a Fortune Global 500 insurer's mainframe licensing and compensation system, November 2026: 895 COBOL programs, 1,109 copybooks, 309 jobs, a working replacement in about 24 hours, the readiness check passed in 96 hours, about 200 hours of people's time.
  4. US Government Accountability Office, GAO-23-105478, 2023. State unemployment insurance systems in 2020.
  5. US Government Accountability Office, GAO-25-107795, July 2025. Federal legacy systems, their operating costs, and the share of IT budgets spent on operations and maintenance.
  6. TSB Banking Group plc, 2018 results release, 1 February 2019. Post-migration costs of £330.2 million.
  7. IBM, sub-capacity pricing for z/OS monthly license charges. The charge follows the peak rolling four-hour average of capacity used in the month.
  8. Flyvbjerg and Budzier, analysis of 1,355 public-sector IT projects, 2013 (arxiv.org/abs/1304.4525).
  9. US Government Accountability Office, GAO-26-107737, July 2026. Savings from completed Technology Modernization Fund projects.
  10. Vendor estimates of mainframe cost per MIPS per year: Broadcom total-cost model for a 4,000-MIPS environment (2023 to 2024 data); CGI, "Retiring the mainframe"; an IBM software-only case. Vendor figures.
  11. US Bureau of Labor Statistics, Occupational Outlook Handbook, software developers, May 2025 wage data.
  12. US Bureau of Labor Statistics, Employer Costs for Employee Compensation, June 2026. Total compensation of $46.89 an hour against wages of $32.82 in private industry.
  13. ZipRecruiter, contract COBOL programmer pay, 2026. Aggregated job listings.
  14. Vendor-reported moves off the mainframe, 2023 to 2026. Decommissioning took 8 to 18 months.
  15. Vendor-reported run-cost reductions after a move off the mainframe, 2023 to 2026: the State of Kansas, 20%; an insurer, 40%; and published vendor results of 57% and 60%.
  16. Anthropic, model pricing, read 25 November 2026. Cache reads cost $0.10 to $0.20 per million tokens and output $10 to $20 per million on the mid-tier and frontier models. The blended rate of $0.50 to $2.00 is our estimate.
  17. Google, "How is Google using AI for internal code migrations?", arXiv 2504.09691, April 2025.
  18. Airbnb Engineering, "Accelerating Large-Scale Test Migration with LLMs", 2025.
  19. Customer data: the same insurer's underwriting calculator, November 2026: 2,000 of 2,000 test cases matched, 492,000 values.
  20. Akka, discovery probe catalog and study levels, Akka Specify, November 2026.
  21. Akka Specify, exit condition catalog, akka.io/platform/specify.
  22. AWS Mainframe Modernization pricing, read 25 November 2026: the Blu Age runtime at $0.155 and the Rocket runtime at $2.755 per virtual CPU per hour, list prices.
  23. Akka, port metrics for the 65 ports and the ten full rebuilds, August and September 2026: tokens per port by type (cache reads, cache writes, input and output), lines of source and the model used.
  24. List prices per million tokens, standard tier, read 25 November 2026: Anthropic (platform.claude.com, model pricing), OpenAI (developers.openai.com, API pricing) and Google (aistudio.google.com, Gemini API pricing). The price per million is weighted by the ports' mix of tokens. Cache writes are priced at the provider's shortest write price, or at the input price where none is listed. Gemini 4 Carbon is priced at its rate from 1 December 2026, and Gemini 3.8 Flash at its rate from 1 January 2027.
  25. Customer estimate: the model usage of a customer's mainframe rebuild, November 2026: more than $20,000 for about two billion tokens, priced without cache reads.
  26. Akka, modernization programs with customers and internal teams, 2026: people's time from the start of a modernization to a replacement that met its exit conditions, 100 to 300 hours.
  27. Missouri Department of Labor and Industrial Relations, "Mainframe decommissioning saves State of Missouri thousands of dollars", 4 October 2019: the unit's mainframe costs fell from $25,500 a month in 2016 to $350 a month in 2019.