HaReCAP: Habitual-action Grounding for Recursive Large Language Model Agents
HaReCAP is a low-intrusion extension to the ReCAP framework that reduces token consumption and LLM calls in long-horizon embodied tasks by compiling frequent successful leaf decisions into offline reflex rules to bypass redundant recursive context processing for routine actions.
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 a robot tasked with preparing a complex meal in a busy kitchen. It cannot simply be told "make dinner"; it must break that goal down into a long chain of smaller steps: find the onions, chop them, heat the pan, and so on. To do this, modern artificial intelligence uses large language models, which act as the robot's brain. These models are excellent at reasoning and planning, but they face a specific challenge when interacting with the physical world. They must constantly translate their high-level thoughts into exact, valid commands that the robot's software can understand. If the robot thinks "pick up the onion," the system must convert that into a precise instruction like "Pick up onion1 from board1 using robot1." This translation step is necessary every single time the robot performs a basic action.
For a long time, researchers have developed ways to help these AI agents manage long tasks without getting confused or forgetting their goals. One successful method, known as recursive planning, works like a manager delegating tasks. The AI breaks a big goal into smaller sub-goals, tackles the first one, and then returns to the manager to update the plan based on what just happened. This loop allows the AI to handle complex, multi-step tasks in changing environments. However, this process has a hidden cost. Every time the AI reaches the very end of a sub-task to perform a simple action, it must ask its powerful brain to translate that thought into a command again. Even though the thought is simple, the brain has to re-read the entire history of the conversation and the current situation to ensure the command is correct. This repetition creates a significant waste of computing power and time, especially for tasks that require hundreds of steps.
A team of researchers has identified this repetitive translation as a major source of inefficiency and proposed a solution called HaReCAP. Their work focuses on the "last mile" of the process: the moment the AI decides on a specific, atomic action. Instead of asking the large language model to perform this translation every single time, the researchers taught the system to recognize when a situation is familiar and safe enough to skip the heavy thinking. They analyzed thousands of successful attempts where the AI completed tasks correctly. From these successes, they extracted a library of simple rules. These rules are essentially shortcuts that say, "When the task is to pick up a specific object from a specific place, and the robot is allowed to do so, the action is always X."
The system works by checking these shortcuts before asking the main AI brain for help. When the robot reaches a leaf-level sub-task—a small, final step in its plan—the system first looks to see if a rule in its library matches the current situation. If the rule fits perfectly and there is no ambiguity about which action to take, the system executes the action immediately without calling the large language model. This is what the researchers call "habitual-action grounding." It is similar to how a human might automatically reach for a doorknob without needing to consciously think about the mechanics of turning it, provided the door is unlocked. If the situation is new, complex, or if the rule does not fit perfectly, the system safely falls back to the original method, asking the large language model to plan and translate the action as usual. This ensures that the AI never loses its ability to reason through difficult problems, but it avoids the unnecessary overhead of re-solving simple, routine steps.
The researchers tested this approach in two different simulated environments: a kitchen where a robot must prepare meals, and a home environment where it must organize objects. They used a powerful language model to run the tasks and compared the performance of the standard method against their new shortcut system. The results showed that the shortcut system did not change the success rate; the robots completed just as many tasks as before. However, the efficiency gains were substantial. In the kitchen environment, the system reduced the amount of data the computer had to process by nearly 15 percent on average. In the home environment, the reduction was even higher, reaching over 20 percent. This means the AI agents could complete the same number of successful tasks while using significantly less computing power and time.
Crucially, the researchers found that this improvement was not limited to a single type of robot brain or a specific set of tasks. They tested the system with different models of varying sizes and in different environments, and the savings remained consistent. The study demonstrates that a large portion of the cost in running these advanced AI agents comes not from the complex planning itself, but from the repeated, routine translation of simple thoughts into actions. By distilling these frequent decisions into a small, auditable library of rules, the researchers created a method that is low-risk and easy to integrate. The system remains fully capable of handling unexpected changes and complex reasoning, but it no longer wastes energy re-inventing the wheel for every simple step. This approach offers a practical way to make long-horizon AI agents faster and more efficient without sacrificing their reliability or intelligence.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.