AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systems
This paper introduces AgentForesight, a framework featuring a compact online auditor trained on the newly curated AFTraj-2K dataset to predict and localize decisive errors in LLM-based multi-agent systems in real-time, thereby enabling deployment-time intervention rather than relying on post-hoc failure attribution.
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 are watching a team of robots work together to build a complex piece of furniture. They have a plan: one robot cuts the wood, another sands it, and a third paints it.
In the past, if the final table ended up wobbly or painted the wrong color, experts would wait until the very end, look at the finished mess, and say, "Ah, the problem started when the sanding robot used the wrong grit." This is called Post-Hoc Failure Attribution. It's like a detective solving a crime after the house has already burned down. You know who did it, but you can't stop the fire.
AgentForesight changes the game. Instead of waiting for the disaster, imagine a super-vigilant safety inspector standing right next to the robots, watching every single move they make in real-time.
The Core Idea: The "Stop or Go" Inspector
This inspector (the Auditor) doesn't know the future. They only see what has happened so far. At every single step, the inspector has to make a split-second decision:
- CONTINUE: "Everything looks safe so far. Let the robots keep working."
- ALARM: "Stop! I see a critical mistake right now. If we let them continue, the whole project will fail."
The goal is to catch the decisive error—the one specific moment where the train derails—before the other robots blindly follow that bad lead and ruin the whole project.
The Problem: Why Was This Hard Before?
Until now, we didn't have good data to train these inspectors.
- The "Safe" Problem: Most existing data only showed us failed projects. We didn't have enough examples of perfect projects where we knew, step-by-step, that nothing went wrong. An inspector trained only on failures might panic and stop every project, thinking every small hiccup is a disaster.
- The "Timing" Problem: Existing models were great at looking at a finished failure and saying, "It was Step 4." But they were terrible at looking at Step 4 while it was happening and saying, "Stop right there!"
The Solution: AgentForesight
The researchers built a new system with three main parts:
1. The Training Manual (AFTRAJ-2K)
They created a massive library of robot work logs called AFTRAJ-2K.
- The Safe Logs: They carefully filtered thousands of successful robot tasks to ensure they were truly perfect from start to finish. This teaches the inspector what "safe" looks like.
- The Broken Logs: They took safe tasks and intentionally broke them at specific steps (like telling a robot to use the wrong tool), then used a panel of AI judges to agree on exactly which step caused the failure. This teaches the inspector exactly when to hit the alarm.
2. The Training Method (Coarse-to-Fine)
They didn't just throw the inspector into the deep end. They trained it in two stages, like a martial arts student:
- Stage 1: The "Gut Feeling" (Risk Anticipation): First, they taught the inspector to feel the difference between a "safe" moment and a "dangerous" moment. They showed it pairs of steps: "This looks safe" vs. "This looks dangerous." The inspector learned to sense the boundary where things go wrong.
- Stage 2: The "Sniper Aim" (Precision): Once the inspector had a good "gut feeling," they sharpened its skills. They taught it to pinpoint the exact step and the exact robot responsible. They used a reward system that praised the inspector for getting three things right:
- What: Did they give the right answer format?
- Where: Did they catch the error at the exact right step?
- Who: Did they blame the correct robot?
3. The Result (AgentForesight-7B)
The result is a compact, fast AI auditor (named AgentForesight-7B) that runs alongside other AI systems.
- It's faster and smarter: In tests, it caught errors much better than giant, expensive AI models (like GPT-4.1 or DeepSeek-V4-Pro).
- It's precise: It didn't just say "something is wrong"; it said, "Stop! The Manager robot made a mistake at Step 3."
- It's practical: It's small enough to run on standard hardware, meaning it can actually be used in real-world applications without slowing everything down.
Why This Matters
Think of it like a spell-checker for AI teams.
- Old Way: You write a whole essay, submit it, and then the spell-checker says, "You made a spelling error on page 1." The essay is already sent.
- AgentForesight Way: As you type, the spell-checker highlights the error the moment you make it, before you even finish the sentence. It stops you from sending a broken product.
The paper claims this system allows us to intervene while the AI is working, preventing small mistakes from turning into big, irreversible failures in coding, math, and web navigation tasks. It turns failure analysis from a "post-mortem" (autopsy) into a "live surgery" (saving the patient).
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.