Literature
Display
← All papers

Agent Workflow Memory

Zora Zhiruo Wang · Jiayuan Mao · Daniel Fried · Graham Neubig

· ICML 2025 ↗

AI agents13 min text · CondensedOriginal paper ↗
Contents

Overview

The entire paper and three appendices are condensed below. All seven figures, eleven numbered tables, references, the induction prompt, and eight complete example workflows are retained. Reported gains in individual-step accuracy are distinguished from success on complete tasks.

At a glance

Agent Workflow Memory extracts reusable routines from prior action trajectories and adds them to a language-model agent’s context. Workflows can be induced before evaluation from training examples or accumulated online from model-judged successes. AWM improves the reported WebArena task success and Mind2Web step success, with useful transfer across tasks, websites, and domains. Its main mechanism is contextual memory rather than model-weight training; incorrect workflows, context growth, and changing interface states remain limitations.

1 Introduction

Fixed demonstrations can encourage repetition of example-specific choices and do not accumulate experience across tasks. AWM instead extracts smaller routines with variable placeholders and reuses them as guidance. An online agent can build more complex procedures from earlier ones, illustrated by extending a place search into a zip-code lookup. The experiments test this adaptation on text-based web navigation, not unrestricted computer use or visual interaction.

Refer to caption
Figure 1: AWM enables agents to continuously induce and apply workflows to improve performance, compared to stagnant baselines. We show results by AWM on the WebArena map split as an example.

2 Agent Workflow Memory

The method specifies a workflow representation, an induction procedure, and offline or online memory updates.

2.1 Problem Statement

At each step, the language model receives the task, memory, and current observation and predicts an action. Execution changes the environment; the loop ends on STOP or a task limit. An experience contains the instruction and observation/action trajectory. An induction module maps experiences to workflows, which are appended to memory. Here memory means prompt context containing action documentation and examples, rather than a separately trained recurrent state or external executable program library.

2.2 Workflow Representation

Each workflow has a natural-language goal description and a sequence of steps. A step describes the relevant environment state, includes a rationale for the action, and gives an action expression. Placeholders abstract nonfixed values such as product names or element identifiers. These stored rationales are part of the paper’s agent input examples; they do not guarantee that the agent will apply the routine correctly in a new state.

Refer to caption
Figure 2: Illustration of our AWM pipeline: an agent takes actions to solve given queries, induces workflows from successful ones, and integrates them into memory.

2.3 Inducing and Using Workflows

Induction converts one or more successful or canonical trajectories into reusable subroutines. The resulting routines become additional context for future actions, allowing the agent to adapt a procedure rather than mechanically execute every stored step.

LM-based Workflow Induction

The language-model prompt requests common, nonoverlapping routines with at least two steps and descriptive variables for changing values. It favors a reusable task fragment such as product search over an entire one-off purchase. Outputs are split at blank lines and stored as separate workflows. This abstraction is prompted rather than formally verified, so the examples can retain concrete identifiers or erroneous assumptions.

Refer to caption
Figure 3: Illustration of AWMoffline.

Offline Scenario

Offline induction concatenates a website’s training experiences into a prompt and extracts workflows before testing. All induced routines are then added to that site’s agent context, and the same memory is reused for its test tasks. This setting benefits from reliable demonstrations but can inherit a mismatch between the training tasks and later queries.

Online Scenario

Online AWM starts with primitive-action documentation and processes test queries sequentially. After an attempted task, a language-model evaluator Pan et al. (2024) predicts whether the trajectory succeeded; only predicted successes are converted into workflows and added for subsequent queries. Final benchmark scoring is separate from this self-evaluation. The method needs no annotated demonstration set in this setting, but it does rely on pretrained models, an evaluator, and experience from earlier test queries. False-positive evaluations can propagate incorrect routines, and results describe adaptation over a stream rather than independent fixed-memory inference.

Refer to caption
Figure 4: Illustrations of AWMonline.

