Of all the challenges technical teams face, modernizing legacy software stands in a class of its own. It's not just about 'writing something new,' but about understanding existing code, figuring out why it works the way it does, and carefully rewriting it – all without breaking critical components. This task is labor-intensive, costly, and requires time that most teams simply don't have.
Red Hat has proposed an approach to tackle this problem using AI agents – not one all-purpose assistant, but a coordinated system of several specialized agents working together. The authors call this an 'agent mesh.'
Why Is This a Problem, Anyway?
Legacy systems are programs and codebases that continue to run in production environments despite their age. They might be written in languages that are now rarely used, built on architectures that are difficult to scale, and contain logic that is hard to reconstruct from documentation – because the documentation may be missing or long outdated.
Rewriting these systems by hand takes a long time. Teams can spend years on a migration while the business continues to depend on the old code. The problem is compounded by the fact that the task isn't just about programming: it involves analyzing dependencies, understanding business logic, documenting behavior, and testing the results. These are different types of work, and each requires its own approach.
The Idea: Not One Agent, but a Mesh
The key idea behind Red Hat's approach is to break the task down into parts and assign a specialized agent to each one. Simply put: one agent doesn't do everything; instead, each agent is skilled at doing one thing well.
In the described architecture, the agents are divided into two categories: code and non-code. Code agents work directly with the source code – analyzing its structure, performing refactoring, and suggesting replacements. Non-code agents handle related tasks like parsing documents, reconstructing context, and formulating requirements.
This division makes it possible to select a suitable language model for each agent – not necessarily the most powerful and expensive one, but the one that best handles that specific type of task. This is important from a practical standpoint: large flagship models are more expensive to use, and for many sub-tasks, they are overkill.
How the Agents Work Together
For multiple agents to cohesively tackle a large task, a coordinating structure is needed. At Red Hat, this role is filled by what they call an 'agent harness' – a kind of framework that defines the workflow, distributes tasks among agents, and collects the results.
The principle is somewhat reminiscent of a factory assembly line: each station does its part, passes the result on, and a finished product emerges at the end – in this case, a modernized system component. At the same time, the system is flexible enough to handle tasks of varying scales, not just small, pre-prepared examples.
It's also worth noting that the approach is specifically geared toward 'brownfield migration' – that is, working with existing, live systems, rather than building something new from scratch. This is fundamentally more complex, as it requires working within real constraints, maintaining compatibility, and not breaking what's already functional.
What It All Runs On
The implementation platform is built on Red Hat's AI tools, specifically Red Hat OpenShift AI, which provides the infrastructure for running and managing models in an enterprise environment. This isn't a public cloud service, but a solution designed for organizations that need control over where and how their data and models operate.
The choice of platform is no accident: legacy systems are most often found in large organizations like government agencies, financial institutions, and industrial companies. For them, issues of security, compliance, and the ability to deploy the solution on their own infrastructure are critically important.
What This Means in Practice
The 'agent mesh' approach doesn't claim to completely replace engineers. Rather, it offers a tool that takes on the most routine and scalable parts of the job – code analysis, initial refactoring, documentation generation – and leaves the tasks that require true contextual understanding and decision-making to human specialists.
If this approach truly works at an industrial scale, it could significantly speed up the modernization of systems that have been queued for overhaul for years, simply because teams lack the resources to tackle them manually. The question of how reliably these agents can handle genuinely complex and convoluted codebases remains open – and this will be the ultimate test for evaluating such systems in real-world conditions.