SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.00906 · 2025

Agent S2: A Compositional Generalist-Specialist Framework for Computer Use Agents

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2504.00906.json · badge: /api/ran/2504.00906.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
simular-ai/agent-s canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
execute_code Ran
ran on a synthesized input
simular-ai/agent-s/gui_agents/s3/agents/code_agent.py
code served (permissive licence) · get_code("80e0cd7f0c4f74bf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
from typing import Dict, List, Tuple, Optional

logger = logging.getLogger('desktopenv.agent')


# Stand-in class for env_controller
class MockEnvController:
    def run_bash_script(self, code: str, timeout: int = 30) -> Dict:
        """Mock implementation of bash script execution."""
        return {
            'status': 'success',
            'output': f'Bash script executed: {code[:50]}...',
            'return_code': 0
        }
    
    def run_python_script(self, code: str) -> Dict:
        """Mock implementation of python script execution."""
        return {
            'status': 'success',
            'output': f'Python script executed: {code[:50]}...',
            'return_code': 0
        }


ARGS = {
    'code_type': 'python',
    'code': 'print("Hello, World!")',
    'env_controller': MockEnvController()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_code_block Ran
ran on a synthesized input
simular-ai/agent-s/gui_agents/s3/agents/code_agent.py
code served (permissive licence) · get_code("5b5848f799f23954")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
from typing import Dict, List, Tuple, Optional

logger = logging.getLogger('desktopenv.agent')

def extract_code_block(action: str) -> Tuple[Optional[str], Optional[str]]:
    """Extract code and determine type from action string."""
    if '```python' in action:
        code_type = 'python'
        code = action.split('```python')[1].split('```')[0].strip()
    elif '```bash' in action:
        code_type = 'bash'
        code = action.split('```bash')[1].split('```')[0].strip()
    elif '```' in action:
        code_type = None
        code = action.split('```')[1].split('```')[0].strip()
    else:
        code_type = None
        code = None
    logger.debug(f'Extracted code block: type={code_type}, length={(len(code) if code else 0)}')
    return (code_type, code)

ARGS = {
    'action': '```python\nprint("hello world")\n```'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_result Ran
ran on a synthesized input
simular-ai/agent-s/gui_agents/s3/agents/code_agent.py
code served (permissive licence) · get_code("41a765b894e86972")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
from typing import Dict, List, Tuple, Optional

logger = logging.getLogger('desktopenv.agent')

def format_result(result: Dict, step_count: int) -> str:
    """Format execution result into context string."""
    if not result:
        logger.warning(f'Step {step_count + 1}: No result returned from execution')
        return f'\nStep {step_count + 1} Error:\nError: No result returned from execution\n'
    status = result.get('status', 'unknown')
    return_code = result.get('returncode', result.get('return_code', -1))
    if 'returncode' in result:
        output = result.get('output', '')
        error = result.get('error', '')
    else:
        output = result.get('output', '')
        error = result.get('error', '')
    logger.debug(f'Step {step_count + 1}: Status={status}, Return Code={return_code}')
    result_text = f'Step {step_count + 1} Result:\n'
    result_text += f'Status: {status}\n'
    result_text += f'Return Code: {return_code}\n'
    if output:
        result_text += f'Output:\n{output}\n'
    if error:
        result_text += f'Error:\n{error}\n'
    return result_text


ARGS = {
    'result': {
        'status': 'success',
        'returncode': 0,
        'output': 'Command executed successfully',
        'error': ''
    },
    'step_count': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_agent_s Ran
ran on a synthesized input
simular-ai/agent-s/integrations/openclaw/agent_s_wrapper.py
code served (permissive licence) · get_code("91057ba978e5ccad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import sys

# Set up minimal environment variables that the function checks
os.environ['AGENT_S_PATH'] = '/usr/local/bin/agent_s'
os.environ['AGENT_S_GROUND_URL'] = 'http://localhost:8000'
os.environ['AGENT_S_GROUND_API_KEY'] = 'test-api-key'
os.environ['AGENT_S_GROUND_MODEL'] = 'ui-tars-1.5-7b'
os.environ['AGENT_S_GROUNDING_WIDTH'] = '1920'
os.environ['AGENT_S_GROUNDING_HEIGHT'] = '1080'

ARGS = {
    'task': 'Navigate to example.com and take a screenshot',
    'max_steps': 15,
    'enable_reflection': True,
    'enable_local_env': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
show_permission_dialog Ran
ran on a synthesized input
simular-ai/agent-s/gui_agents/s1/cli_app.py
code served (permissive licence) · get_code("6cf040f5818fa058")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import platform

# The function takes two string parameters: code and action_description
# It uses these strings in f-strings to construct system commands
# No complex objects needed - just simple strings

ARGS = {
    "code": "import os; os.system('echo hello')",
    "action_description": "execute a system command"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Computer use agents automate digital tasks by directly interacting with graphical user interfaces (GUIs) on computers and mobile devices, offering significant potential to enhance human productivity by completing an open-ended space of user queries. However, current agents face significant challenges: imprecise grounding of GUI elements, difficulties with long-horizon task planning, and performance bottlenecks from relying on single generalist models for diverse cognitive tasks. To this end, we introduce Agent S2, a novel compositional framework that delegates cognitive responsibilities across various generalist and specialist models. We propose a novel Mixture-of-Grounding technique to achieve precise GUI localization and introduce Proactive Hierarchical Planning, dynamically refining action plans at multiple temporal scales in response to evolving observations. Evaluations demonstrate that Agent S2 establishes new state-of-the-art (SOTA) performance on three prominent computer use benchmarks. Specifically, Agent S2 achieves 18.9% and 32.7% relative improvements over leading baseline agents such as Claude Computer Use and UI-TARS on the OSWorld 15-step and 50-step evaluation. Moreover, Agent S2 generalizes effectively to other operating systems and applications, surpassing previous best methods by 52.8% on WindowsAgentArena and by 16.52% on AndroidWorld relatively. Code available at https://github.com/simular-ai/Agent-S.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2504.00906")
get_code_for_paper("2504.00906")
have("2504.00906")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2504.00906.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2504.00906.svg)](https://syntology.ai/paper/2504.00906)

Connect an agent — have() is free.