3 Experiments

Experiences and memories are grouped by website, keeping contextual routines relevant and limiting the size of each collection. Evaluation uses WebArena’s executable environment and Mind2Web’s step-level prediction protocol; their success measures are not interchangeable.

3.1 WebArena

WebArena contains 812 tasks across five websites. AWM uses the BrowserGym action space and accessibility-tree observations with GPT-4-0613 at temperature zero. Because no matching training set is supplied, AWM operates online. Comparisons include the published BrowserGym system, an accessibility-tree-only version, and SteP’s fourteen human-written workflows. Those baselines differ in observations or human supervision, which the table makes explicit.

3.1.1 Main results

AWM reaches 35.5% overall success, versus published BrowserGym’s 23.5%, its accessibility-tree-only variant’s 15.0%, and SteP’s 33.0%. The 12.0-point gain over published BrowserGym is a 51.1% relative increase. The average reported action count is 5.9 versus 7.9 for the accessibility-tree baseline and 46.7 for AutoEval. Fewer environment actions do not account for all workflow-induction/evaluation calls or total token and computation cost. AWM improves every website over the accessibility-tree baseline, while SteP remains stronger on shopping and Reddit and slightly on GitLab.

Table 1: Task success rate on WebArena using gpt-4, and score breakdown on five website splits.
Method Total SR Shopping CMS Reddit GitLab Maps # Steps
With human engineered workflows
*SteP (Sodhi et al., 2023) 33.0 37.0 24.0 59.0 32.0 30.0 -
Autonomous agent only
WebArena (Zhou et al., 2024) 14.9 14.0 11.0  6.0 15.0 16.0 -
AutoEval (Pan et al., 2024) 20.2 25.5 18.1 25.4 28.6 31.9 46.7
BrowserGym (Drouin et al., 2024) 23.5 - - - - - -
BrowserGymax-tree 15.0 17.2 14.8 20.2 19.0 25.5   7.9
AWM (ours) 35.5 30.8 29.1 50.9 31.8 43.3   5.9
Refer to caption
Figure 5: AWM enables rapid learning from a small amount of data, i.e., about 40 queries, using WebArena map test split as an example.

3.1.2 Efficient learning from small amounts of data

The map-site example plots cumulative success as the online stream progresses. Most early improvement appears within roughly forty queries, after which the cumulative rate stabilizes. This supports useful learning from a modest stream in the illustrated setting; the cumulative plot alone does not isolate task-order effects or provide repeated-run uncertainty.

3.1.3 Cross-template workflow generalization

To reduce gains from repeated template instances, the authors sample one task per template, yielding 197 tasks across the five sites. AWM obtains 33.2% success versus 20.5% for the accessibility-tree baseline and 32.1% for SteP. This is evidence of transfer beyond repeated instances of the same template. The source’s claim of leading every website overstates the table: SteP is higher on shopping, and several other entries tie.

Table 2: Task success rate on the cross-template subset of WebArena, as well as the result breakdown on each website split. We mark the number of examples for each website split under the name.
Method Total SR Shopping CMS Reddit GitLab Maps
(51) (45) (24) (45) (32)
With human engineered workflows
*SteP (Sodhi et al., 2023) 32.1 26.5 29.3 52.2 27.3 36.4
Autonomous agent only
AutoEval (Pan et al., 2024) 23.2 12.2 17.1 21.7 31.8 36.4
BrowserGymax-tree 20.5 10.4 17.8 23.1 27.3 28.6
AWM (ours) 33.2 24.5 29.3 52.2 31.8 39.4
Refer to caption
Figure 6: AWM builds increasingly complex workflows over time, by learning from past examples and earlier workflows.

Building increasingly complex workflows

The retained case study shows an induced place-search routine later reused as the first part of a zip-code lookup. It illustrates composition of contextual instructions and newly observed steps, rather than a guarantee of arbitrary hierarchical skill composition.

3.2 Mind2Web

