Get Started
Home
Topics
Search
Library
Agents · Inference Optimization · May 26, 2026

PANDO: Efficient Multimodal AI Agents via Online Skill Distillation

Source: research paper via Hugging Face Daily Papers
Current agent frameworks pay a heavy reasoning tax on every rollout. PANDO fixes this by distilling successful trajectories into cacheable code routines during evaluation, dropping per-task tokens from 143K to 103K to make production agents cheaper as they accumulate experience.
TL;DR
PANDO makes a web-browsing agent cheaper as it works by distilling each successful trajectory into a reusable rule or parameterized routine, then demoting brittle ones, cutting per-task tokens from 143K early in the stream to 103K late, with no pre-evaluation discovery budget.
Why It Matters
You’ve shipped an LLM agent that drives a browser or desktop for customers. Every task starts cold: the planner re-derives the same “filter by price, sort ascending, click first result” recipe, the actor re-clicks the same dropdowns, screenshots blow up your token bill. The dominant ways to push accuracy up. best-of-N rollouts in the Agent S3 (behavior best-of-N) style, or a two-pass verifier like Self-Grounded Verification (SGV), all multiply per-task spend. Offline tool-discovery systems like WALT hide that cost outside the benchmark timer but you still pay it in production. PANDO asks whether an agent can instead amortize that work across the task stream, so the 500th task is cheaper than the 5th.
How It Works
PANDO runs a single rollout per task in a Plan → Act → Reflect → Learn loop on top of a structured Skill Library that grows during evaluation. Two kinds of entries live in the library: rules are pattern-triggered guardrails (“if the same click fired twice with no DOM change, stop and re-plan”), and routines are small parameterized programs like apply_price_filter(min,max) or sort_by_attribute(attr, dir) that replace a multi-step browser subgoal with one deterministic call. After each task, a learning module inspects the trajectory and proposes new routines; a Beta-style pass/fail counter tracks each skill’s reliability, and once failures dominate, the skill goes on a permanent demotion blacklist so it cannot be rediscovered. A polarity-pair merge collapses mirror-image routines (cheapest vs most expensive, newest vs oldest) into one routine with a direction argument. Retrieval is deliberately literal keyword matching, not embedding search: the prompt prefix stays byte-identical as the library grows, which keeps the KV cache hot. A hierarchical router sends planning and reflection to a strong model and grounding to a cheaper one; visual compression shrinks screenshot tokens.
for task in stream: plan = planner(task) # strong model, sparse for subgoal in plan: skill = library.match(subgoal.keywords) # literal containment traj += skill.run() if skill else actor(subgoal) if step % 3 == 0: reflector.check(traj) # cheap progress check for candidate in induce(traj): # only from successes if not blacklist.collides(candidate): library.admit(candidate) # may merge polarity pair library.demote_where(fail_ratio > 0.5, min_n=3)
Core Insight
The prevailing way to raise agent accuracy is to spend more tokens per task: more rollouts, a verifier pass, or an offline tool-discovery phase paid before the benchmark timer starts. PANDO argues the opposite. Past token expenditure should become reusable capital, not a tax repaid on every task; an inspectable library of deterministic skills plus a demotion list converts one-shot reasoning into amortized routines. The evidence that proves this is not the headline success rate but the stream-wise curve: per-task tokens fall block-by-block as the library matures, and an ablation shows routing and cache tricks alone do not produce the lift.
What They Found
The load-bearing finding is the stream-wise economics, not the headline number. Across task blocks 1–100 → 601–910, success rises from 50.5% → 61.0%, mean steps fall from 10.6 → 8.9, tokens per task fall 143K → 103K, and prompt-cache utilization climbs from 62% → 76%. That is the mechanism: late tasks reuse stable routines and a stable prompt prefix. Secondary numbers stack on top of it:
•
On all 910 VisualWebArena tasks, PANDO hits 58.3% success vs 54.0% for SGV and 45.2% for a reproduced WALT, while spending 115K tokens/task (SGV: 275K, WALT: 294K).
•
Conditional on a skill firing, success is 70.6% vs 50.4% without one, and routine-backed subgoals use 41K fewer tokens on average.
•
The component ablation on a 300-task subset isolates the two roles cleanly: skill components (rules, routines, distillation, merging, demotion) drive success from 38.6% → 57.3%, while routing, visual compression, and cache-aware prompting add only +1.7 pp but cut tokens from 147K to 117K.
•
Robustness: a scrambled task order gives 57.9%, a 16-worker shared-library run gives 58.1% in 3.1h vs 48.2h sequential.
•
Residual failures shift away from loops (now 9%) toward grounding errors (37.5%).
What’s Useful
Reach for this when you operate a browser or workflow agent that sees a steady stream of related tasks and you can detect success deterministically (a test passes, a DOM check fires, an evaluator returns OK). Instead of regenerating the same “filter, sort, pick first” plan every time, write the first dozen common subgoals as parameterized routines, log pass/fail counters per routine, blacklist any that drift below 50% reliability, and keep the library text at the very front of your prompt so Prompt caching actually hits. The polarity-pair trick (one routine with a direction argument instead of two near-duplicates) is a free win for anything with min/max or asc/desc variants.
The authors say they release benchmark code, the metric tracker, prompt templates, skill-library schemas, and anonymized trajectories, but withhold credentials and policy-bypassing automation traces. Three intrinsic metrics they propose are worth stealing for your own dashboards even if you don’t adopt the framework: Action Repetition Rate (fraction of tasks killed by looping), Step Overhead Ratio (mean failed-task steps / mean successful-task steps), and Prompt Cache Utilization (cached prompt tokens / total prompt tokens).
Takeaway
Past token expenditure should become reusable capital. An agent that ships in a domain where tasks rhyme should get cheaper week over week, not pay the same reasoning tax forever. The two ingredients that make this real are an executable, persistent skill artifact (not a self-critique you re-read) and a demotion mechanism so the library does not accumulate stale junk.
Caveats
•
All claims are on VisualWebArena, which uses HTML element-ID grounding. Pixel-precise desktop tasks (window focus, multi-app coordination, OCR misclicks) will need a different rule catalogue and may not amortize as cleanly.
•
The mechanism needs a task stream where subgoals repeat. On a stream of mostly novel tasks, the library never warms and you pay induction cost without the reuse payoff.
•
The headline cost numbers depend on a strong planner backbone (Claude Opus) plus a cheaper actor. Backbone-swap experiments show the lift transfers but shrinks, so a single weak model behind the whole pipeline will not see the same gap.
Topics
Don't miss new content
Log in to follow topics and personalize your feed.
By content type
Research Paper171 episodes
AI171 episodes