Open-Source Python+Rust Agent Framework Wirelessly Controls Phones to Play Games Automatically

Developer open-sources Python and Rust agent framework for wireless phone control, auto-gaming, chess, and browser automation.
A developer on Reddit showcased an open-source agentic harness built with Python and Rust that wirelessly controls Android and iPhone devices to auto-play Clash of Clans, Clash Royale, and a battle royale game, while also playing chess and automating browser operations. Python handles high-level agent logic and orchestration, while Rust likely handles low-level device communication and real-time control for stability and low latency. Cross-platform wireless control may use ADB and WebDriverAgent. The project's multitasking coordination is notable, offering reference for game AI research, automation testing, and cross-device control, though auto-gaming raises terms-of-service compliance concerns.
Title
Open-Source Python+Rust Agent Framework Wirelessly Controls Phones to Play Games Automatically
Meta Description
A developer open-sourced a Python and Rust agent framework that wirelessly controls Android and iPhone devices to automatically play Clash of Clans, Clash Royale, and other games, while also playing chess and automating browser operations, showcasing multitasking capabilities.
Article Content
A developer on Reddit showcased an open-source agentic harness he built using Python and Rust that can wirelessly control Android and iPhone devices, automatically play Clash of Clans, Clash Royale, and a battle royale game, while also playing chess and automating browser operations.

Tech Stack: Python and Rust Working Together
According to the original post, this framework combines Python's flexibility with Rust's performance advantages. Python typically handles high-level agent logic and task orchestration, while Rust likely handles low-level device communication and real-time control, ensuring stability and low latency for wireless operations. This hybrid architecture is particularly important when handling multiple games and browser automation tasks simultaneously.
PyO3 and maturin: Hybrid Python-Rust projects typically rely on PyO3 to expose Python-callable extension modules in Rust, with maturin handling the build and packaging. PyO3 allows Rust code to directly manipulate Python objects and can also bridge Rust's async runtime with Python's asyncio event loop, which is crucial for the "Python orchestration + Rust real-time control" layered design. The trade-off is dealing with GIL contention, cross-language error mapping, and type conversion overhead, so high-performance paths are often written as batch or async callback interfaces rather than fine-grained per-call invocations.
Multitasking in Parallel: Games, Chess, and Browser Automation
The most striking aspect of the demo is the framework's multitasking capability. It can not only control two phones playing different games simultaneously but also have the agent participate in chess matches and perform browser automation operations. This demonstrates the framework's coordination ability in complex environments, where each task requires different interaction modes and decision logic.
Agentic harness: The term "harness" is borrowed from the evaluation field, referring to the infrastructure wrapped around a model that drives the loop: encoding observations (screenshots, DOM, device state) into model inputs, parsing the model's output actions, executing actions and collecting results, while managing context, retries, timeouts, and safety boundaries. Unlike wrappers that only do single-turn Q&A, the core of a harness is the "perception-decision-execution" loop and multitask scheduling. Decoupling this layer from specific device drivers is the architectural prerequisite for the project to simultaneously mount two phones, a chessboard, and a browser.
Implementation of Wireless Control for Android and iPhone
Wireless control of mobile devices typically involves ADB (Android Debug Bridge) or similar remote debugging protocols, while for iPhone it may require WebDriverAgent or other automation tools. Although the original post doesn't detail the specific technical implementation, cross-platform wireless control is a key breakthrough of this project, offering new ideas for mobile automation testing and game scripting.
WebDriverAgent (WDA): WDA is an iOS automation service open-sourced by Facebook and now maintained by the Appium community. It runs an XCTest-based web server on a real device, exposing HTTP interfaces to perform taps, swipes, screenshots, and element queries. It requires a developer certificate to sign the Runner app and install it on the device, and iOS version upgrades often cause compatibility issues. Unlike Android's ADB-based adb shell input and uiautomator dump, WDA has higher network and XCTest round-trip latency for each operation, which is the practical motivation for using Rust to handle low-level communication, connection reuse, and command pipelining.
Open-Source Significance and Potential Applications
The project is released as open source, meaning other developers can learn from its architecture for game AI research, automation testing, or cross-device control scenarios. However, automatically playing games may also be subject to game terms of service restrictions, and developers need to pay attention to compliance.
Overall, this project demonstrates the potential of agent frameworks in complex, multitask environments and highlights the advantages of combining Python and Rust in system-level programming.
One-line Summary
Developer open-sources Python and Rust agent framework that wirelessly controls phones on both platforms to automatically play games, play chess, and operate browsers.
Paragraph Summary
A developer on Reddit showcased an open-source agentic harness built with a hybrid of Python and Rust. The framework can wirelessly control Android and iPhone devices to automatically play Clash of Clans, Clash Royale, and a battle royale game, while also playing chess and performing browser automation operations. The article analyzes that Python handles high-level agent logic and task orchestration, while Rust likely handles low-level device communication and real-time control to ensure stability and low latency for wireless operations; cross-platform wireless control may be implemented using tools like ADB and WebDriverAgent. The project's most notable aspect is its multitasking parallel coordination capability, and its open-source form provides a reference for game AI research, automation testing, and cross-device control, though automatically playing games also requires attention to compliance risks with game terms of service.
Related articles

34 AI Coding Assistants Battle It Out in the Terminal — How to Avoid Picking Wrong
34 AI coding assistants are flooding the terminal, and Orca supports multi-agent parallelism. This article analyzes the consolidation trend behind the gold rush, the cost traps of multi-agent parallelism, and how to maintain an agent-neutral workflow to avoid picking the wrong tool.

Gemini CLI in Practice: An AI Coding Agent in Your Terminal
A deep dive into Gemini CLI: from installation and authentication to building a task management app hands-on, covering plan mode, auto-debugging, GEMINI.md context persistence, and token cost tracking.

Open Design: A Free Open-Source Alternative to Claude Design That Activates Your Coding Agent
Open Design is a free, open-source Claude Design alternative that runs locally with 250+ design skills, auto-detects 16 coding agents, and supports prototypes, slides, and mobile UIs.