Mind2Web scores selected elements, action F1, jointly correct steps, and tasks for which every annotated step is correct. Unlike WebArena’s end-state execution scoring, these are trajectory-matching measures. The agent uses the same element filter as MindAct/Synapse but augments workflows instead of retrieved complete examples. GPT-3.5-turbo and GPT-4 are tested at temperature zero, using the same model family for induction and action generation.

3.2.1 Main results

Offline GPT-4 AWM improves step success from MindAct’s 36.2% to 45.1%, a gain of 8.9 percentage points or 24.6% relative. Complete-task success rises from 2.0% to 4.8%, remaining low. With GPT-3.5, AWM reaches 34.6% step success and 2.8% task success, versus Synapse’s 30.6% and 2.4%. Element accuracy improves strongly, while action F1 is below MindAct’s. The abstract’s 24.6% Mind2Web headline concerns step success, not a 24.6% relative increase in complete-task success.

Table 3: AWM offline results on Mind2Web cross-task dataset. Elem Acc and SR are short for element accuracy and success rate. We footnote the GPT variant used by each method, 3.5 and 4 stands for gpt-3.5-turbo and gpt-4, respectively. We highlight the best result within the same model variant.
Method Elem Acc Action F1 Step SR SR
MindAct3.5 20.3 56.6 17.4 0.8
CogAgent3.5 - - 18.6 -
Synapse3.5 34.0 - 30.6 2.4
AWM3.5 39.0 52.8 34.6 2.8
MindAct4 41.6 60.6 36.2 2.0
AWM4 50.6 57.3 45.1 4.8

Abstract sub-routines vs. concrete experiences

Compared with retrieved full examples, the reusable routines are associated with better element selection and step success. The authors attribute this to abstraction of incidental values and smaller task fragments. The representation ablations offer supporting comparisons, but this interpretation does not establish that every improvement is caused by reduced example bias alone.

Learn to diverge from workflow guidelines

Stored workflows can also bias the agent toward an action that is inappropriate for the current page. Lower action F1 despite higher element accuracy shows the need to depart from a remembered routine when the live state differs.

3.2.2 Online AWM Enables Generalization

Online induction is tested on cross-task, cross-website, and cross-domain splits. Offline comparisons reuse training workflows from the same domain where available, or sample across domains otherwise. Online adaptation derives memory from the current stream and therefore reduces dependence on matching training demonstrations, while remaining subject to errors and novelty within that stream.

Table 4: Success rate on Mind2Web cross-task, cross-website, and cross-domain generalization test, using gpt-4 model. EA is short for element accuracy and AF1 is short for action F1.
Method Cross-Task Cross-Website Cross-Domain
EA AF1 Step SR SR EA AF1 Step SR SR EA AF1 Step SR SR
MindAct* 41.6 60.6 36.2 2.0 35.8 51.1 30.1 2.0 21.6 52.8 18.6 1.0
AWMoffline 50.6 57.3 45.1 4.8 41.4 46.2 33.7 2.3 36.4 41.6 32.6 0.7
AWMonline 50.0 56.4 43.6 4.0 42.1 45.1 33.9 1.6 40.9 46.3 35.5 1.7

In-domain, cross-task scenario

For cross-task GPT-4 evaluation, offline AWM reaches 45.1% step/4.8% task success; online reaches 43.6%/4.0%. High-quality matching demonstrations can therefore beat self-generated experience. Online induction may be preferable when the training examples concern different tasks on the same site, but evaluator mistakes can contaminate its memory.

Extending to unseen websites and domains

Online AWM reaches 33.9% step success on unseen websites and 35.5% on unseen domains, versus MindAct’s 30.1% and 18.6%. The larger cross-domain gain is 16.9 percentage points in Table 4. Complete-task success is 1.6% and 1.7%, respectively; the cross-website task score is below MindAct’s 2.0% despite better step accuracy. Online memory helps these distribution shifts without eliminating them.

