ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories

summary

Video file (mp4)

The gist

The gist: ReCodeAgent is an autonomous multi-agent approach for language-agnostic repository-level code translation and validation that achieves high translation success rates across many programming

In short

ReCodeAgent is a multi-agent system designed to automatically translate and validate entire software repositories between different programming languages without requiring complex engineering. It uses four specialized agents—Analyzer, Planner, Translator, and Validator—to handle analysis, planning, implementation across code and tests, and final verification. This approach achieves high success rates on real-world projects efficiently.

Key concepts

Repository-level Code Translation
This is the process of converting all source code files (functions), associated tests, and dependencies from one programming language into another target language. The goal is to maintain the original software's functionality while adapting it to a new language.
Analyzer Agent
This agent examines the entire source project to create a detailed translation design. It identifies all dependencies and figures out how to find equivalent, idiomatic replacements for third-party libraries in the target language using specific tools like Model Context Protocol (MCP) and web fetching.
ReCodeAgent Workflow
This is the structured process where four distinct agents work sequentially: Analysis, Planning, Translation, and Validation. Each agent has a specific job to ensure that code translation is systematic, from initial design to final test verification.
Validator Agent
This final agent checks the translated project's correctness by running existing tests or automatically generating new tests if certain functions were not covered during the translation. It ensures semantic equivalence and functional accuracy.

Terminology used across episodes

This episode discusses

The paper

ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories · Read on arXiv

Ali Reza Ibrahimzada, Brandon Paulsen, Daniel Kroening, Reyhaneh Jabbarvand

University of Illinois Urbana-Champaign · Amazon

Most repository-level code translation and validation techniques have been evaluated on a single source-target programming language (PL) pair, owing to the complex engineering effort required to adapt new PL pairs. Programming agents can enable PL-agnosticism in repository-level code translation and validation: they can synthesize code across many PLs and autonomously use existing tools specific to each PL's analysis. However, state-of-the-art has yet to offer a fully autonomous agentic approach for repository-level code translation and validation of large-scale programs. This paper proposes ReCodeAgent, an autonomous multi-agent approach for language-agnostic repository-level code translation and validation. Users only need to provide the project in the source PL and specify the target PL for ReCodeAgent to automatically translate and validate the entire repository. ReCodeAgent is the first technique to achieve high translation success rates across many PLs. We compare the effectiveness of ReCodeAgent with four alternative neuro-symbolic and agentic approaches to translate 118 real-world projects, with 1,975 LoC and 43 translation units for each project, on average. The projects cover 6 PLs and 4 PL pairs. Our results demonstrate that ReCodeAgent consistently outperforms prior techniques on translation correctness, improving test pass rate by 60.8% on ground-truth tests, with an average cost of 15.3. We also perform process-centric analysis of ReCodeAgent trajectories to confirm its procedural efficiency. Finally, we investigate how the design choices (a multi-agent vs. single-agent architecture) influence ReCodeAgent performance: on average, the test pass rate drops by 40.4%, and trajectories become 28% longer and persistently inefficient.

DOI: 10.1145/3832783.3837486

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: Today's paper: "ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories".

Jane: The gist:

Tom: First, who's behind it and why it matters.

Title and authors: Tom: So we're looking at this paper now, "ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories." It sounds like they’re tackling something big there.

Jane: Yeah, it’s about creating a system that can translate and check code across many different programming languages without needing a huge amount of custom engineering work to make it work for each new language pair. That sounds pretty ambitious.

Lu: Exactly, the authors are pointing out that most existing techniques are stuck on just one source-target language pair because adapting them to a new pair takes too much effort and engineering time thirty-one <ref:2604.07341#pg1>.

Meng: So, what’s the core idea here? Is it just making one big model that handles everything?

Tom: No, it's actually a multi-agent approach. The paper proposes this ReCodeAgent system with four specialized agents: an Analyzer Agent, a Planning Agent, a Translator Agent, and a Validator Agent thirty <ref:2604.07341#pg1>.

Jane: That sounds like they are trying to break down the massive task of translating and validating code into smaller, manageable steps that each agent handles specifically.

Lu: The Analyzer Agent is supposed to explore the source project deeply to make a high-level translation design and figure out how to use third-party libraries in the target language using Model Context Protocol tools <ref:2604.07341#pg2>.

