Paper Summary - Agent S
1. Introduction
1.1 Agent in OSWorld
The agent provided by OSWorld is a simplified Re-Act agent with:
- Observation:
ScreenshotorA11y Tree - Action:
computer_13orpyatuogui - Default context window:
3 turn information
The simple agent has no external task-plan model, skill model, memory model or tool model..
Reference:
OSWorld
1.2 Agent S
This work introduces a brand new multimodal agent framework comparing with the basic one provided by OSWorld.
This work mainly focus on task-planning and relative area.
They propose an Experience-Augmented Hierarchical Planning method.
- To decompose a complex task, the framework uses Online Web Knowledge and past experiences Narrative Memory.
- During the procession of subtask, the agent will retrieve detailed information related to the subtask from Episodic Memory. ( Note: I feel the Episodic Memory likes the skill for specific task nowadays. )
The input:
- Visual Input (Image)
- Accessibility Tree (A11y Tree)
Action Space:
- language-based primitives (Some Atom Action)

2. Agent S
Agent S integrates three main strategies:
- experience-augmented hierarchical planning
- continual update of narrative and episodic memory
- an Agent-Computer Interface (ACI) for precise perception and action on GUIs

2.1 Experience-Augmented Hierarchical Planning
2.1.1 Manager: Fusing External Knowledge and Internal Experience for Planning
The first stage of the complete workflow is planning. This work is mainly completed by the module Manager G.

The original input:
- User Task: \(T_u\)
- Initial Observation: \(O_0\) (Screenshot + A11y Tree)
The original input will be reformed into a form like ‘How to do X’.
Then the Manager G will do a search job:
- External: Online Web Search to acquire general knowledge. Get \(K_{web}\) .
- Local: Narrative Memory storing old local knowledge. Get \(E_n^u\) .
Then the work will infuse the \(K_{web}\) and \(E_n^u\) into a fused knowledge \(K_{fused}\). \[ \begin{align} Q &= \mathrm{LLM}(T_u, O_0) \\ \qquad K_{web} &= \mathrm{Retrieve}(Web, Q) \\ \qquad E_n^u &= \mathrm{Retrieve}(M_n, Q)\\ \qquad K_{fused} &= \mathrm{LLM}(M_n(Q), K_{web}) \end{align} \] \(K_{fused}\) will be used by the Subtask Planner to generate a subtask queue. \[ \langle s_0 .. s_n \rangle \] The manager also generates associated context \(C_{s_i}\) for each subtask \(s_i\) which includes additional information useful to accomplish the subtask.
2.1.3 Worker: Learning from Subtask Experience and Trajectory Reflection (ReAct Loop)

The subtasks \(\langle s_0 \dots s_n \rangle\) generated by the Manager \(G\) are executed sequentially by Worker modules \(\langle w_0 \dots w_n \rangle\).
Worker will retrieve similar subtask experience \(E_{s_i}\) from the Episodic Memory by the combination of User Task \(T_u\), Subtask \(s_i\) and the contextual information \(C_{s_i}\).
\(E_{s_i} = \text{Retrieve}\left(M_e,\langle Q, s_i, C_{s_i} \rangle\right)\)
A Trajectory Reflector submodule \(TR_i\) is associated with each worker. This submodule observes the entire episode as the worker is executing the subtask and provides reflective advice to the agent—helping it think of alternative strategies and avoid repetitive actions.
The subtask experience \(E_{s_i}\) and the \(reflection\) is used by the Action Generator submodule inside a Worker to generate a single structured response - consisting of:
- a previous action status check
- observation analysis
- semantic next action
- grounded next action
This structured response allows the agent to generate a templated chain-of-thought for improved reasoning and results in a single grounded action \(a_j\).
If the subtask is FAIL, the Subtask Planner should re-plan the subtasks.
If the subtask is DONE, the evaluator observes the complete episode and generates learning in the form of a summarization of the strategy used by the worker to complete that subtask.
2.1.3 Self-Evaluator: Summarizing Experience as Textual Rewards
The Self-Evaluator S is responsible for generating experience summaries as textual rewards r for the Manager and Worker modules.
- In the case of the successful end of a subtask with a DONE signal, the Evaluator will generate learnings in the form of a summarization of the strategy used by the Worker to complete that subtask. This strategy is fed back into the Worker’s Episodic Memory \(M_e\).
- In the case of the end of the complete user task, indicated either by the successful completion of all subtasks or by the maximum number of steps limit, the Evaluator generates a learning signal in the form of the summary of the entire task completion process. This summary is fed back and saved in the Narrative Memory \(M_n\) of the Manager.
2.2 Memory Construction and Update
2.2.1 Memory Initialization
The Narrative Memory \(M_n\) and Episodic Memory \(M_e\) should be initialized firstly.
Agent S conducts self-supervised exploration on a set of synthetically generated tasks.
| Memory | Key | Retrieval Granularity | Content |
|---|---|---|---|
| Narrative Memory \(M_n\) (used by Manager) | \(Q\) (task-level query) | task-level | Full-task experience — abstractive summaries with specific actions removed (both successful and failed trajectories stored) |
| Episodic Memory \(M_e\) (used by Worker) | \(\langle Q, s_i, C_{s_i} \rangle\) | subtask-level | Subtask step experience with specific grounding actions |

2.2.2 Memory Update

2.3 Agent-Computer Interface
As for Agent-Computer Interface, previous works have shown that grounding is a significant bottleneck in these agents.
Desktop environments, however, provide an easily parable Accessibility Tree with coordinate information about almost every element in the UI.
Dual-input strategy
- Image Input: used by the Agent to observe salient details about the environment—such as popups, button states, checking if a previous action worked, and reasoning about the next step.
- Accessibility Tree: input is used for reasoning about the next step and, more importantly, grounding specific elements in the environment.
The Accessibility Tree has limitations:
- Text is painted into images, canvas, WebGL, or custom controls and is never exposed to the accessibility API at all.
- Some applications do not implement accessibility correctly, so their elements never make it into the tree.
- Text that is visible on screen is missing from the DOM/a11y tree.
So this work use OCR to recognize text in screenshot, then add those information into Accessibility Tree.
Not like the Action Space in OSWorld (almost unlimited), the action space in Agent S is limited.

3. Workflow