4 Exploring Optimal Workflow Representations

Representation studies compare model-induced abstractions with rule-filtered full experiences, verbal versus code-like actions, and natural-language versus HTML observations.

4.1 How much does the sub-routine, abstract format contribute?

The rule-based alternative deduplicates trajectories by action-type sequence and filters invalid action syntax. It does not abstract task-specific values or learn smaller subroutines, making it a useful comparison for the additional model-based induction step.

Table 5: AWM success rate on WebArena using gpt-4, with rule- and lm-based induction.
Method Total SR # Steps
AWMrule 35.6   6.3
AWMlm 35.5   5.9

WebArena Results

On WebArena, rule-based and model-based induction have nearly identical success: 35.6% and 35.5%. Model induction uses 5.9 steps versus 6.3. Thus the result supports a modest efficiency difference rather than an accuracy advantage for model-induced abstraction on this benchmark.

Mind2Web Results

On Mind2Web, model induction yields 45.1% step success versus 43.4% for rules, and 4.8% task success versus 2.0%. The text’s 2.8-point margin refers to complete-task success; the step gain is 1.7 points.

Table 6: AWM results with different workflow induction methods on Mind2Web cross-task dataset.
Method Elem Acc Action F1 Step SR SR
MindAct4 41.6 60.6 36.2 2.0
AWM4,rule 49.5 57.0 43.4 2.0
AWM4,lm 50.6 57.3 45.1 4.8

4.2 Workflows in Descriptive Texts

Verbalizing the action sequence slightly improves step success from 45.1% to 45.4% but reduces task success from 4.8% to 3.6%. Both textual and code-like routines can guide context, and this ablation supplies no clear overall winner.

Table 7: Mind2Web cross-task results with AWM using code and text workflows.
Method Elem Acc Action F1 Step SR SR
MindAct 41.6 60.6 36.2 2.0
AWM 50.6 57.3 45.1 4.8
AWMtext 51.2 57.4 45.4 3.6

4.3 Environment Abstraction in Workflows

With GPT-3.5, natural-language state descriptions yield 34.6% step success, filtered HTML 33.8%, and both together 32.9%. The authors suggest context length and irrelevant/missing HTML elements as possible causes. Their filtered representation misses all correct elements in 47% of the analyzed cases, limiting its grounding value; these explanations are hypotheses rather than isolated causal tests.

Table 8: Mind2Web results using GPT-3.5-turbo with different environment representations.
Desc. HTML Elem Acc Act F1 Step SR SR
✓ ✗ 39.0 52.8 34.6 2.8
✗ ✓ 38.1 54.0 33.8 2.8
✓ ✓ 37.1 51.3 32.9 2.0

5 Exploring Workflow Utilization in Context and in Action

A variant turns workflows into callable multi-action shortcuts as well as contextual guidance. It raises step success from 45.1% to 46.4%, but Table 9 reports task success falling from 4.8% to 3.6%. The prose instead claims equal 3.2% scores, an internal inconsistency; the original table is retained. Workflow actions are called in only 18.5% of tasks. A flight-booking example shows why fixed macros fail: entering a city reveals airport options that require inspecting the new state before choosing. Dynamic observation and branching would be needed for robust execution.

Table 9: Mind2Web results with AWMAS variant that alters the action space besides memory augmentation. All methods use gpt-4.
Method Elem Acc Action F1 Step SR SR
MindAct 41.6 60.6 36.2 2.0
AWM 50.6 57.3 45.1 4.8
AWMAS 51.8 56.7 46.4 3.6
Refer to caption
Figure 7: An example of dynamic environment changes that challenge workflow action utilization.

6 Related Work

Web Agent Benchmarks

Web benchmarks range from simplified browser tasks and simulated shopping to realistic executable websites and broad recorded trajectories. AWM uses WebArena for functional execution and Mind2Web for website/domain generalization, without addressing the visual-input extensions in this paper.

Enhancing Agents for Complex Tasks