Tom: That means it’s not just blindly translating; it's doing some real research on the source code structure first to inform the translation plan.

Jane: And then you have the Planning Agent, which takes that analysis and builds a concrete skeleton for the target project and a detailed step-by-step plan for all the other agents thirty <ref:2604.07341#pg1>.

Meng: I worry about those long plans; if it gets too complex, those agents might lose track of their original goals or start making mistakes down the line.

Lalam: The paper addresses that by having the planning agent construct a consistent name mapping to keep everything uniform in the target project thirty <ref:2604.07341#pg1>.

Tom: And then you have the Translator Agent, which actually carries out the work, doing both Part A for source code translation and Part B for test code translation thirty <ref:2604.07341#pg1>.

Title and authors: Jane: That’s where they use tools like Language Server Protocol tools—definition, diagnostics, hover—to interact with the codebase at a very semantic level <ref:2604.07341#pg2>.

Lu: The Validator Agent is the final piece; it executes the translated tests and also does a coverage-gap analysis to generate new tests if functions remain uncovered thirty <ref:2604.07341#pg1>.

Meng: That test generation part is interesting; because validation quality is usually tied to how much of the original code you’ve tested, generating missing tests sounds like a smart way to fix that limitation thirty <ref:2604.07341#pg1>.

Tom: The performance numbers are pretty solid. They say that ReCodeAgent achieves an average translation success rate of ninety-nine point four percent for compilation success and eighty-six point five percent for test pass rate <ref:2604.07341#pg2>.

Jane: That’s quite high, especially when you look at how they compare it to other approaches mentioned in the paper, where ReCodeAgent is showing results that are two point five percent and sixty point eight percent higher than those of those alternatives <ref:2604.07341#pg2>.

Lu: The ablation study is what really shows how crucial each part is; removing the Analyzer agent drops the test pass rate by twenty-two point seven percent, and removing the Planning agent drops it by twenty-five point three percent thirty.

Tom: So, it’s clear that having all these specialized agents working together gives them a significant edge over single-agent systems or less structured approaches thirty <ref:2604.07341#pg1>.

Jane: What about the cost and practical use? How does this translate into something we can actually deploy on real projects?

Meng: They mention that ReCodeAgent translates and validates projects in fifty-seven minutes with an average cost of fifteen point three <ref:2604.07341#pg3>. That sounds very fast for a project of this scale.

Tom: It’s cost-effective because they are using core tools like Read, Bash, and Edit around fifteen thousand times on average for examining code and modifying files <ref:2604.07341#pg3>.

Jane: So for someone just listening to the show, this means we’re talking about a system that can take a huge existing codebase and give you back something working in a different language without needing a massive team of specialized engineers to set it up <ref:2604.07341#pg1>.

Title and authors: Lu: The improvements they highlight suggest the framework is more robust because it’s designed to avoid those long-horizon issues where agents might just confabulate and lose their high-level goals <ref:2604.07341#pg2>.

Tom: It seems like the core improvement is making the system truly PL-agnostic by using these agents to synthesize code across many different languages autonomously <ref:2604.07341#pg1>.

Jane: And they’ve also made it better at handling validation, which is a tricky part when you're dealing with huge repositories and making sure all the tests line up perfectly thirty <ref:2604.07341#pg1>.

Meng: The paper flags that hallucination is still a major challenge in this space, specifically around naming things like class or file names <ref:2604.07341#pg2>.

Lu: Yeah, and their use of MCP tools helps the Analyzer Agent identify suitable counterparts for third-party libraries in the target language, which should help mitigate some of that uncertainty <ref:2604.07341#pg2>.

Tom: It’s a structured guidance system; the paper shows that removing parts of the workflow—like planning or validation—causes measurable drops in performance, which is good for understanding what works thirty <ref:2604.07341#pg1>.

Jane: So, to wrap up this section, ReCodeAgent is presented as the first multi-agent pipeline that handles repository-level code translation and validation without needing deep engineering effort for every new language pair <ref:2604.07341#pg1>.

Tom: And it’s cost-effective, translating and validating projects in fifty-seven minutes with an average cost of fifteen point three <ref:2604.07341#pg3>.

