Using multi-agent AI capabilities to convert an insurance agency portal in 4 weeks, not months
End-to-end code discovery and conversion powered by Mechanized AI's advanced multi-agent framework, deployed on AWS with NTT DATA.
End-to-end code discovery and conversion powered by Mechanized AI's advanced multi-agent framework, deployed on AWS with NTT DATA.
A global insurer needed to modernize a production agency portal, the front-line interface through which agents and producers access critical workflows daily to quote, bind, and service business with Tokio Marine North America carriers. Built on legacy Ruby on Rails, the platform had served its purpose but was increasingly difficult to maintain, scale, and secure in a modern cloud environment.
The mandate was technically demanding: convert the full portal codebase to a modern technology stack on AWS, preserve every piece of existing business functionality exactly as-is, and deliver production-ready code, not a prototype. Any approach that required touching the broader environment was off the table. And a traditional rewrite, months of analyst time, hundreds of thousands of dollars in labor, with real risk of functional drift, was off the table too.
NTT DATA, the global systems integrator leading the engagement, partnered with Mechanized AI to compress what would have been a multi-month manual rewrite into a four-week, AI-driven conversion.
The problem: manual conversion does not scale
The Agency Portal was a substantial application, not just a few web pages, but a deeply interconnected system built up over years. It included dozens of screens and user-facing views, the underlying logic that powered how those screens behaved, connections to external systems for user authentication and agency data, automated background processes, and hundreds of pre-existing tests designed to verify the application worked correctly.
At 83,000 lines of Ruby on Rails, a traditional manual rewrite would have required a team of developers to read, understand, and re-implement every component from scratch. At the industry-standard manual porting rate of approximately 150 lines of code per hour for like-for-like conversion, the effort would have consumed roughly 550+ analyst hours. At a blended consulting rate of $150-$200/hour, that is $83K-$111K just for line-by-line porting, and it understates the true cost.
A full rewrite, with architectural redesign, new test development, and the inevitable rework from behavioral drift, would have pushed the total to $250K-$550K and stretched across 3-5 months. That timeline was inconsistent with the client's objectives. More critically, any rewrite carries real risk that business rules encoded implicitly in the legacy code get lost or subtly altered in translation, unacceptable for a portal that handles live agent workflows every day.
The partnership: NTT DATA + Mechanized AI on AWS
NTT DATA is a global leader in digital transformation services, with deep delivery capability across enterprise modernization, cloud migration, and application management. For this engagement, NTT DATA provided the enterprise delivery framework, client relationship management, and integration expertise to ensure the project stayed aligned with TMNAS's architecture standards and operational requirements.
Mechanized AI brought the AI-powered analysis and conversion engine. CodeMap, powered by an advanced multi-agent framework, performed the initial codebase discovery: mapping every dependency, extracting embedded business rules, cataloging the application's structure and behavior, and producing the documentation that informed the conversion strategy. CodeGen then executed the automated code conversion, transforming the legacy Ruby on Rails codebase into a modern, cloud-native stack while preserving functional parity with the original system.
The multi-agent framework is what makes this approach fundamentally different from traditional tooling. Rather than relying on a single model or rule engine, Mechanized AI orchestrates a coordinated system of specialized AI agents, each tackling a different dimension of the problem: structural analysis, dependency mapping, business rule extraction, behavioral documentation, and code generation. A coordinating layer synthesizes findings across agents, ensuring that nothing falls through the cracks between analysis and transformation. The result is end-to-end coverage from discovery through conversion, with no handoffs, no gaps, and no information loss.
CodeMap and CodeGen are part of the mAI Modernize suite, purpose-built for teams navigating complex, undocumented codebases. Both products are architected and deployed natively on AWS, leveraging core services such as Amazon Bedrock for foundation model inference, Amazon S3 for scalable artifact and codebase storage, and AWS Fargate for containerized execution, among other services. This cloud-native architecture means the toolset deploys directly into a client's own AWS environment with no data leaving their security boundary, while scaling elastically to handle codebases of any size.
Together, the two firms brought what neither could deliver alone: the enterprise transformation expertise to frame the engagement correctly and the AI-powered multi-agent tooling to execute it at a speed and cost that manual approaches cannot match.
The solution: multi-agent intelligence from discovery to converted code
The engagement followed a two-phase approach, with CodeMap and CodeGen working sequentially to take the portal from undocumented legacy code to production-ready modern application.
The solution: Phase 1: Discovery with CodeMap
CodeMap ingested the full 83,000-line Ruby on Rails codebase and its multi-agent pipeline went to work. Specialized agents performed parallel analysis across every dimension of the application.
- Structural mapping: Complete inventory of models, controllers, views, routes, middleware, and configuration files, producing the definitive system-of-record for what the portal actually contained.
- Dependency tracing: Full mapping of inter-component dependencies, external service integrations including authentication providers and agency data feeds, database relationships, and background job orchestration.
- Business rule extraction: Identification and documentation of every business rule embedded in the code, including workflow logic, validation rules, conditional routing, access controls, and behavioral patterns that had never been formally documented.
- Behavioral documentation: Plain-language descriptions of what each component does and why it exists, providing the conversion team with the context needed to make informed architectural decisions.
This discovery phase produced the comprehensive system inventory and business rules library that served as the conversion blueprint. Without it, the conversion would have been a best-effort translation; with it, CodeGen had the full picture needed to preserve functional parity.
Phase 2: Conversion with CodeGen
With discovery complete, CodeGen executed the automated conversion of the full portal to a modern, AWS-native architecture. The conversion included the application layer, frontend conversion, test suite generation, and infrastructure alignment.
- Application Layer: Full conversion of all controllers, models, and business logic from Ruby on Rails to the target technology stack.
- Frontend conversion: Transformation of all views and UI components, preserving the user experience that agents and producers relied on daily.
- Test suite genration: Automated creation of a comprehensive test suite to validate that converted functionality matched the original behavior.
- Infrastucture aligment: Targeting AWS-native services including ECS Fargate and Aurora for the production deployment, ensuring the converted application was cloud-native from day one.
The entire engagement, discovery through converted, production-ready code, was completed in four weeks.
The results: measured against what manual would have cost
Every KPI below is benchmarked against what this work would have cost using traditional manual methods.
KPI 1: Time to production-ready delivery, 4 weeks
A traditional manual rewrite of an 83K-line application of this complexity, with full discovery, conversion, testing, and validation, would have consumed 3-5 months of calendar time. Mechanized AI's multi-agent framework compressed the entire lifecycle from legacy code to production-ready application into four weeks.
Baseline: 3-5 months for manual rewrite, industry standard for 83K LoC. Result: 4 weeks, end-to-end, from discovery through production-ready code.
KPI 2: Conversion labor cost avoided, $250K-$550K
A full manual rewrite at this scale, including re-architecture, new development, test creation, and the inevitable rework from behavioral drift, represents $250K-$550K in labor cost at industry-standard blended consulting rates. The AI-driven approach eliminated the vast majority of that manual effort while delivering higher fidelity to the original business logic.
Baseline: $250K-$550K for manual rewrite, 3-5x the $83K-$111K line-by-line porting estimate. Result: Fraction of manual cost, four-week delivery with full functional parity.
What changed downstream
- Full visibility into every business rule, dependency, and behavioral pattern in the legacy portal, documented for the first time.
- Production-ready modern application on AWS, including ECS Fargate and Aurora, with zero changes to the surrounding TMNAS environment.
- Complete, end-to-end business rules extraction delivered automatically by the multi-agent framework, not pieced together manually across handoffs.
- De-risked modernization: converted code validated against the original behavior, not rebuilt from assumptions.
- Repeatable playbook for additional TMNAS modernization workloads using the same CodeMap + CodeGen pipeline.
TMNAS moved from legacy portal to modern, cloud-native application without delay and without disruption.
The takeaway: discovery and conversion are one problem, not two
Legacy modernization efforts typically treat discovery and conversion as separate workstreams, staffed by separate teams, operating on separate timelines. The discovery team maps the codebase and extracts business rules. The conversion team takes those artifacts and builds the new application. In between: handoffs, information loss, and months of elapsed time.
This engagement worked because the solution eliminated that gap entirely. Mechanized AI's multi-agent framework treated discovery and conversion as a single, continuous pipeline. CodeMap analyzed the codebase and extracted every business rule, dependency, and behavioral pattern; CodeGen consumed those artifacts directly and produced the converted application. No handoffs. No information loss. No re-discovery.
NTT DATA provided the enterprise delivery structure and client alignment that kept the engagement on track and on scope. Mechanized AI provided the AI-powered tooling that made four weeks possible instead of four months
For organizations carrying legacy applications that are too important to leave alone and too complex to rewrite manually, that combination can be the difference between a modernization program that moves and one that does not.
Facing a legacy application that is slowing your cloud modernization? Mechanized AI and NTT DATA work together to help organizations move from legacy code to modern applications, fast. Let us talk about what is possible for your team.
About the partners
Mechanized AI builds AI-powered tools for legacy application analysis and modernization. CodeMap and CodeGen, driven by an advanced multi-agent framework, are part of the mAI Modernize suite, purpose-built for teams navigating complex, undocumented codebases.
NTT DATA is a global leader in digital transformation services, helping organizations architect and execute large-scale technology, business, and operational change across industries.