Related approaches alter action spaces, add self-feedback, or retrieve demonstrations. AWM contributes a reusable memory format and an online update process that can operate when an annotated training collection is unavailable.

Learning Common Procedures from Experiences

Program-library learning and language-model skill induction both seek reusable procedures. AWM primarily uses routines as flexible context rather than executable skills, reducing the need to bind every stored action directly to a new interface. The macro experiment shows that grounding difficulties return when routines are executed rigidly.

7 Conclusion

Reusable contextual workflows improve reported web-agent performance and can accumulate online. Main limits include self-evaluator errors, website-specific memory organization, dependence on the query stream, low all-steps-correct task success on Mind2Web, context cost, and difficulty adapting fixed routines to changing page states. The results support contextual procedural reuse rather than reliable autonomous completion of all long tasks.

Acknowledgments

The authors acknowledge discussions with colleagues and support from the CMU Teng Family Presidential Fellowship.

Appendix A LM-Based Workflow Induction

The appendix supplies the exact induction prompt, eight complete workflows, and intermediate quality measures. These concrete examples also reveal where numeric element identifiers remain despite the intended abstraction.

A.1 Model Prompt

The same induction prompt is used for both benchmarks. Its complete instructions are retained below.

Given a list of web navigation tasks, your task is to extract the common workflows.

Each given task contains a natural language instruction, and a series of actions to solve the task. You need to find the repetitive subset of actions across multiple tasks, and extract each of them out as a workflow.

Each workflow should be a commonly reused sub-routine of the tasks. Do not generate similar or overlapping workflows. Each workflow should have at least two steps. Represent the non-fixed elements (input text, button strings) with descriptive variable names as shown in the example.

A.2 Example Workflows

The original examples retain their explanations, action syntax, variable placeholders, and concrete identifiers.

WebArena Workflows

Five WebArena routines cover category browsing, field editing/saving, forum selection, repository-contributor lookup, and map travel-time queries. They are examples of contextual guidance; the concrete page identifiers should not be assumed valid on another page.

## shopping: Browse Products in a Specific Category

To browse products in a specific category, I need to navigate to the relevant main category. I will start by hovering over the main category menu item to reveal the subcategories.

hover(’main_category_id’)
To browse products in the specific subcategory, I need to click on the subcategory link.

click(’subcategory_id’)

## shopping admin: Edit and Save Changes

This workflow is used to edit specific fields and save changes.

To edit a specific field, I need to locate the field and update its value.

clear(’field_id’)
fill(’field_id’, ’new_value’)

Next, I need to save the changes by clicking the ”Save” button.

click(’save_button_id’)

## reddit: Navigate to a forum section and select a specific forum

To navigate to a specific forum, I need to click on the ”Forums” section.

click(’42’)
Now, I need to click on the specific forum link based on the forum name provided.

click(’<forum_link_id>’)

## gitlab: Navigation to Repository and Contributors Section

This workflow involves searching for a repository and navigating to its contributors to find detailed contribution data.

First, search for the specific repository to gather information.

fill(’130’, ’{RepositoryName}’)
press(’130’, ’Enter’)
Navigate to the “Contributors” section to view contribution details.

click(’311’)   # “Contributors” link
Obtain and report the required contributor details.

send_msg_to_user(’{ContributorDetails}’)

## map: Calculate Travel Time and Distance

To calculate travel time and distance between two locations, I will use the directions feature. I will fill in the respective fields and select the mode of transportation.

fill(’158’, ’FROM_LOCATION’)
fill(’163’, ’TO_LOCATION’)
select_option(’166’, ’MODE_OF_TRANSPORTATION’)
click(’171’)
I will use these details to provide the user with accurate travel time and distance information.

send_msg_to_user(’The distance between FROM_LOCATION and TO_LOCATION is DISTANCE and the estimated travel time is TIME.’)

Mind2Web Workflows

