Paper Summary – PolySkill
1. Abstract
Existing methods for skill learning often create skills that are over-specialized to a single website/task and fail to generalize.
This paper creates a new framework that enables agents to learn generalizable and compositional skills. The core idea, inspired by polymorphism in software engineering, is to decouple a skill’s abstract goal (what it accomplishes) and its concrete implementation (how it is executed).
Their findings show that separating a skill’s goal from its execution is a crucial step toward developing autonomous agents that can learn and generalize across the open web continuously.
2. Introduction
Nowadays a promising direction is skill induction. Agent Skill Induction (Wang et al., 2025) and SkillWeaver (Zheng et al., 2025) made these skills more robust by structuring them as code.
However, these methods primarily focus on same website, cross-task settings. They generate over-specialized skills that fail to generalize, leaving the critical challenge of cross-website generalization under-explored.
- First, how can we induce skills that are transferable across diverse websites?
- Second, beyond task success, how can we quantitatively measure skill transfer and reuse?
PolySkill, a framework that grounds agent skill learning in the principle of polymorphic abstraction, a cornerstone of object-oriented design from software engineering.
Defining:
- Abstract class (e.g., ‘AbstractShoppingSite‘) that serves as a common interface for a domain, specifying high-level goals like the method “search(query, filter)”.
- Concrete subclasses (e.g., ‘AmazonSite‘, ‘TargetSite‘) then provide the distinct, website-specific implementations.
This allows the agent to operate at an abstract level and create compositional skills that are not tied to any specific website’s functionality, decoupling them from brittle UI changes across websites.
This approach also enhances better composition, allowing the agent to
chain together abstract operations in the parent class like
search product(), addToCart(), and
checkout() to execute complex, multi-step tasks; while
preventing the need to implement the compositional skills per
website.
3. Implementation
The authors propose a hierarchical framework that separates skill learning into three complementary stages:
- skill discovery through polymorphic abstraction
- skill refinement through compositional verification
- skill deployment through adaptive execution.
3.1 Preliminary
3.1.1 Problem Formulation
The authors model the web agent’s interaction environment as a Partially Observable Markov Decision Process (POMDP), defined by the tuple ⟨𝒮, 𝒜p, 𝒯, Ω, 𝒪⟩.
- 𝒮 : is the latent state space representing the full underlying state of the web application
- 𝒜𝓅 : is the set of primitive actions the agent can execute on a webpage (e.g., click(element), type(text)).
- 𝒯 : 𝒮 × 𝒜𝓅 → Δ(𝒮): is the stochastic state transition function.
- Ω, 𝒪: Since agent cannot perceive the entire state S, it receives an observation ot ∈ Ω at each timestep t through the observation function 𝒪 : 𝒮→Δ(Ω)
3.1.2 LM-based Agent Policy
The authors consider an agent driven by a large language model (LM) backbone, L.
The agent’s policy, πℒ, determines the next action based on its current context.
This context consists of :
- a working memory ℳ, which stores the high-level task instruction and the history of observations and actions.
- a dynamic skill library 𝒦𝓉. The skill library contains reusable skills that expand the agent’s full action space to 𝒜𝓉 = 𝒜𝓅 ∪ 𝒦𝓉
Here the authors define:
- Each skill k ∈ 𝒦𝓉 is a parameterized sequence of actions: k(args) := a1 ⊕ a2 ⊕ a3...
- This menas that a skill k
is a combination of a sequence of basic actions. e.g. A skill to
implement a specific product search may be composed of actions like
move(mouse),click(element,type(text)andclick(element).
The policy is denoted as:
- πℒ(at ∣ ot, ℳ𝓉, 𝒦𝓉)
3.1.3 Task Execution and Objective
The agent’s goal is to complete a task specified by a natural language instruction q.
At each timestep t, the agent receives an observation ot, updates its memory ℳ𝓉, and selects an action at ∈ At using its policy.
Trajectory at timestep H: τ = (o0, a0, o1, a1, o2, a2, …, oH − 1, aH − 1,)
A task is considered successful if the trajectory satisfies a goal condition, indicated by a success function: g(τ, q) = 1.
The authors formalize this by maximizing an efficiency-aware reward expectation:
maxπL, K 𝔼q ∼ Q[ g(τ, q) − γ|τ| ]
- judge a trajectory: is the task complete? and how many steps it
takes
- task_reward: g(τ, q)
- step_num: τ
- penalty coefficient: γ
- Expectation:
- this is to
- Variables:
- policy: πL
- Skill Library: K
While this objective could be optimized as a loss function, the authors instead use this efficiency principle to guide our agent’s prompting.
3.2 PolySkill Framework
The authors introduce PolySkill, a framework that solves this problem by learning a domain-driven skill hierarchy. Instead of treating skills as isolated scripts, the authors organize them into classes based on a website’s category.
For example, skills for Amazon and Target are treated as concrete
implementations of an abstract AbstractShoppingSite
class.
This structure allows the agent to learn a general ”schema” for a type of website and then fill in the specific, reliable implementations for each new site it encounters.
Abstract Class:
![]()
Concrete implementations:
![]()
![]()
3.3 Skill Induction Process
3.3.1 Base of Skill Induction Pipeline
The PolySkill induction process is built on the pipeline established by ASI (Wang et al., 2025). In their framework, skill creation begins after a task is successfully completed using a sequence of primitive actions.
An LLM-based induction module analyzes this successful trajectory to propose one or more programmatic skills that encapsulate reusable parts of the workflow (Pan et al., 2024).
Before the skills are added to the library, a verification phase is done where the agent attempts to solve the same task again, this time by executing the newly generated skill.
Only if this new execution is deemed as successful is the skill considered validated and added to the agent’s library for future use.
3.3.2 Innovation via Polymorphic Skill Induction
A critical preliminary step in our framework is that if the agent is operating on its first shopping website, it must first induce the high-level abstract class, AbstractShoppingSite, which provides a common ground of skills signature across shopping-related skills.
Subsequently, during the skill induction phase, as the agent induces new skills on a specific site (e.g., amazon.com), it is guided to first register the corresponding function signature within the abstract class, and then define the concrete implementation within the site-specific class (e.g., AmazonWebsite, which inherits the AbstractShoppingSite).
This encourages the agent to learn skills that are not just locally effective but are structurally consistent implementations of a shared, domain-wide concept.
3.3.3 Skill Learning on Unseen Websites
Imagine the agent has already formed the AbstractShoppingSite class derived from its initial interaction with amazon.com, and now visits walmart.com for the first time. It immediately recognizes Walmart as a shopping site and retrieves the abstract blueprint.
This blueprint provides the agent with a clear set of exploration
goals. Instead of randomly trying actions, it knows it needs to figure
out how to concretely implement abstract skills
likesearch product and add to cart on this new
site.
Once the agent successfully searches for an item, it follows the standard induction process to create a new WalmartWebsite class, filling in the search product method with the specific actions that worked.

3.4 Evaluation Setup
We evaluate our induction process over baseline, in two different settings:
- Task-Defined Benchmarks In standard benchmark settings, we apply this process within controlled environments, including Mind2Web (Deng et al., 2023) and WebArena (Zhou et al., 2024a). Here, the agent is presented with a predefined curriculum of tasks. Each successful trajectory provides the validated sequence of actions needed to implement a concrete skill method.
- Task-Free Continual Learning: To assess the ultimate
goal of agent autonomy, we also apply our framework in a
task-free setting, similar to settings as Voyager (Wang et al.,
2023) and SkillWeaver (Zheng et al., 2025).
3.5 Evaluation Metrics
Five key metrics:
3.5.1 Success Rate
This is the fraction of tasks in the evaluation set, 𝒯𝓉ℯ𝓈𝓉, that the agent completed successfully. $$ \mathrm{SR} = \frac{1}{\lvert{\mathcal{T_{test}}}\rvert}\sum_{T_j\in \mathcal T_test}{} \mathbb I\left(\text{Task } T_j \text{ is successful}\right) $$
- 𝕀 is the indicator function which returns 1 if a task is successful and 0 otherwise.
3.5.2 Number of Steps
This is the average number of actions the agent takes to complete a task, calculated exclusively over successful trajectories to measure efficiency.
Let 𝒟success be the set of trajectories for successfully completed tasks. For each trajectory τ ∈ 𝒟success, let |τ| denote its length (number of actions). The average number of steps is: $$ \mathrm{Number\ of \ Steps} = \frac{1}{\lvert \mathcal D_{test} \rvert} \sum_{\tau \in \mathcal D_{test}} {\lvert \tau \rvert} $$
3.5.3 Skill Reusability:
This metric measures the efficiency of the skill library itself by calculating the fraction of learned skills that were used at least once.
Let 𝒦 be the final library of learned skills and 𝒟test be the set of all trajectories from the evaluation. The utilization is the fraction of skills k ∈ 𝒦 that appear in at least one trajectory τ ∈ 𝒟test. $$ \mathrm {Skill \ Resuability} = \frac {\lvert\{k \in \mathcal K \mid \exists \tau \in \mathcal D_{test}, k \in \tau\} \rvert} {\lvert \mathcal K \rvert} $$
- How many skill in skill library are used in trajectories?
- Low metric value means most skill have not been called. Only a few skills have been called.
3.5.4 Task Coverage / Skill Adoption Rate
This metric measures the prevalence of skill-based behavior.
Let 𝒟test be the set of all test task trajectories and 𝒦 be the library of induced skills.
The adoption rate is the fraction of trajectories τ ∈ 𝒟test in which at least one skill k ∈ 𝒦 was invoked: $$ \mathrm{Skill\ Adoption\ Rate} = \frac{\bigl\lvert\{\,\tau \in \mathcal{D}_{\mathrm{test}} \mid \exists\, k \in \mathcal{K},\ k \in \tau\,\}\bigr\rvert} {\lvert \mathcal{D}_{\mathrm{test}} \rvert} $$
- How many trajectories in test really used skill in library ?
- Low metric value means most skill is helpless.
3.5.5 Skill Compositionality
This metric evaluates the hierarchical structure of the skill library. Let the final skill library be an ordered set 𝒦 = {k1, …, KN} of N skills, where the index indicates creation time.
For each skill ki be the set of non-primitive actions in its implementation. The compositionality is the average number of previously learned skills reused in each new skill: $$ \mathrm{Skill\ Compositionality} = \frac{1}{N} \sum_{i=1}^{N} \bigl\lvert \{\, k_j \in \mathrm{body}(k_i) \mid j < i \,\} \bigr\rvert $$
- The average number of earlier-learned skills that each skill is composed of.
4. Experiments
4.1 Standard Benchmark Evaluation
Benchmark:
- Mind2Web
- WebArena
Model:
- Closed-source Model:
- GPT-4.1
- Claude-3.7-Sonnet
- Open-source Model:
- Qwen3-Coder-480B-A35B
- GLM-4.5
Baseline:
- Base
- ASI
- SkillWeaver

What is + Update model?
There are 2 types model for ASI and PolySkill: the static and the update one.
- Static: Train a skill library, then frozen the skill library and use it to test the benchmark.
- Update: After training the skill library, use it to test benchmark, but do not frozen it, let it update during the test.


