← Latest papers
🤖 AI

AgenticTyper: Automated Typing of Legacy Software Projects Using Agentic AI

AgenticTyper is an LLM-based agentic system that automates the conversion of legacy JavaScript projects to TypeScript by iteratively correcting type errors and verifying behavioral correctness through transpilation, successfully resolving hundreds of type errors in minutes while significantly reducing manual effort.

Original authors: Clemens Pohle

Published 2026-02-26
📖 4 min read☕ Coffee break read

Original authors: Clemens Pohle

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a massive, old library of books written in a language that is very flexible but also very messy. Let's call this JavaScript. In this library, the authors didn't always label their books clearly. A book might be about "apples" one day and "cars" the next, and the librarian (the computer) just guesses what it is. This works fine until you try to reorganize the library, at which point things start falling apart because the labels are wrong.

To fix this, librarians use a stricter system called TypeScript, which forces every book to have a clear, unchangeable label (like "This is definitely an apple"). This makes the library much safer and easier to manage. However, going back and manually labeling 81,000 pages of old, messy books is a nightmare. It would take a human expert a whole day of hard work just to get started, and they'd likely make mistakes.

Enter AgenticTyper. Think of this not as a single librarian, but as a team of super-smart, tireless robot interns equipped with a magical "Time-Travel Mirror."

The Problem: The Messy Library

The paper explains that old software (legacy code) is risky to change because it lacks these clear labels. If you try to fix a small bug, you might accidentally break something else because the computer didn't know what the data was supposed to be.

The Solution: The Robot Team

The author, Clemens Pohle, built a system using Agentic AI (Artificial Intelligence that acts like an autonomous agent). Instead of just guessing, this AI team works in three distinct phases, like a construction crew renovating a house:

  1. Phase 1: The Safety Net (Minimal Setup)
    The robots first turn on the "TypeScript" lights. They scan the code and find every place where the labels are missing or wrong. They try to fix them. If they can't fix a specific part without changing how the software actually behaves (like changing the engine of a car just to fix the paint), they put a "Do Not Touch" sticky note on it and tell a human to look at it later.

    • The Magic Trick: After every single change the robot makes, it uses a Time-Travel Mirror. It instantly translates the new code back into the old language and compares it to the original. If the result is even slightly different, the robot knows it made a mistake and re-does the work. This ensures the software doesn't break, even without a massive list of test cases.
  2. Phase 2: The Strict Inspector (Full Coverage)
    Now that the basics are fixed, the robots turn on a stricter mode. They demand that every single variable has a label. They go through the code again, adding definitions and fixing new errors that popped up because of the first round of fixes.

  3. Phase 3: The Renovation (Strict Mode)
    This is the hardest part. The robots enforce the strictest rules possible. This often requires actually changing the structure of the code (refactoring), which is risky. This phase would need human supervision and testing to make sure the house doesn't collapse.

The Results: A Miracle in Minutes

The team tested this on two real-world, proprietary software projects (totaling 81,000 lines of code).

  • The Old Way: An experienced human developer would need one full working day to fix the 633 type errors.
  • The AgenticTyper Way: The robot team fixed all 633 errors in just 20 minutes for about $25.

The robots successfully identified which errors were real bugs and which were just weird but valid patterns in the old code. They didn't break the software because of their "Time-Travel Mirror" check.

Why This Matters

This isn't just about saving money. It's about making old, critical software safe to update. Before, companies were afraid to touch their old systems because it was too risky and expensive. Now, with a team of AI agents that can "see" the code, fix it, and double-check their work instantly, we can modernize the digital world's infrastructure without the fear of causing a disaster.

In short: AgenticTyper is like hiring a squad of expert editors who can rewrite a messy novel in 20 minutes, ensuring the story stays exactly the same, while a human only needs to step in for the really tricky plot holes.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →