Source-linked AI summary
Inducing Programmatic Skills for Agentic Tasks
Zora Zhiruo Wang, Apurva Gandhi, Graham Neubig, Daniel Fried
TL;DR
Web agents need specialized skills, but offline demonstrations and textual skill memories provide limited coverage or verification. ASI induces executable skills online, verifies them through targeted trajectory tests, and reuses them across tasks. It improves success and efficiency on WebArena and remains effective in longer-horizon and cross-website settings.
Problem
Web agents need specialized skills, while offline demonstrations may not cover the broad range of websites and inference-time tasks.
Method
ASI induces executable programmatic skills online from agent trajectories, verifies them, and incorporates verified skills into the action space for reuse.
Results
ASI achieves 23.5% higher success rate than the static baseline and 11.3% higher success rate than the textual-skill counterpart on WebArena.
Takeaways & Limitations
ASI transfers common skills across websites and can update incompatible skills for alternative website designs.
Takeaways & Limitations
Some prior skills become incompatible with alternative website designs, and administrative and software websites were not tested because of safety concerns.
Abstract
from arXiv · showhide
To succeed in common digital tasks such as web navigation, agents must carry out a variety of specialized tasks such as searching for products or planning a travel route. To tackle these tasks, agents can bootstrap themselves by learning task-specific skills online through interaction with the web environment. In this work, we demonstrate that programs are an effective representation for skills. We propose agent skill induction (ASI), which allows agents to adapt themselves by inducing, verifying, and utilizing program-based skills on the fly. We start with an evaluation on the WebArena agent benchmark and show that ASI outperforms the static baseline agent and its text-skill counterpart by 23.5% and 11.3% in success rate, mainly thanks to the programmatic verification guarantee during the induction phase. ASI also improves efficiency by reducing 10.7-15.3% of the steps over baselines, by composing primitive actions (e.g., click) into higher-level skills (e.g., search product). We then highlight the efficacy of ASI in remaining efficient and accurate under scaled-up web activities. Finally, we examine the generalizability of induced skills when transferring between websites, and find that ASI can effectively reuse common skills, while also updating incompatible skills to versatile website changes.
1 Introduction
ASI addresses the challenge of learning specialized web tasks by inducing and reusing verifiable programmatic skills online. It improves success and efficiency across ordinary, longer-horizon, and cross-website activities.
- Motivation: Offline demonstrations may not cover the broad range of website domains, functionalities, and inference-time tasks.Online learning from test queries is presented as an alternative for avoiding potential distribution mismatch.
- Approach: ASI induces higher-level executable skills from primitive action trajectories and reuses them as actions on future tasks.Examples include wrapping clicks and scrolling into functions such as search product(name).
- Results: 23.5% higher success rate than the static agent baseline and 11.3% higher success rate than the textual-skill counterpart demonstrate ASI’s WebArena advantage.The comparison attributes the latter gain to verifiable, programmatic skills.
- Results: 10.7–15.3% fewer steps than baseline approaches show an efficiency benefit from composing primitive actions into higher-level skills.The programmatic action space lets agents execute multi-step procedures through skill calls.
- Scaled-up activities: In scaled-up scenarios, ASI reduces trajectories by 9.5 and 5.6 average steps compared with static and text-form agents, respectively.ASI also achieves tasks 20.7–38.9% more correctly in these longer-horizon settings.
- Cross-website generalization: ASI transfers common skills across websites and can refine or create skills when alternative designs make prior skills incompatible.The system therefore adapts online while retaining program-based verifiability.
2 Agent Skill Induction
The agent skill induction pipeline models online adaptation without demonstrations or ground-truth rewards. It induces executable skills, rewrites trajectories to test them, and adds only skills that pass correctness, usage, and validity checks.
- Problem setup: The LM-based agent policy combines a backbone, memory, and skill library while operating in a web-browser transition environment.The memory and skill library are supplied as context to the language-model backbone.
- Problem setup: Online adaptation uses a sequence of natural-language queries without demonstration trajectories or ground-truth rewards, while memory and skills persist across episodes.Each episode pairs a query with an observe–act trajectory that can update reusable agent content.
- Skill induction: An LM evaluator filters episodes predicted as correct because ground-truth rewards are unavailable.The filtered episodes provide inputs for subsequent skill induction.
- Skill induction: The induction module converts a filtered episode into one or more desired skills and updates the non-parametric skill library rather than the backbone parameters.ASI represents these skills as executable programs integrated directly into the action space.
- Programmatic representation: Program representation enables execution-based correctness verification and abstracts multiple low-level actions into higher-level calls that reduce task-solving steps.These properties motivate replacing free-form textual skills with executable programs.
- Program induction: Induction cleans episodes by removing execution-error steps and shortening thought descriptions from 87.9 to 13.4 tokens per step.The cleaned episode is then used to produce callable functions such as open marketing reviews() and search reviews(...).
- Skill verification: ASI rewrites and truncates an episode into a skill-using prefix so the agent can generate a targeted, checkable completion.Trailing primitive actions are removed to prevent spurious verification successes, after which the agent completes the prefix within the remaining horizon.
- Skill verification: A skill enters the library only when the completed trajectory is correct, uses at least one new skill, and causes environment changes for every skill call.These three checks jointly determine which called skills are added.
3 General Web Navigation Performance
ASI is evaluated on WebArena against static and text-skill adaptive agents, with analyses examining why executable programmatic skills improve performance. Results attribute benefits to verification, reusable skill structure, and executable action-space integration.
- Experiment Setup: WebArena evaluates general web navigation across five domains using natural-language tasks and program-based binary success scoring.The benchmark covers e-commerce, social forum, software development, content management, and travel.
- Results and Analysis: 23.5% higher success rate than the static baseline and 11.3% higher than AWM demonstrate ASI’s benchmark advantage.ASI uses programmatic skills, while AWM induces and uses textual skills.
- Results and Analysis: 15.3% and 10.6% fewer solution steps than vanilla and AWM agents show ASI’s additional efficiency benefit.A skill-call action can execute multiple primitive steps used by the baselines.
- Why are Programmatic Skills Better?: Programmatic skills provide clear functional boundaries and reusable granularity, whereas textual skills contain redundant, example-specific, and fuzzier procedures.The comparison uses representative skills induced on the shopping website.
- Why are Programmatic Skills Better?: Execution-based verification improves end success rate by 4.2 points, while verified programs transformed into text improve it by another 2.6 points in memory.The ablations distinguish induction quality from whether skills are used for memory or actuation.
4 Scaled-Up Browsing Activities
Scaled-up activities test agents on long-horizon, action-dense tasks with repeated subtasks and intermediate checkpoints. ASI uses composable skills to improve efficiency and success, including a multiple-address update case.
- Task Design: Long-horizon scaled-up tasks combine multiple subtasks and repetitive procedures, unlike WebArena’s mainly isolated single-task scenarios.Programs are suited to repeated invocation and composition.
- Task Design: Checkpoint-based evaluation measures average success rate and average solution steps across curated action-dense scenarios.The tasks include examples such as updating multiple addresses on a shopping website.
- Results: 6.6–14.6% fewer steps than vanilla and 4.0–8.4% fewer than AWM demonstrate ASI’s efficiency advantage across websites.The margin is reported to become more prominent as task horizons grow.
- Results: 38.9% and 20.7% higher average success rates than vanilla and AWM accompany ASI’s more efficient trajectories.Manual analysis attributes the improvement to easier, better planning with higher-level skills.
- Case Study: Changing Multiple Addresses: In the multiple-address case, ASI completes all required actions in 4 steps, shortening the horizon by 85.2% versus AWM’s 27-step trajectory.ASI handles each task part in one step, compared with AWM’s 3–6 steps for those parts.
5 Adapting Across Websites
The study evaluates whether induced skills transfer across sandboxed and real-world websites. ASI reuses common skills, detects incompatible programs, and updates or creates skills for new designs.
- Evaluation Setup: The evaluation tests transfer across same-domain websites and from simulated sandboxed sites to real-world counterparts.The study uses real-world website counterparts and information-seeking queries that avoid privacy leakage and risky actions.
- Transferring Common Skills: ASI effectively reuses common skills such as search product on a target website.Figure 4 illustrates reuse of the search product skill during the first step on Target.
- Incompatible Skills: Sorting skills can become incompatible when websites implement semantically similar operations with different interfaces.A dropdown-based sorting program from OneStopMarket does not apply to Target’s sidebar-based sorting interface.
- Results: The cross-website results report that ASI significantly surpasses baselines in success rate and number of steps.The reported significance criterion is |t| > 2 with p < 0.05.
- Scope: The real-world transfer study excludes administrative and software websites because of more severe safety concerns.This bounds the tested domain coverage.
- Adapting Skills to New Environments: ASI can induce new skills or update prior skills on a new website, preserving programmatic verification during adaptation.Within tens of examples, textual skills adapt faster, while ASI shows a more pronounced efficiency improvement.
6 Related Work
Related work develops adaptive agents and specialized skills across digital, embodied, and physical environments. Web-navigation research commonly explores skills offline and evaluates agents across diverse website tasks.
- Adaptive Digital Agents: Adaptive-agent research integrates past experiences into memory using human annotation, language-model synthesis, and agent-driven exploration.These approaches provide warm starts on websites of interest.
- Skill Discovery and Learning: Skill-discovery research has improved performance by learning specialized skills in programmatic, embodied, and physical environments.For web-navigation agents, much of this work focuses on offline exploration with reinforcement learning.
- Web Navigation Benchmarks: Web-navigation benchmarks cover shopping, social-media communication, knowledge work, and other website tasks.This work focuses on general web navigation using WebArena.
7 Conclusion and Future Discussions
The paper presents ASI as an online system for inducing, verifying, learning, and applying programmatic skills during web navigation. It reports gains on general and scaled-up tasks and flexible skill adaptation across websites, while identifying open questions about skill granularity, process stability, and quality.
- Conclusion: ASI autonomously induces, verifies, learns, and applies programmatic skills during online inference.Programmatic abstraction provides a high-level action interface for web-navigation agents.
- Conclusion: ASI achieves 23.5% success-rate improvement and 15.3% efficiency increase in general web tasks.The conclusion also highlights effectiveness on scaled-up activities and flexible updates in new environments.
- Future Discussions: Future investigation should examine suitable skill granularity, stability of online evolution, and skill quality relative to human-expert desiderata.These are identified as unresolved conceptual or empirical questions.
A Experiment Details
The experiments use a fixed initial action space and prompt-based procedures for evaluation, episode cleaning, and skill induction. Skill induction summarizes trajectories into reusable functions and rewrites examples using those functions.
- Action Space: The initial action space is shared by the static vanilla agent and the adaptive agent that learns textual skills.Table 7 documents the default action space used throughout the experiments.
- Episode Evaluation: Episode evaluation judges execution success from user intent, action history, final webpage state, and the agent response.The evaluator distinguishes information-seeking and other task types.
- Episode Cleaning: Episode cleaning summarizes the main action and corresponding state change from the agent’s reasoning and environmental description.The procedure converts browsing traces into concise action summaries.
- Skill Induction: Skill induction generates reusable Python functions from related action trajectories and rewrites each example using those functions.The functions are intended to cover parts of tasks with at least three actions and include Args, Returns, and Examples documentation.
B Skill Induction: Analysis
ASI curates and reuses executable skills to improve agent efficiency and support recurring web workflows. Its skills range from chained primitive actions to programs with conditional and iterative logic.
- Additional Analysis: The appendix provides further details on skill curation, reuse frequency, representative cases, task lists, and significance testing.These materials cover scaled-up and cross-website analyses as well as supporting statistical tests.
- Skill Curation and Reuse: 42.5% of WebArena cases reuse at least one skill, while 7.6% of tasks create skills.These figures indicate frequent reuse across websites and scalable skill learning.
- Skill Types: Programmatic skills chain frequently used primitive actions such as click and fill into reusable workflows.The search_product example illustrates this pattern as an access point for common workflows.
- Skill Types: Some skills encode advanced programming logic through if-else conditions or for/while loops.The category-navigation example includes an optional subcategory and sorting behavior.
- Skill Types: Sequential navigation skills operate over menu-ID lists, using hover actions followed by clicks to reach predefined categories.The example traverses a menu sequence and clicks the final identifier.
C.1 Scaled-Up Tasks
The scaled-up task materials define longer-horizon browsing evaluations and include exemplar tasks from shopping, social-forum, and software-development settings.
- Task Coverage: Scaled-up browsing tasks are exemplified on shopping, Postmill, and GitLab websites.The examples are presented as task tables for different web domains.
- Task Coverage: Cross-website examples cover shopping, social-forum, and software-development transfers, including OneStopMarket to Target, Postmill to Reddit, and GitLab to GitHub.These examples test generalization across related websites.
C.3 Significance Testing
Significance testing supports ASI’s scaled-up advantages over both text-based and static agents. On cross-web tasks, efficiency gains remain significant, while success-rate superiority depends on the comparison.
- Scaled-Up Tasks: Scaled-up ASI advantages in success rate and efficiency over AWM and VANILLA are statistically significant, with |t| > 2 and p < 0.05.The reported tests support both performance dimensions against both baselines.
- Test Reporting: The significance analyses are reported for scaled-up web tasks and cross-web tasks in Tables 17 and 18.The surrounding tables identify exemplar task settings across shopping, social forums, software development, and maps.
- Cross-Web Tasks: On cross-web tasks, ASI does not significantly outperform AWM in success rate but retains a significant efficiency advantage.The text attributes this pattern to the presumed flexibility of textual workflows.
- Cross-Web Tasks: Against static VANILLA agents on cross-web tasks, ASI significantly improves both success rate and efficiency, with |t| > 2 and p < 0.05.Efficiency is measured as a reduced number of steps.