From f8b48cb2ba4b67a3f3f9e7b3ff1422fd2da6fc24 Mon Sep 17 00:00:00 2001 From: Philipp Schmid <32632186+philschmid@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:20:09 +0200 Subject: [PATCH 1/2] Delete run.sh --- run.sh | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 run.sh diff --git a/run.sh b/run.sh deleted file mode 100755 index 05ad980..0000000 --- a/run.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - -cd "$(dirname "$0")" - -if [ -z "${GEMINI_API_KEY:-}" ]; then - echo "[-] Set GEMINI_API_KEY first:" - echo " export GEMINI_API_KEY=\"your-key\"" - exit 1 -fi - -if ! command -v uv &> /dev/null; then - echo "[-] uv is required. Install from https://docs.astral.sh/uv/" - exit 1 -fi - -if [ ! -d ".venv" ]; then - echo "[+] Creating virtual environment..." - uv venv -fi - -uv pip install -q -r requirements.txt - -echo "[+] Running agent: Find the latest blog post from philipp schmid and summarize it." -uv run python agent.py "Find the latest blog post from philipp schmid and summarize it." From adfa8b4a0807147f6cbd60fe8f2ad6ea4d350c12 Mon Sep 17 00:00:00 2001 From: Philipp Schmid <32632186+philschmid@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:20:27 +0200 Subject: [PATCH 2/2] Update README.md with uv setup instructions and licensing disclaimer --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d5b802c..c6e1b57 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This repository contains a reference implementation for controlling an Android e The agent operates in a continuous loop: 1. It captures a screenshot of the virtual device using ADB. 2. It sends the screenshot along with the user's task to Gemini 3.5 Flash. -3. The model returns structured tool commands (such as `click`, `type`, `long_press`, `drag_and_drop`, `press_key`, `go_back`, `wait`, `list_apps`, `open_app`, `take_screenshot`). +3. The model returns structured tool commands (such as `click`, `type`, `long_press`, `drag_and_drop`, `press_key`, `go_back`, gwait`, `list_apps`, `open_app`, `take_screenshot`). 4. The client executing script maps the normalized coordinates (0-999) to the actual physical resolution of the screen and executes the action via ADB. 5. The loop repeats until the task is complete. @@ -16,7 +16,6 @@ The agent operates in a continuous loop: * `agent.py`: The main agent script orchestrating the interaction loop. * `setup_emulator.sh`: Idempotent shell script to configure and create the Android virtual device (`AI_Agent_Phone`) on macOS. * `requirements.txt`: Python package dependencies. -* `run.sh`: Convenient entrypoint script to create virtualenv, install dependencies, and run the agent. ## Setup Instructions @@ -45,22 +44,34 @@ export GEMINI_API_KEY="your-api-key-here" ### 3. Run the Agent -You can launch the agent by executing `run.sh`: +Create a virtual environment and install the required dependencies: ```bash -chmod +x run.sh -./run.sh +uv venv +source .venv/bin/activate +uv pip install -r requirements.txt ``` -By default, the script runs the task: *"Find the latest blog post from philipp schmid and summarize it."* -Alternatively, you can run the agent manually: +Then run the agent: + +```bash +python agent.py "Find the latest blog post from philipp schmid and summarize it." +``` + +Alternatively, you can run the agent with a custom task: ```bash python agent.py "Open Settings and enable dark mode" ``` ---- +## Licensing & Disclaimer + +Copyright 2026 Google LLC + +All software is licensed under the Apache License, Version 2.0 (Apache 2.0); you may not use this file except in compliance with the Apache 2.0 license. You may obtain a copy of the Apache 2.0 license at: [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) + +All other materials are licensed under the Creative Commons Attribution 4.0 International License (CC-BY). You may obtain a copy of the CC-BY license at: [https://creativecommons.org/licenses/by/4.0/legalcode](https://creativecommons.org/licenses/by/4.0/legalcode) -## Disclaimer +Unless required by applicable law or agreed to in writing, all software and materials distributed here under the Apache 2.0 or CC-BY licenses are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses. -*This is not an officially supported Google product.* +This is not an official Google product.