SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.15164 · ICLR · 2025

SPA-Bench: A Comprehensive Benchmark for SmartPhone Agent Evaluation

Jun Wang, Jianye Hao, Kaiwen Zhou, Kun Shao, Shuai Wang, Zhihao Wu, Yuhao Yang, Rui Shao, Liqiang Nie, Gongwei Chen, Yasheng Wang, Jingxuan Chen, and 5 more

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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/2410.15164.json · badge: /api/ran/2410.15164.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
ai-agents-2030/SPA-Bench canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
get_agent_config Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/framework/utils.py
code served (permissive licence) · get_code("0b7a699a2a8630d6")
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 torch
import numpy as np

def get_agent_config(config, agent_name):
    for agent in config['AGENTS']:
        if agent['NAME'] == agent_name:
            return agent
    raise Exception('INVALID agent_name')

ARGS = {
    'config': {
        'AGENTS': [
            {'NAME': 'agent_1', 'type': 'explorer', 'learning_rate': 0.001},
            {'NAME': 'agent_2', 'type': 'collector', 'learning_rate': 0.0005},
            {'NAME': 'agent_3', 'type': 'optimizer', 'learning_rate': 0.002}
        ]
    },
    'agent_name': 'agent_2'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
get_apk Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/framework/utils.py
code served (permissive licence) · get_code("12e670275d932244")
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 subprocess
from unittest.mock import patch, MagicMock

# Mock the adb commands since we can't actually run adb in a sandbox
def mock_execute_adb(adb_command, verbose=True):
    # Simulate successful adb responses
    if "pm path" in adb_command:
        return "package:/data/app/com.example.app-1/base.apk"
    elif "pull" in adb_command:
        return "/data/app/com.example.app-1/base.apk"
    return "ERROR"

# Patch the execute_adb function before defining get_apk
with patch('subprocess.run') as mock_run:
    # Setup mock to return successful results
    mock_result = MagicMock()
    mock_result.returncode = 0
    mock_result.stdout = "package:/data/app/com.example.app-1/base.apk"
    mock_result.stderr = ""
    mock_run.return_value = mock_result
    
    def execute_adb(adb_command, verbose=True):
        result = subprocess.run(adb_command, shell=True, capture_output=True, text=True)
        if result.returncode == 0:
            return result.stdout.strip()
        if verbose:
            print(f'Command execution failed: {adb_command}')
            print(result.stderr)
        return 'ERROR'

    def get_apk(device_serial: str, package_name: str, local_apk_path: str):
        adb_command = f'adb -s {device_serial} shell pm path {package_name}'
        apk_path = execute_adb(adb_command)
        if apk_path == 'ERROR':
            return 'ERROR'
        apk_path = apk_path.split('package:')[1].strip()
        adb_command = f'adb -s {device_serial} pull {apk_path} {local_apk_path}'
        return execute_adb(adb_command)

ARGS = {
    'device_serial': 'emulator-5554',
    'package_name': 'com.example.app',
    'local_apk_path': '/tmp/app.apk'
}
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
get_screenshot_file_names Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/pipeline/key_component_matcher.py
code served (permissive licence) · get_code("ad3be85e5d729dde")
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 list, 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 os
import tempfile
import shutil

# Create a temporary directory with test screenshot files
test_dir = tempfile.mkdtemp()

# Create some test screenshot files with numeric names
test_files = ['1.png', '2.jpg', '3.png', '10.jpg', '5.png']
for filename in test_files:
    filepath = os.path.join(test_dir, filename)
    with open(filepath, 'w') as f:
        f.write('')

ARGS = {
    'target_dir': test_dir
}
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 list, ndim 1, dtype family float — a list 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
gpt4o_evaluator Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/pipeline/vlm_evaluator.py
code served (permissive licence) · get_code("df8cbc90cf7a15eb")
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 pandas as pd
import numpy as np
from unittest.mock import Mock, patch

# Create a mock dataset with the required structure
dataset = pd.DataFrame({
    'task_description': [
        'Evaluate if 2+2=4',
        'Evaluate if the sky is blue'
    ]
})

# Create a mock response that simulates GPT-4o API response
mock_response = {
    'choices': [
        {
            'message': {
                'content': 'Reason: This is a simple arithmetic question. Result: 1'
            }
        }
    ],
    'usage': {
        'total_tokens': 150,
        'prompt_tokens': 100,
        'completion_tokens': 50
    }
}

# Mock the ask_gpt4o_base function to return our mock response
def mock_ask_gpt4o_base(target_dir, task_description, reasoning_mode, action_mode):
    if reasoning_mode == 'result_only':
        return {
            'choices': [
                {
                    'message': {
                        'content': 'Result: 1'
                    }
                }
            ],
            'usage': {
                'total_tokens': 120,
                'prompt_tokens': 80,
                'completion_tokens': 40
            }
        }
    else:
        return mock_response

# Patch the ask_gpt4o_base function in the module
import sys
current_module = sys.modules[__name__]
current_module.ask_gpt4o_base = mock_ask_gpt4o_base

ARGS = {
    'task_identifier': 0,
    'target_dir': '/tmp/test_dir',
    'dataset': dataset,
    'reasoning_mode': 'reasoning',
    'action_mode': 'default',
    'max_retry': 5,
    'retry_interval': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
safe_decode Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/framework/agents.py
code served (permissive licence) · get_code("0655ce56ccbf7725")
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 torch
import numpy as np

# safe_decode takes byte_data and encoding_list parameters
# byte_data should be bytes that can be decoded
# encoding_list is a list of encoding strings to try

# Create sample byte data that can be decoded with utf-8
byte_data = "Hello World".encode('utf-8')

# Create encoding list with common encodings
encoding_list = ['utf-8', 'gbk']

ARGS = {
    'byte_data': byte_data,
    'encoding_list': encoding_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
stage_1_checker Ran
ran, violated the contract we drafted
ai-agents-2030/SPA-Bench/pipeline/cross_evaluator.py
code served (permissive licence) · get_code("a429061807f79a74")
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 torch

torch.manual_seed(0)

# Analyzing the function:
# - app_dict: a dictionary where keys are names and values are tuples of (start, end) integers
# - length: an integer representing a boundary length
# - The function validates that:
#   1. No start or end is -1
#   2. start <= end for each entry
#   3. start and end don't exceed length
#   4. Entries are ordered: current_end < next_start (non-overlapping and ordered)

# Create a valid app_dict with non-overlapping intervals
app_dict = {
    "app_1": (0, 5),
    "app_2": (6, 10),
    "app_3": (11, 15)
}

# Set length to be >= the maximum end value
length = 20

ARGS = {
    "app_dict": app_dict,
    "length": length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
stage_1_parser Ran
ran; our contract draft was wrong, not the code
ai-agents-2030/SPA-Bench/pipeline/cross_evaluator.py
code served (permissive licence) · get_code("fdfd89ded0757c89")
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 re

def stage_1_parser(screenshot_app):
    """Parse model response from stage 1 of cross-app task evaluation."""
    pattern = '"([\\w\\s]+_?\\d?)": {\\s+"start screen": (-?\\d+),\\s+"end screen": (-?\\d+)'
    matches = re.findall(pattern, screenshot_app)
    app_dict = {app: (int(start), int(end)) for app, start, end in matches}
    return app_dict

screenshot_app_input = '''"Maps_1": {
 "start screen": 0,
 "end screen": 5
}, "Calendar_2": {
 "start screen": -1,
 "end screen": 3
}, "Photos 4": {
 "start screen": 2,
 "end screen": 8
}'''

ARGS = {
    "screenshot_app": screenshot_app_input
}
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
get_agent Not yet run
unverified (harvested, no recorded run)
ai-agents-2030/SPA-Bench/framework/utils.py
code served (permissive licence) · get_code("e4cd70ac901e220a")
How it ran

no invocation recorded.

key_component_match Not yet run
unverified (harvested, no recorded run)
ai-agents-2030/SPA-Bench/pipeline/key_component_matcher.py
code served (permissive licence) · get_code("a6ba4db449216409")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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

Smartphone agents are increasingly important for helping users control devices efficiently, with (Multimodal) Large Language Model (MLLM)-based approaches emerging as key contenders. Fairly comparing these agents is essential but challenging, requiring a varied task scope, the integration of agents with different implementations, and a generalisable evaluation pipeline to assess their strengths and weaknesses. In this paper, we present SPA-BENCH, a comprehensive SmartPhone Agent Benchmark designed to evaluate (M)LLM-based agents in an interactive environment that simulates real-world conditions. SPA-BENCH offers three key contributions: (1) A diverse set of tasks covering system and third-party apps in both English and Chinese, focusing on features commonly used in daily routines; (2) A plug-and-play framework enabling real-time agent interaction with Android devices, integrating over ten agents with the flexibility to add more; (3) A novel evaluation pipeline that automatically assesses agent performance across multiple dimensions, encompassing seven metrics related to task completion and resource consumption. Our extensive experiments across tasks and agents reveal challenges like interpreting mobile user interfaces, action grounding, memory retention, and execution costs. We propose future research directions to ease these difficulties, moving closer to real-world smartphone agent applications. SPA-BENCH is available at https://ai-agents-2030.github.io/SPA-Bench/.

For agents

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

get_harvested_code_for_paper("2410.15164")
get_code_for_paper("2410.15164")
have("2410.15164")

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

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

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

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

Connect an agent — have() is free.