Quick Start: Open-AutoGLM

Step-by-step to your first Open-AutoGLM demo, with ADB setup, model download, and troubleshooting.

Run Open-AutoGLM on an Android test phone. Start in the Settings app. The goal is to return to the home screen and see the task end in the terminal. A hosted model works without a local GPU. The commands below use a macOS or Linux terminal.

Get the phone agent

Install Python 3.10 or later, Git and Android Platform-Tools. Ensure adb version works, then get the upstream source.

git clone https://github.com/zai-org/Open-AutoGLM.git
cd Open-AutoGLM
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip install -e .
python main.py --help

Connect one test phone

On Android 7.0 or later, enable developer options and USB debugging. Connect a data-capable cable, unlock the phone and approve the computer. Run adb devices and look for device next to the serial number. If it says unauthorized, check the prompt on the phone. An empty list usually calls for checking the cable, USB port and driver.

Android Developer options with USB debugging enabled

Example settings from the upstream Android setup guide. The options shown vary by device. Image credit.

Install and enable ADB Keyboard on the test phone. Verify that adb shell ime list -s includes com.android.adbkeyboard/.AdbIME.

Run one short task

First run from connection to a visible result
  1. Connect one phone

    Run adb devices and confirm the handset reports device.

  2. Check inference

    Use the model ID and base URL for the same service.

  3. Watch the finish

    Check that the phone reaches the home screen and the terminal reports completion.

For English apps, use the multilingual model and select the English system prompt with --lang en. This example uses the Z.AI endpoint listed in the upstream English README. Check Z.AI account and model access in your region and obtain an API key for the model. If the endpoint is unavailable to you, use another compatible provider documented upstream or serve the multilingual model yourself. Screenshots go to the selected service, so use a test device with no private notifications. Open Settings on the phone. Enter the following commands one at a time; paste your key when the first command waits for input.

read -rs PHONE_AGENT_API_KEY
export PHONE_AGENT_API_KEY
python main.py --base-url https://api.z.ai/api/paas/v4 --model autoglm-phone-multilingual --lang en --max-steps 5 "Return to the Android home screen, then finish."
unset PHONE_AGENT_API_KEY

A successful first run passes the device and model checks, returns the phone to the home screen and finishes the task. If you reach the step limit, check the last action before trying again. An authentication error calls for checking the provider, key permissions and model name.

For local inference, start with the multilingual model weights and use autoglm-phone-9b-multilingual if you follow the upstream serving example. The Chinese model is available on Hugging Face and ModelScope. Follow the upstream deployment guide for compatible serving parameters.

If setup stops

Use the step-by-step troubleshooting checklist to find the check for your symptom and the result to look for.

Watch a setup demonstration

The walkthrough shows how a creator installed Open-AutoGLM and controlled an Android phone. Use the written checks above to tell whether your own ADB connection and model endpoint work.

Watch an Android setup demonstration

Tech Jarves · YouTube

Creator demonstration from Tech Jarves. Check commands against the current written guide. The player connects to YouTube when you load it. Open the original video on YouTube.