Synapse: Trajectory-as-Exemplar Prompting with Memory for Computer Control
Longtao Zheng, Rundong Wang, Xinrun Wang, Bo An
Abstract
Building agents with large language models (LLMs) for computer control is a burgeoning research area, where the agent receives computer states and performs actions to complete complex tasks. Previous computer agents have demonstrated the benefits of in-context learning (ICL); however, their performance is hindered by several issues. First, the limited context length of LLMs and complex computer states restrict the number of exemplars, as a single webpage can consume the entire context. Second, the exemplars in current methods, such as high-level plans and multi-choice questions, cannot represent complete trajectories, leading to suboptimal performance in long-horizon tasks. Third, existing computer agents rely on task-specific exemplars and overlook the similarity among tasks, resulting in poor generalization to novel tasks. To address these challenges, we introduce SYNAPSE, a computer agent featuring three key components: i) state abstraction, which filters out task-irrelevant information from raw states, allowing more exemplars within the limited context, ii) trajectory-as-exemplar prompting, which prompts the LLM with complete trajectories of the abstracted states and actions to improve multi-step decision-making, and iii) exemplar memory, which stores the embeddings of exemplars and retrieves them via similarity search for generalization to novel tasks. We evaluate SYNAPSE on MiniWoB++, a standard task suite, and Mind2Web, a real-world website benchmark. In MiniWoB++, SYNAPSE achieves a 99.2% average success rate (a 10% relative improvement) across 64 tasks using demonstrations from only 48 tasks. Notably, SYNAPSE is the first ICL method to solve the book-flight task in MiniWoB++. SYNAPSE also exhibits a 56% relative improvement in average step success rate over the previous state-of-the-art prompting scheme in Mind2Web. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
48 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- AgentNet: Decentralized Evolutionary Coordination for LLM-based Multi-Agent Systems cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- MemEvolve: Meta-Evolution of Agent Memory Systems cites ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory
- MemEvolve: Meta-Evolution of Agent Memory Systems cites G-Memory: Tracing Hierarchical Memory for Multi-Agent Systems
Cited by top-tier papers48
- ReasoningBank: Scaling Agent Self-Evolving with Reasoning MemorySiru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen et al.ICLR 2026 · 244 citations
- G-Memory: Tracing Hierarchical Memory for Multi-Agent SystemsGuibin Zhang, Muxin Fu, Kun Wang, Frank Wan et al.NeurIPS 2025 · 108 citations
- AgentNet: Decentralized Evolutionary Coordination for LLM-based Multi-Agent SystemsYingxuan Yang, Huacan Chai, Shuai Shao, Yuanyi Song et al.NeurIPS 2025 · 104 citations
- MemEvolve: Meta-Evolution of Agent Memory SystemsGuibin Zhang, Haotian Ren, Chong Zhan, Junhao Wang et al.ICML 2026 · 69 citations
- How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following BehaviorZidi Xiong, Yuping Lin, Wenya Xie, Pengfei He et al.ACL 2026 · 64 citations
Builds on22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
Related papers
- A Zero-Shot Language Agent for Computer Control with Structured ReflectionTao Li, Gang Li, Zhiwei Deng, Bryan Wang et al.EMNLP Findings 2023 · 6 citations
- RaDA: Retrieval-augmented Web Agent Planning with LLMsMinsoo Kim, Victor S. Bursztyn, Eunyee Koh, Shunan Guo et al.ACL Findings 2024 · 5 citations
- Language Models can Solve Computer TasksGeunwoo Kim, Pierre Baldi, Stephen McAleerNeurIPS 2023 · 539 citations
- WebSynthesis: World Model-Guided Monte Carlo Tree Search for Efficient WebAgent Trajectory SynthesisYifei Gao, Junhong Ye, Yifan Yang, Jiaqi Wang et al.ACL 2026
- Plan-and-Act: Improving Planning of Agents for Long-Horizon TasksLutfi Eren Erdogan, Nicholas Lee, Sehoon Kim, Suhong Moon et al.ICML 2025
