AI agents get better at multi-step tasks when they are taught to catch their own mistakes as they happen, not just remember what happened before.
Researchers extended SwiftSage, an AI agent architecture that pairs a fast reflex module for proposing actions with a slower planning module, adding two optional components and testing them on ScienceWorld, a simulated environment for multi-step science tasks. One addition, the Adaptive Memory Module, gives the agent a filtered long-term memory that only stores and recalls what seems important. The other, the Self-Reflection Module, checks the agent's actions as it works and steps in to correct course when something goes wrong. Tested separately and together across four setups, the combined system scored best: a 64.62 mean final score, a 43.17% success rate, and successful task completion in an average of 19.33 steps.
The self-reflection piece did more heavy lifting on its own than the memory piece did on its own, which suggests the harder problem for these agents is not remembering the past but avoiding avoidable errors in the moment. That is a useful data point for anyone building agents for multi-step jobs like coding assistants or automation tools, where one bad step can derail everything downstream.
It is a reminder that giving an AI agent a better memory will not fix it if it still cannot tell, in real time, that it is making a mistake.