diff --git a/README.md b/README.md index 66b8b6d..4123eba 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Gemini Android Computer Use Demo -This repository contains a reference implementation for controlling an Android emulator using the **Gemini 3.7 Flash** Computer Use API (`mobile` environment) via the Google GenAI SDK. +This repository contains a reference implementation for controlling an Android emulator using the **Gemini 4 Hydrogen** Computer Use API (`mobile` environment) via the Google GenAI SDK. ## Overview 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.7 Flash. +2. It sends the screenshot along with the user's task to Gemini 4 Hydrogen. 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`). 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. @@ -65,7 +65,7 @@ python agent.py "Find the latest blog post from philipp schmid and summarize it. | Option | Short | Default | Description | | --- | --- | --- | --- | -| `--model` | `-m` | `gemini-3.7-flash` | Gemini model ID to use | +| `--model` | `-m` | `gemini-4-hydrogen` | Gemini model ID to use | | `--thinking-level` | `-t` | `medium` | Thinking level configuration (`minimal`, `low`, `medium`, `high`) | | `task` | N/A | *(default prompt)* | Task description for the agent | @@ -83,10 +83,13 @@ python agent.py --thinking-level high "Open Clock and set an alarm for 7 AM" The following Gemini models are supported for computer use: -* `gemini-3.7-flash` (default) -* `gemini-3.6-flash` +* `gemini-4-hydrogen` (default) +* `gemini-4-carbon` +* `gemini-4-argon` +* `gemini-4-neon` +* `gemini-3.8-flash` * `gemini-3.5-flash-lite` -* `gemini-3.5-flash` +* `gemini-3-flash-preview` ## Licensing & Disclaimer diff --git a/agent.py b/agent.py index be67fe9..a13ec37 100644 --- a/agent.py +++ b/agent.py @@ -196,7 +196,7 @@ def screenshot(self) -> bytes: def run_agent( task: str, device_id: str = None, - model: str = "gemini-3.7-flash", + model: str = "gemini-4-hydrogen", thinking_level: str = "medium", max_turns: int = 100, ): @@ -290,8 +290,8 @@ def run_agent( parser.add_argument( "--model", "-m", - default="gemini-3.7-flash", - help="Gemini model ID to use (default: gemini-3.7-flash)", + default="gemini-4-hydrogen", + help="Gemini model ID to use (default: gemini-4-hydrogen)", ) parser.add_argument( "--thinking-level",