TL;DR
SKILL.nb introduces a notebook-native framework that treats AI agent workflows as versioned, auditable software artifacts rather than static prompt contexts. By dynamically balancing natural-language instructions and executable code based on real-world execution evidence, it drastically improves the long-term reliability of web automation agents facing environment drift.
What Problem Does This Paper Address?
LLM-based agents are highly capable of generating reusable workflows, code snippets, and procedural memories from past experiences. However, when these agents operate over long periods—especially in web environments—they face a lifecycle reliability problem. Websites constantly change their UI layouts, DOM structures, and data formats.
Existing agent architectures typically treat past experiences as passive prompt context or rigid, all-or-nothing scripts. When a website updates, these rigid scripts break, and append-only memory systems often absorb erroneous or regressive updates. The core challenge is managing the software-maintenance lifecycle of agent workflows: knowing when to harden a step into code, when to fall back to flexible natural language, when to repair a broken step, and when to retire a workflow entirely.
Methods
The authors present SKILL.nb, an online-offline framework that manages reusable agent workflows through evidence-calibrated lifecycle policies. Its architecture relies on three core pillars:
- Selective Formalization: Instead of translating an entire workflow into code, SKILL.nb uses accumulated execution evidence to decide which steps should be hardened into executable code and which should remain guided by natural language (NL).
- Gate-Conditioned Execution: Workflows are executed step-by-step. Each step features deterministic pre- and post-condition "validation gates" that check the browser state. If a gate validates, the agent executes the hardened code block. If environment drift invalidates the code, the agent locally falls back to the underlying NL procedure or step intent.
- Auditable Notebook Representation: Workflows are stored natively as Jupyter notebooks. This allows the framework to interleave markdown instructions, multi-language executable cells, validation gates, and multimodal execution evidence (such as screenshots, error traces, and outputs) within a single version-controlled file.
An offline controller continuously calibrates the thresholds for workflow creation, step formalization, demotion (moving from code back to NL), and retirement by replaying historical execution logs and applying an empirical-Bayes-style shrinkage heuristic to optimize the maintenance-versus-runtime cost trade-off.
Datasets
The framework was evaluated across several challenging web automation benchmarks:
- WebArena-Verified: A suite of 812 tasks across five self-hosted web applications (Shopping, Admin, Reddit, GitLab, Maps). A harder subset of 258 tasks was used for detailed mechanism ablations.
- Mind2Web: Used to evaluate zero-shot generalization across cross-task, cross-website, and cross-domain splits.
- GitLab Version Drift Test: A realistic, custom-configured environment migration where 180 tasks originally learned on GitLab 15.7 were executed on upgraded deployments of GitLab 16.11 and GitLab 18.9 to simulate real-world application updates.
Key Insights and Ideas
- The Spectrum of Formalization: Hardening agent steps entirely into code provides tight control but introduces extreme brittleness under environment drift. Leaving everything as natural language maintains flexibility but sacrifices reliability. SKILL.nb successfully operates in the middle of this spectrum.
- Notebooks as Agent Substrates: Storing workflows as notebooks solves a major logging infrastructure problem. Because notebooks natively bind code, markdown, and execution outputs (including visual data like screenshots), they serve as an ideal, self-contained, and auditable trace format for both agents and offline maintenance processes.
- Gated Promotion Over Append-Only Memory: Traditional memory-centric agents suffer from "negative transfer" when old memories conflict with new UI realities. By enforcing deterministic gate checks and offline verification before any workflow is updated or promoted, SKILL.nb prevents regressive updates from corrupting the agent's skill library.
Key Results
SKILL.nb demonstrated substantial improvements in both initial task execution and long-term reuse stability:
- Benchmark Superiority: On WebArena-Verified, SKILL.nb achieved a 53.7% single-round success rate, outperforming the strongest baseline (ReasoningBank) by 3.9 percentage points.
- High Reuse Consistency: Across three perturbed re-executions without updates, SKILL.nb retained 91.7% of its initially successful tasks—15.5 points higher than the next best method, proving the stability of its gated workflows.
- Robustness to Real-World Drift: In the GitLab migration test, when reusing frozen state learned on version 15.7, baselines suffered severe performance drops (up to 14.4 points) due to stale procedural assumptions. SKILL.nb preserved target-version performance, maintaining a fresh-versus-frozen gap of only -1.7 points on GitLab 16.11 and actually improving by +0.6 points on GitLab 18.9.
Limitations and Future Work
- Reliance on Deterministic Gating: The framework's safety and fallback mechanisms depend heavily on the accuracy of its pre/post-condition gates. False positives or negatives in gate validation can lead to execution failures or unnecessary fallbacks.
- Bounded by Logged Evidence: The offline threshold calibration is strictly replay-relative and cannot offer absolute safety guarantees against completely novel or arbitrary future distribution shifts.
- Workload Assumptions: The benefits of group-specialized thresholds rely on a recurring workload structure (e.g., enterprise or help-desk automation) and may underperform in highly heterogeneous or entirely novel task environments.
- Cost Proxy: The maintenance cost model currently only accounts for LLM inference tokens, omitting operational metrics like wall-clock latency, storage overhead, or human-in-the-loop review effort.
Summary updated