OS-Copilot: Towards Generalist Computer Agents with Self-Improvement

Zhiyong Wu, Chengcheng Han, Zichen Ding, Zhenmin Weng, Zhoumianze Liu, Shunyu Yao, Tao Yu, Lingpeng Kong

TL;DR

OS-Copilot is a conceptual framework enabling language agents to interact seamlessly with full operating systems via code execution, terminals, GUI actions, and APIs. Using this framework, the authors built FRIDAY, an embodied agent that autonomously synthesizes, executes, critiques, and stores reusable tools to master unfamiliar applications through self-directed learning.

What Problem Does This Paper Address?

Most current LLM-powered agents operate within tightly bounded silos—such as web browsers, sandboxed Python interpreters, or specific video games. However, real-world computer work requires navigating the diverse, heterogeneous ecosystem of an entire operating system (Linux, macOS, Windows).

Developing generalist OS agents presents two core hurdles:

  1. System Heterogeneity: Interacting with an OS requires coordinating heterogeneous interfaces (shell scripts, programming languages, GUI inputs, and external APIs).
  2. Generalization and Scalability: Manually designing tailored tools, prompts, and action spaces for thousands of third-party software programs is unfeasible. Agents need a way to learn and self-improve across new tools autonomously.

Methods

The authors introduce OS-Copilot and instantiate it via an agent named FRIDAY. Its core architecture revolves around three tightly coupled components:

  • Directed Acyclic Graph (DAG) Planner: Unlike sequential step-by-step planners, FRIDAY formulates plans as DAGs, allowing independent subtasks (e.g., training a model and drafting inference code) to execute in parallel.
  • Biologically Inspired Memory (Configurator):
  • Declarative Memory: Retains user profiles and semantic knowledge (past trajectories, directory structures, system versions).
  • Procedural Memory: Houses the tool repository (seeded with four basic utilities for search, web browsing, audio transcription, and image captioning).
  • Working Memory: Dynamically retrieves context, tracks execution state, and updates long-term storage.
  • Actor (Execution, Critic, and Refinement Loop):
  • An Executor implements subtasks via Python, Bash, APIs, or keyboard/mouse controls.
  • A Critic inspects environmental changes and execution outputs to determine success. It assigns a generality score (1–10) to newly minted code. High-scoring tools ($\ge 8$) are permanently retained in procedural memory.
  • If execution fails, a Refiner receives error diagnostics and iterates up to three times.
  • Self-Directed Learning: When faced with an unfamiliar domain, FRIDAY generates an automated curriculum of progressively difficult tasks, executes them, and self-accumulates atomic tools prior to solving test objectives.

Datasets

The authors evaluated the system on:

  • GAIA Benchmark: 466 complex multi-modal, tool-use question-answering tasks split across three difficulty levels.
  • SheetCopilot-20: A 20-task benchmark representing typical spreadsheet management operations (formatting, formulas, charts, pivot tables).
  • PowerPoint Slide Creation: A qualitative layout and formatting task requiring multi-step slide design using python-pptx.

Key Insights and Ideas

  • Self-Directed Curriculum Learning Enables Rapid Specialization: Rather than hand-coding APIs for every software suite, FRIDAY self-instructed on just 10 exploratory Excel tasks via openpyxl. This brief curriculum allowed it to accumulate 8 generalized tools, boosting its spreadsheet success rate from 0% to 60%.
  • Self-Criticism Outweighs Tool Library Size: While access to external tools helps (evidenced by GPT-4 Plugins beating AutoGPT-4), the addition of an active critique-and-refine feedback loop accounted for the largest leap in robustness.
  • Code Generation Over Direct GUI Automation: Operating through generated Python classes and shell scripts allows the agent to handle complex data manipulation far more reliably and quickly than naive pixel-based mouse-and-keyboard routines.

Key Results

  • GAIA Benchmark:
  • Level 1: FRIDAY reached 40.86% task success, beating GPT-4 Plugins (30.30%) and AutoGPT-4 (15.05%)—a 35% relative improvement over prior state-of-the-art.
  • Level 2: FRIDAY achieved 20.13% (vs. 9.70% for GPT-4 Plugins).
  • Level 3: Solved 6.12%, where all previous baselines scored 0%.
  • Efficiency: On Level-1 GAIA tasks, FRIDAY answered in 118 seconds on average, roughly 4× faster than AutoGPT-4 (456 seconds).
  • Domain Specialization: On SheetCopilot-20, FRIDAY progressed from 0% to 60% Pass@1, outperforming the domain-dedicated SheetCopilot system (55% with GPT-4).

Limitations and Future Work

  • Lack of Visual Grounding: FRIDAY relies primarily on scriptable backends and APIs. It struggles with closed-source commercial software that lacks command-line bindings and requires pixel-level GUI reasoning.
  • Web Navigation Limits: The system currently retrieves web content via search and URLs but cannot perform interactive in-browser tasks (e.g., clicking, filling dynamic forms).
  • Safety and Alignment: Giving an autonomous LLM write access to terminal commands and local files carries severe security risks. Safe sandboxing, interpretable operation traces, and alignment remain critical challenges before real-world deployment.

Summary updated

BibTeX
@inproceedings{wu2024os,
  author = {Zhiyong Wu and Chengcheng Han and Zichen Ding and Zhenmin Weng and Zhoumianze Liu and Shunyu Yao and Tao Yu and Lingpeng Kong},
  title = {{OS-Copilot: Towards Generalist Computer Agents with Self-Improvement}},
  booktitle = {LLMAgents @ ICLR},
  year = {2024},
  url = {https://openreview.net/forum?id=3WWFrg8UjJ},
}

Loading related content...

Figure