← Latest papers
💻 computer science

AutoRPA: Efficient GUI Automation through LLM-Driven Code Synthesis from Interactions

AutoRPA is a framework that bridges the gap between inefficient LLM-based ReAct agents and traditional RPA by automatically distilling interaction trajectories into robust, reusable RPA functions, thereby achieving significant reductions in token usage and runtime costs while maintaining task-solving capabilities.

Original authors: Minghao Chen, Xinyi Hu, Zhou Yu, Yufei Yin

Published 2026-05-21
📖 5 min read🧠 Deep dive

Original authors: Minghao Chen, Xinyi Hu, Zhou Yu, Yufei Yin

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 very smart, but slightly expensive, personal assistant named "LLM" (Large Language Model). This assistant is brilliant at figuring out how to use a computer or phone screen for the first time. If you ask them to "book a flight" or "delete a note," they can look at the screen, think about what to do, click the right buttons, and get the job done.

However, there's a catch: They are slow and expensive to use for repetitive tasks.

Every time you ask them to book a flight, they have to "think" from scratch. They read the screen, plan the steps, and click. If you need to do this 100 times a day, you are paying for 100 hours of "thinking," which is a waste of money and time.

On the other hand, before these smart assistants existed, people used "Robotic Process Automation" (RPA). Think of RPA as a pre-recorded script. It's like a robot that blindly clicks "Button 3, then Type 'Hello', then Click 'Save'." It's incredibly fast and cheap to run. But it's also fragile. If the designer of the app moves "Button 3" to a different spot, the robot crashes because it doesn't know how to adapt. It needs a human to manually rewrite the script every time the screen changes.

The Problem

We want the speed and cheapness of the robot (RPA) but the smart adaptability of the assistant (LLM). We want a solution that works for repetitive tasks (like booking flights every day) without needing a human to rewrite the code every time the app updates.

The Solution: AutoRPA

The paper introduces AutoRPA, a system that acts like a master chef who turns a messy cooking demonstration into a perfect, reusable recipe.

Here is how it works, step-by-step:

1. The "Exploration" (The Chef Watching)

First, AutoRPA uses the smart LLM assistant to perform the task (e.g., booking a flight) just once or a few times. The assistant looks at the screen, thinks, and clicks. This is the "ReAct" phase.

  • Analogy: The chef watches a sous-chef cook a dish for the first time, noting every move.

2. The "Translation" (Turning Notes into a Recipe)

The assistant's actions are usually "hard-coded" (e.g., "Click the button at pixel coordinates 144, 278"). This is bad because if the screen shifts, the coordinates are wrong.
AutoRPA has a special Translator Agent that rewrites these actions. Instead of saying "Click at 144, 278," it says "Click the button that says 'Book Flight'."

  • Analogy: The chef takes the sous-chef's messy notes ("Hit the red dot at the top right") and rewrites them as a clear instruction ("Press the red 'Start' button"). This makes the recipe work even if the kitchen layout changes slightly.

3. The "Building" (Creating the Master Script)

A Builder Agent takes these translated, flexible instructions and combines them into a single, robust computer program (an RPA function). It looks at many different attempts (trajectories) to figure out the best way to handle variations.

  • Analogy: The chef writes the final, professional recipe card that can be used by anyone, anywhere, to make that dish perfectly.

4. The "Hybrid Repair" (The Safety Net)

Sometimes, the new recipe might have a bug. If the robot tries to run the code and fails, AutoRPA doesn't just give up. It has a Hybrid Repair Strategy:

  1. It pauses the robot.
  2. It calls the smart LLM assistant back in to figure out why it failed and how to fix it from that exact point.
  3. It uses the assistant's fix to update the recipe.
  • Analogy: If the robot burns the toast, the chef steps in, fixes the toast, and then updates the recipe card so the robot doesn't burn it again next time.

The Results

The paper tested this on three different environments (Android apps, websites, and simulated web tasks).

  • Efficiency: The new AutoRPA code is 82% to 96% cheaper to run than asking the smart assistant to do the task every time. It saves a massive amount of "token" usage (the currency of AI thinking).
  • Success Rate: It solves tasks just as well as, or sometimes better than, the smart assistant alone, because the generated code is stable and doesn't get confused by minor screen changes.
  • Reusability: Once the code is built for a "type" of task (like "booking a flight"), it can be reused for hundreds of specific instances (booking to New York, booking to London) without needing to think again.

Summary

AutoRPA is a system that watches a smart AI learn a task, translates that learning into a flexible, reusable script, and then polishes that script until it's perfect. It gives us the best of both worlds: the intelligence to handle new situations and the efficiency of a robot to handle repetitive work.

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 →