Lu: I think the real implication is that this multi-agent structure provides structured guidance that prevents unnecessary exploration and repeated work compared to single-agent approaches <ref:2604.07341#pg2>.

Jane: So, we’ve seen how they use these agents to build a process that moves from high-level analysis down to concrete implementation and validation thirty <ref:2604.07341#pg1>.

Meng: I just hope the real world traffic doesn't reveal some kind of failure mode that isn't covered in these two hundred thirty thousand lines of code evaluation <ref:2604.07341#pg2>.

Tom: Well, that’s what the next paper will have to address—moving from lab results to real-world deployment hurdles.

Jane: We’ll be looking for that next one soon, so keep listening to us for more updates on these kinds of AI advancements.

The paper's summary: Tom: So we’re looking at ReCodeAgent, which is this whole system that uses four different AI agents to translate and check code across many programming languages without needing massive custom engineering effort thirty.

Jane: Right, so it takes a big software project and tries to make it work in a totally different language, but the authors are saying they can do that with this multi-agent workflow.

Tom: Exactly. The core idea is breaking the huge task down into distinct steps: analysis, planning, translation, and validation thirty. It’s not one giant model doing everything at once; it’s a pipeline of specialized AI workers.

Jane: What’s interesting about that breakdown is how each agent has a specific job. The Analyzer Agent looks at the source code really deeply to figure out the project structure and how to handle third-party libraries in the target language thirty.

Tom: And then the Planning Agent takes that analysis and creates a concrete project skeleton and a detailed step-by-step plan for all the other agents thirty. They’ve designed it so it doesn't wander off into unnecessary exploration, which is good because it helps avoid hallucinations.

Jane: That planning phase is where they get smart about structure, like creating a consistent name mapping across the whole project so everything stays uniform thirty. Then the Translator Agent actually does the heavy lifting, handling both the source code and test code translation thirty.

Tom: And that translator agent uses tools like Language Server Protocol to interact with the codebase at a semantic level, which means it understands what a piece of code *means*, not just what it looks like syntactically.

Jane: Finally, the Validator Agent checks if the translation actually worked by running tests and even generating new tests if some parts of the original code didn't get covered thirty. That’s a really smart way to make sure you don’t miss anything important.

Tom: The performance numbers are what really make this interesting. They tested it on over two hundred thirty thousand lines of code across one hundred eighteen real-world projects thirty. On average, ReCodeAgent hits about ninety-nine point four percent success for compilation and eighty-six point five percent for test passes thirty.

Jane: Those numbers sound pretty high, especially when you look at how they compare it to other approaches they tested against. ReCodeAgent is showing results that are significantly higher than those alternatives in both correctness and test pass rates thirty.

Tom: The ablation study shows exactly where the value is coming from. Removing the Analyzer agent drops the test pass rate by twenty-two point seven percent, and removing the Planning agent drops it by twenty-five point three percent thirty. It proves that all those specialized agents are necessary for getting good results.

Jane: So what this means for us, as people who just use these tools, is that we’re looking at a system that can take a huge existing codebase and give you back something working in a different language without needing massive custom engineering effort thirty. It sounds like it makes cross-language adaptation much more feasible.

Tom: It’s cost-effective too. They say it translates and validates projects in about fifty-seven minutes with an average cost of fifteen point three thirty. That’s a lot of efficiency for a task this complex.

Jane: It’s definitely a pipeline that moves from high-level analysis down to concrete implementation and validation thirty. But the authors did mention that they still have challenges, especially around ensuring perfect semantic equivalence when dealing with very complex code structures thirty.

Tom: Yeah, they acknowledged that. The main limitation is still making sure the translation is perfectly semantically equivalent across all possible programming languages without needing a human to check every single function thirty. But it’s a solid framework for getting started on large-scale translation tasks.

Jane: So while it’s not perfect yet, ReCodeAgent gives us a really structured, multi-agent way to tackle this problem that is much more robust than the previous single-approach methods we saw in the literature thirty. But now we have to wonder if these agents can handle even more complex codebases or if they’ll run into other scaling issues down the line.

