Skip to main content

App World SDK

Lightweight Python client for the App World platform — RL training and evaluation on real Android apps, with a standard Gymnasium interface.

Installation

pip install appworld-sdk

Requirements: Python >= 3.11

Quick Start

from appworld_sdk import AppWorldClient

client = AppWorldClient(api_key="YOUR_API_KEY", base_url="https://api.appworld.dev")

# Browse available tasks
tasks = client.list_tasks()

# Allocate device resources
env_info = client.create_environment(task_ids=["FennoteCreateNote"])
env_id = env_info["id"]

# Get a Gymnasium-compatible environment
env = client.make_env(env_id=env_id, env_type="eval")

# Run a task
obs, info = env.reset(task_name="FennoteCreateNote")
done = False
while not done:
    action = {"action_type": 0, "x": 0.5, "y": 0.5, "text": "", "direction": 0}
    obs, reward, terminated, truncated, info = env.step(action)
    done = terminated or truncated

env.close()

Environment Types

Type Class Actions Use Case
"rl" RemoteAppWorldEnv 5 discrete (tap, swipe, etc.) RL training
"eval" RemoteAppWorldEvalEnv 7 (incl. text input) Agent evaluation

Client-Side Eval with Custom Agents

Implement the BaseAgent protocol to run evaluations where LLM calls stay on your side — your model API key never leaves the local process.

from appworld_sdk import AppWorldClient

class MyAgent:
    """Implement predict() — the SDK checks this via BaseAgent Protocol."""
    def predict(self, *, screenshot, goal, **kwargs) -> dict:
        # Your model inference here
        return {"action_type": 0, "x": 0.5, "y": 0.5, "text": "", "direction": 0}

client = AppWorldClient(api_key="YOUR_API_KEY", base_url="https://api.appworld.dev")
env_info = client.create_environment(task_ids=["FennoteCreateNote", "FennoteDeleteNote"])

result = client.run_local_eval(
    env_id=env_info["id"],
    tasks=["FennoteCreateNote", "FennoteDeleteNote"],
    agent=MyAgent(),
    max_steps=15,
)

print(f"Success rate: {result.success_rate:.0%}")
print(f"Avg steps: {result.avg_steps:.1f}")

Server-Side Eval

Let the platform handle LLM calls:

from appworld_sdk import AppWorldClient

client = AppWorldClient(api_key="YOUR_API_KEY", base_url="https://api.appworld.dev")
env_info = client.create_environment(task_ids=["FennoteCreateNote"])

result = client.run_eval(
    env_id=env_info["id"],
    tasks=["FennoteCreateNote"],
    model_provider="qwen",       # "qwen" | "seed" | "openrouter" | "openai"
    model_api_key="YOUR_MODEL_KEY",
    model_name="qwen-vl-max",
)
print(f"Success rate: {result.success_rate}")

API Reference

AppWorldClient(api_key, base_url, timeout)

Method Description
list_apps(**filters) List available apps
list_tasks(**filters) List available tasks
get_task(task_id) Get task details
create_environment(task_ids, name) Allocate device resources
delete_environment(env_id) Release resources
make_env(env_id, env_type) Create Gymnasium env
run_eval(...) Server-side evaluation
run_local_eval(...) Client-side evaluation

Exceptions

Exception HTTP Meaning
AppWorldError — Base exception
AppWorldAPIError any Server returned an error
EnvironmentNotReady 503 Device not available
SessionExpired 410 Session closed or timed out

License

Apache 2.0 — see LICENSE for details.

Metadata

Release files for appworld-sdk 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for appworld-sdk 0.1.8
File Size Uploaded Provenance Actions
appworld_sdk-0.1.8.tar.gz 21.7 kB Without provenance Details for appworld_sdk-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for appworld-sdk 0.1.8
File Interpreter ABI Platform Actions
appworld_sdk-0.1.8-py3-none-any.whl Python 3 none any Details for appworld_sdk-0.1.8-py3-none-any.whl

Total release size: 44.1 kB

Release files / appworld_sdk-0.1.8.tar.gz

Download URL appworld_sdk-0.1.8.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
78cfc8b5e2e1ecfe6857998b5538ab27215ff7b8dd5cda8f075060e99faded43
BLAKE2b-256 checksum
How to use checksums
9ce053f21e9f1823daa6db1797fe9e1976ba3159576c07865708b80c0e7dfaad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / appworld_sdk-0.1.8-py3-none-any.whl

Download URL appworld_sdk-0.1.8-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff68a9cf08d577b9d4c8e034676befe43d140d7ed12622315ad4aa9c54219f73
BLAKE2b-256 checksum
How to use checksums
eca5f3e998f9c6728d8fd4e8a0f172d7bfff5bc26041eba891f0777b6e8ffe34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for appworld-sdk 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page