Three Mind2Web routines cover flight locations, shopping search/sort, and entertainment search/selection. The flight routine explicitly includes choosing a popup option, illustrating the state-dependent step discussed in the macro-action failure case.

# travel: enter_flight_locations

Given that you are on the flight booking page, this workflow enters the departure and destination city/airport for your flight.

[link] From Departure Airport or City Your Origin −⁣>-> CLICK

[textbox] Origin City or Airport −⁣>-> TYPE: {your-origin-city}

[link] {best-popup-option} −⁣>-> CLICK

[link] To Destination Airport or City Your Destination −⁣>-> CLICK

[textbox] Destination City or Airport −⁣>-> TYPE: {your-destination-city}

[link] {best-popup-option} −⁣>-> CLICK

# shopping: search_and_sort

Given that you are on the Amazon search results page, this workflow searches for a product and sorts the results.

[textbox] Search Amazon −⁣>-> TYPE: {search-term}

[button] Go −⁣>-> CLICK

[span] Sort by: −⁣>-> CLICK

[option] {sort-option} −⁣>-> CLICK

# entertainment: search_and_select

Given that you are on the IMDb homepage, this workflow searches for a term and selects the best match.

[textbox] Search IMDb −⁣>-> TYPE: {search-term}

[button] Submit Search −⁣>-> CLICK

[button] {best-match} −⁣>-> CLICK

A.3 Workflow Quality Analysis

Table 10 reports 7.4 workflows for WebArena and 7.3 for Mind2Web, with utility rates of 0.94 and 0.91. Mind2Web coverage is 0.40; reported functional overlap is 0.08 and 0.20. Coverage is unavailable for WebArena because canonical trajectories are absent. The prose describes workflow count per example, but the table provides no additional denominator detail. These descriptive statistics measure reuse and overlap rather than prove that an induced workflow is correct.

Table 10: Quality evaluation of model-induced workflows on Mind2Web dataset.
Metric # Workflows Coverage Function Overlap Utility Rate
WebArena 7.4 - 0.08 0.94
Mind2Web 7.3 0.40 0.20 0.91

Appendix B Rule-Based Workflow Induction

Rule induction groups experiences by primitive-action sequence and keeps one random representative by default. WebArena additionally deduplicates by task template. CLICK and TYPE steps must have string-formatted integer element IDs; invalid argument forms are removed. This syntactic filter does not verify that the selected element or action achieves the task. The retained rule examples illustrate the exact filtering convention.

CLICK(12) → CLICK('12') → CLICK('30') → TYPE(44, "cat") → TYPE('44', "cat") → CLICK('12') → CLICK('30') → TYPE('44', "cat")

Appendix C Integrating AWM Offline and Online

Combining offline initialization with online updates does not produce additive gains. Step success for the combined method is 44.5%, 33.3%, and 34.1% across task, website, and domain splits; complete-task success is 1.6%, 1.1%, and 1.5%. Some combined scores are below both standalone variants, so the source’s broad description as intermediate performance is not uniformly true. The authors hypothesize that incompatible offline routines impair later induction and use.

Table 11: Success rate on Mind2Web cross-task, cross-website, and cross-domain generalization test, using gpt-4 model. EA is short for element accuracy and AF1 is short for action F1.
Method Cross-Task Cross-Website Cross-Domain
EA AF1 Step SR SR EA AF1 Step SR SR EA AF1 Step SR SR
MindAct* 41.6 60.6 36.2 2.0 35.8 51.1 30.1 2.0 21.6 52.8 18.6 1.0
AWMoffline 50.6 57.3 45.1 4.8 41.4 46.2 33.7 2.3 36.4 41.6 32.6 0.7
AWMonline 50.0 56.4 43.6 4.0 42.1 45.1 33.9 1.6 40.9 46.3 35.5 1.7
AWMoff+on 50.0 57.0 44.5 1.6 41.8 45.5 33.3 1.1 39.3 44.3 34.1 1.5
Concept demonstration

Open image ↗