The paper's improvements: Tom: So we’re looking at how the authors suggest improving ReCodeAgent, which is all about making those four agents work together even better thirty. It's not just about having them exist; it's about making sure they don't waste time or get confused thirty.

Jane: Right, so the paper points out that by using this multi-agent structure, ReCodeAgent gains a lot of efficiency because the planning agent’s output is specifically designed to prevent those agents from exploring things that just lead to wasted work thirty.

Tom: That’s right. They call it structured guidance; it means they aren't just letting the agents wander around trying random things until they find a solution thirty. It shows that having that dependency-aware order in the plan really helps keep the process focused thirty.

Jane: And then there’s the validation loop, where the Validator Agent can actively generate new tests if it finds functions that aren't covered by the original tests thirty. That’s a big step because usually, you can only validate what you already have tested thirty.

Tom: It addresses that exact limitation of test coverage; it means they are building in a way to fix gaps as they go instead of just stopping and saying, "I can't test this part" thirty. That’s a practical change for production systems.

Jane: Also, the paper talks about how the Analyzer Agent uses those Model Context Protocol tools to identify suitable counterparts for third-party libraries in the target language thirty. This helps reduce the uncertainty when translating code that relies on external tools thirty.

Tom: That means if you’re translating something that depends on a specific library, the AI can actually do some research on what’s available in the new language instead of just guessing thirty. It makes it more reliable for real-world projects.

Jane: So, to summarize those improvements, they are focusing on making sure the planning is smarter to avoid mistakes, making the validation loop proactive to catch missing tests, and using better analysis tools for external dependencies thirty.

Tom: The implication is that this framework isn't just a good starting point; it’s a more mature system designed to handle the complexity of large code repositories thirty. It moves beyond simple translation into something that actually tries to be correct and complete thirty.

Jane: And while they show these wins, the authors do flag one thing: the main limitation is still that achieving perfect semantic equivalence across every possible programming language is still a stretch, even with this whole structure in place thirty. But it’s definitely pushing the boundaries of what we can do with autonomous code translation thirty.

Conclusion: Tom: So to wrap up, ReCodeAgent is this multi-agent workflow that tackles language-agnostic code translation and validation at a repository level thirty. It’s shown to be quite cost-effective, taking about fifty-seven minutes on average thirty.

Jane: That’s the main point—it shows that you can build a system that handles huge codebases in different languages without needing massive custom engineering effort thirty. It’s pretty practical for teams right now.

Tom: Right, and the performance metrics are solid, with ninety-nine point four percent success on compilation and eighty-six point five percent on test passes thirty. That’s a lot of confidence in the system's output thirty.

Jane: The implication is that we might see more AI systems that can autonomously adapt software across different programming languages much faster than before thirty. It changes how we think about maintaining old codebases or migrating them entirely.

Tom: But we have to remember the caveat they mentioned—the perfect semantic equivalence isn't guaranteed across every single language pair thirty. It’s a very high bar, but it’s still a big step forward thirty.

Jane: Yeah, and that brings us to the future work they hinted at—moving beyond just success rates in controlled environments to seeing how this actually performs when you throw it into real-world production traffic thirty. That’s the next big question for any system like this.

Lu: From my side, I think the real potential here lies in how structured guidance prevents those agents from just making up answers when they get stuck on a naming problem thirty. The way they decompose the task is genuinely ambitious for representation learning thirty.

Meng: I’m still thinking about deployment; if this whole pipeline were running on real traffic, what would break first? I’d need to know what costs it to run that analyzer and validator at scale thirty. It sounds like a nice lab result, but production stress is where the real engineering work is thirty.

Lalam: I’m pretty sure my literature shows this approach is very sound; the way ReCodeAgent organizes its internal reasoning seems robust for handling those long-horizon planning issues you guys worried about thirty. I’m confident in the architecture itself thirty.

Tom: So, to summarize, ReCodeAgent is a multi-agent workflow that uses a dedicated analysis, planning, translation, and validation cycle to handle repository-level code translation across many languages thirty. It’s cost-effective and shows strong performance numbers thirty.

Jane: And the takeaway for us is that this framework gives us a much more structured way to approach cross-language code migration than the previous single-agent methods we saw in the literature thirty. It’s definitely something to keep an eye on.

More episodes

← Home