Open-AutoGLM installation: prerequisites and first run

A full setup walkthrough for Open-AutoGLM, from prerequisites to a first demo run.

This tutorial is a practical, end-to-end installation guide for Open-AutoGLM. It is written to be reproducible and safe, and it emphasizes hardware choices and verification steps that prevent time‑wasting misconfigurations.

A test phone connected to the edge of a laptop using USB
Concept illustration of the documented computer-to-Android setup.

What you will set up

By the end, you will have:

  • A working ADB connection to a real Android device.
  • Access to an official model download (or a model service endpoint).
  • A first task you can verify on the test phone and in the terminal.

If you already have ADB configured and a model endpoint, you can skip ahead to the first demo section.

Prerequisites checklist

Use this list to avoid surprises:

  • Python 3.10+ installed.
  • ADB installed and working in your terminal.
  • Android device with Developer Options and USB Debugging enabled.
  • Model access from Hugging Face or ModelScope.
  • Optional endpoint access if you plan to use Option A.

If any of these are missing, fix them before continuing.

Option A vs Option B (hardware reality)

Open-AutoGLM can run in two main ways:

  • Option A (recommended): use a deployed model service endpoint. You avoid local GPU requirements and skip vLLM/SGLang setup.
  • Option B (local): run locally on NVIDIA GPU (24GB+ VRAM recommended), with vLLM or SGLang and ~20GB model files.

Option A is typically faster to start, safer for first evaluations, and easier to update. Option B is for power users who need full control and can manage GPU resources.

Step 1: Install and verify ADB

Install ADB using your OS package manager or Android Platform-Tools. Then verify:

adb version
adb devices

You should see at least one device listed. If the device is unauthorized, unlock the phone and accept the prompt. If the device list is empty, see the troubleshooting section below.

Step 2: Prepare the Android device

On your Android device:

  1. Enable Developer Options.
  2. Turn on USB Debugging.
  3. Connect the device and approve the USB debugging trust dialog.

Optional but recommended:

  • Use a test device instead of a personal device.
  • Disable any auto‑purchase or payment features in apps you test.
  • Keep a screen recording for audit/debugging.

Step 3: Get the model

Only use official model sources. Links are maintained on the Models page:

For the Chinese model, see Hugging Face or ModelScope. See the upstream English README for the multilingual model and current service options.

Step 4: Install dependencies

Run these commands in a macOS or Linux terminal. Follow the upstream instructions for your selected platform and version.

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

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

Step 5: First demo run

Open Settings on the test phone and try the short first task. The example shows the hosted endpoint, model name and credential steps. The expected result is the Android home screen and a finished task in the terminal. For local inference, use the serving configuration and endpoint from the upstream README.

If any check fails, choose the symptom in Troubleshoot setup.

Environment hygiene tips

To keep runs reproducible:

  • Use a clean virtual environment per project.
  • Record Python version and package versions in your notes.
  • Avoid global installs that can shadow dependencies.

This makes it easier to reproduce bugs or share setups with teammates.

Model endpoint checklist (Option A)

Before using --base-url:

  • Confirm the endpoint is reachable from your network.
  • Verify authentication requirements (token, header, or key).
  • Check model version and configuration.
  • Keep a fallback endpoint or plan for downtime.

Safety notes for first run

Open-AutoGLM is a phone agent, so it can click, type, and navigate. Before you try any task:

  • Use a non‑production account.
  • Disable destructive settings or irreversible workflows.
  • Require confirmations for critical actions.
  • Run with logging enabled if available.

Safety checklists are a core part of reliable evaluation; do not skip them.

Common pitfalls

  • Skipping the USB authorization prompt.
  • Mixing global Python packages with your virtual environment.
  • Using an outdated platform tools release.
  • Forgetting to document model version and runtime flags.

Fix these early to avoid repeating setup work later.

What success looks like

An observable first-run checklist
  1. Connect the phone

    ADB lists the unlocked handset and the input method is enabled.

  2. Check the model

    Verify the chosen hosted or local service with the documented identifier.

  3. Observe the finish

    Use a harmless reversible task and inspect the handset as well as terminal output.

You should be able to:

  • Run a low‑risk task (open settings, scroll a list).
  • Capture logs and screenshots for the run.
  • Re‑run the same task without changing the setup.

Troubleshooting: ADB issues

If ADB is not working, the most common fixes are:

  • Device not listed: change the USB cable, set USB mode to file transfer, or install OEM drivers.
  • Unauthorized device: accept the trust dialog and rerun adb devices.
  • Multiple devices: specify a serial with adb -s <serial>.
  • Wireless ADB issues: re‑pair on the same network and avoid unstable Wi‑Fi.

If none of these help, restart the ADB server:

adb kill-server
adb start-server

Troubleshooting: model and runtime issues

  • Out of memory: use Option A or reduce batch size/config as documented in the README.
  • Model not found: confirm file paths and required files.
  • Slow inference: ensure you are on a supported GPU or use an endpoint.

Verification checklist

Before you move on to advanced tutorials:

  • adb devices returns a connected device.
  • You can run a test command without errors.
  • You have documented which model version you used.
  • Safety guardrails are in place for the tasks you plan to test.

Next steps