Z

Z.AI Chat

GLM Coding Plan · Powered by GLM-5.1

Get your key at z.ai/apikeys · Subscribe

Modes Available

💬 Chat General conversation
💻 Coding Code assistant
💡 Brainstorm Ideation partner
🤖 Agentic Autonomous coding

New Chat

Chat

Project Files

No files yet.
AI-generated files appear here.
file

                
■ Terminal

Terminal

~
$
🛠

Dev Environment

Set up on-device build tools

Downloads and sets up a complete Termux Linux environment inside the app.

No external apps needed — bash, coreutils, package manager all included.

Download size: ~30MB (one-time). Architecture auto-detected.

After install, use pkg install aapt2 ecj dx apksigner to add build tools.

AutoGLM Device Control

Enable accessibility service to allow AI to control your device (tap, swipe, type, read screen).

Hermes Agent

Install Hermes agent for advanced AI capabilities: web search, terminal, skills, memory, browser automation.

Settings

API Configuration

Model Settings

Terminal & Agent

AI-generated code auto-deploys to device in Coding/Agentic modes
Prevents screen sleep while agent is working
How many times AI will auto-retry after build failures
Auto-continues AI if task is incomplete or response cut off
Max times AI will be asked to continue incomplete work

Appearance

Data

About

Z.AI Chat v3.3.1

Built with Z.AI SDK & GLM-5.1

Compatible with Android 15/16

Changelog

  • v3.3.1 2026-05-21
    • HTML Preview — HTML code blocks no longer break chat; sandboxed iframe preview with Open in Browser
    v3.3.0 2026-05-21
    • File Manager — browse device files, open/preview any file, install APKs directly
    • SSH / Remote Access — AI can SSH into external machines, SCP files, curl URLs (user approves each)
    • Approval Gate — all sensitive actions (SSH, SCP, curl, adb, pip, etc.) require your explicit approval
    • New Action Tags — [SSH_EXEC], [SSH_UPLOAD], [SSH_DOWNLOAD], [REMOTE_EXEC], [CURL_EXEC]
  • v3.2.0 2026-05-20
    • Full In-App Virtual Env — new internal virtual environment setup with no external Termux app dependency
    • Module Installer — new AI actions: [VENV_SETUP] and [VENV_PIP_INSTALL package]
    • QA Critical Fix — fixed invalid JS file check that broke PRoot install fallback
    • Stability — thread-safe process map in ShellPlugin and safer wake lock handling
    • Resource Safety — fixed high-risk stream/file descriptor leaks in bootstrap extraction and downloads
    • Accessibility — improved icon button labels for better screen reader support
  • v3.1.0 2026-05-20
    • AutoGLM Device Control — AccessibilityService for tap, swipe, type, long press, screenshot, UI tree, click by text/ID
    • Navigation Controls — press Back, Home, Recents, Notifications, Quick Settings, Power Dialog
    • App Control — launch apps, get current app, read full UI hierarchy
    • Hermes Agent — install hermes-agent in Python venv, execute Hermes commands from chat
    • Device Tools in AI — [DEVICE_*] and [HERMES_*] tags parsed in coding + agentic modes
    • Accessibility Setup — one-tap enable in Dev Setup screen with status indicator
    • v2 Signing — APK signed with v2 scheme (required for targetSdk 36)
  • v2.3.0 2026-05-20
    • Java Virtual Environment — ecj.jar + apksigner.jar bundled in APK, d8.jar downloaded at runtime
    • app_process Wrappers — Java tools run via /system/bin/app_process (bypasses SELinux execve restrictions)
    • Runtime aapt2 Install — downloads aapt2 + dependencies from Termux repo on demand
    • extractAsset/downloadFile — new BootstrapPlugin methods for APK asset extraction and URL downloads
    • Smart Tool Detection — checks both Termux native tools and Java virtual tools
    • LD_LIBRARY_PATH — tools/lib added for aapt2 shared library resolution
  • v2.2.5 2026-05-19
    • Shebang Patching — all bin/ scripts patched to use #!/system/bin/sh (bypasses interpreter SELinux)
    • Proot from APK nativeLib — uses proot directly from APK (apk_data_file SELinux label, always executable)
    • Termux Integration — detects installed Termux, sends RUN_COMMAND to install tools
    • F-Droid Fallback — opens Termux F-Droid page if not installed
    • 3-Strategy Install — direct → proot → Termux RUN_COMMAND → manual instructions
  • v2.2.4 2026-05-19
    • Bundled PRoot — proot binary included in APK as native library (executable SELinux label)
    • Auto-Proot Install — copies proot + loader from APK to Termux prefix on first shell use
    • Auto-Proot Wrapping — pkg/apt/dpkg commands automatically wrapped with proot
    • PROOT_LOADER env — loader path set correctly for proot execution
    • Supports arm64-v8a, armeabi-v7a, x86_64, x86 architectures
  • v2.2.3 2026-05-19
    • Os.chmod() Fix — uses Android system call (chmod(2)) instead of Runtime.exec for reliable permissions
    • PRoot Fallback — auto-downloads PRoot from Termux repo when SELinux blocks binary execution
    • Shell Always /system/bin/sh — avoids Termux bash permission issues entirely
    • Explicit sh Invocation — runs pkg/apt via "sh script" instead of direct execution
    • installProot Plugin — downloads .deb, extracts proot binary with AR+tar parser
    • Termux Fallback Guide — if all else fails, clear instructions to install Termux from F-Droid
  • v2.2.2 2026-05-19
    • Permission Fix — chmod 755 on all bootstrap binaries after extraction (fixes "Permission denied")
    • Shell Auto-Fallback — if bash permission denied, auto-falls back to system sh
    • fixPermissions Plugin — new BootstrapPlugin.fixPermissions() callable from JS
    • ensureBuildTools uses full paths to pkg/apt with chmod before execution
  • v2.2.1 2026-05-19
    • Auto-Install Build Tools — aapt2/ecj/d8/apksigner auto-installed via pkg with full paths + retry logic
    • Dev Tools Banner — warns on Coding/Agentic mode if tools missing, one-tap install button
    • Bootstrap + Tools in One Tap — Install button auto-installs bootstrap then build tools
    • Checks tool availability before every build, auto-installs if missing
  • v2.2.0 2026-05-19
    • Build Pipeline Rewrite — proven 7-step pipeline: resources, link, compile R.java + sources, DEX, package, sign
    • Auto-Install Build Tools — aapt2/ecj/d8/apksigner auto-installed via pkg on first build
    • APK Signing — generates debug keystore (keytool or openssl), signs with apksigner
    • 5-Minute Build Timeout — 10x longer for on-device compilation; kills stuck processes
    • Fixed 18 Build Bugs — R.java now compiled, d8 uses @file not broken glob, proper error propagation
    • Agentic IDE Loop — full tool→execute→verify→iterate cycle inspired by opencode/AIDE
  • v2.1.0 2026-05-19
    • File Tree — per-session file tree shows all AI-generated files, view/edit/save from sidebar
    • Auto-Continue — if AI stops mid-task, app auto-continues until task is confirmed complete
    • Task Completion Protocol — AI outputs [TASK_COMPLETE] when done; app detects truncated responses
    • File viewer with edit mode — modify and save files back to device
    • Configurable max auto-continues (1–20, default 5) in Settings
  • v2.0.1 2026-05-19
    • APK Verification — build output now verified: confirms APK file exists and shows size
    • Stay Awake Fix — dual wake locks (screen bright + CPU) keep device fully awake during builds
    • Configurable Retries — max auto-fix retries now adjustable (1–30) in Settings, default 10
  • v2.0.0 2026-05-19
    • Built-in Termux — full Linux environment inside the app, no external Termux needed
    • One-time download (~30MB) of Termux bootstrap (bash, coreutils, apt package manager)
    • Auto-detects CPU architecture (ARM64, ARM, x86, x86_64)
    • Path patching — fixes all Termux paths to work from our app prefix
    • BootstrapPlugin — native download, extract, symlink, patch pipeline
    • ShellPlugin upgraded — uses bundled bash instead of limited /system/bin/sh
    • Install build tools via: pkg install aapt2 ecj dx apksigner
    • APK stays tiny (~1MB) — bootstrap downloaded on first use, not embedded
  • v1.4.0 2026-05-19
    • Agentic feedback loop — build errors auto-sent back to AI for fixing (up to 3 retries)
    • Termux integration — auto-detects Termux on device, uses its PATH (aapt2, d8, ecj, tsu)
    • Workspace context — AI sees device info, available tools, and project files
    • AIDE-style tool protocol — upgraded agentic prompt with structured tool use
    • Auto-build pipeline — full aapt2→ecj→d8→sign→install chain
    • Build error detection — captures exit codes, feeds errors back for auto-correction
    • Termux root support — detects tsu/su for elevated privileges
  • v1.3.1 2026-05-19
    • Fixed: AI actions now AUTO-EXECUTE — files deploy, APKs build & install automatically
    • Added Keep Screen On toggle — prevents sleep while agent works
    • Added Auto-Deploy toggle — controls whether AI actions auto-execute
    • Status toasts show deploy/build/install progress
    • New settings section: Terminal & Agent (Auto-Deploy, Keep Screen On)
  • v1.3.0 2026-05-19
    • Full interactive Terminal screen — execute real shell commands on your device
    • Native Shell plugin — run commands, read/write files, create directories
    • APK Installer plugin — install built APKs directly from the app
    • Deploy Files button — AI-generated code saved to device with one tap
    • Build APK button — compiles Android projects on-device (needs Termux tools)
    • Install APK button — triggers Android package installer for built APKs
    • AI action parser — detects [CREATE_FILE], [RUN_COMMAND], [BUILD_APK], [INSTALL_APK]
    • Quick commands toolbar in terminal (ls, pwd, cat, mkdir, tools, sys)
    • Command history with arrow keys
    • Built-in commands: help, sysinfo, create, install, clear, exit, setup
    • Dev environment setup screen — bootstrap build tools
    • Project scaffolding — quick-create Android project structure
    • Enhanced Agentic mode prompt for on-device build awareness
  • v1.2.4 2026-05-19
    • Save button on every code block — downloads code as a real file to your phone
    • Copy & Save buttons on every AI response — one-tap copy or save as .txt
    • File paths in AI responses are now highlighted and tappable (tap to copy)
    • Smart filename detection — auto-names saved files from code content
    • 30+ language-to-extension mappings for proper file saving
  • v1.2.3 2026-05-19
    • Fixed: Connect button not working — missing function declaration caused JS parse error
    • All UI event handlers now correctly initialized on app start
  • v1.2.2 2026-05-19
    • Fixed: network error on app backgrounding — now auto-retries with reconnect
    • Streaming resumes from last saved token after reconnection
    • Exponential backoff retry (3 attempts) for network interruptions
    • Retry button shown for failed requests due to connectivity
    • Offline/online detection with status banner
    • Visibility change handler saves state on app background
    • Partial response preserved and restorable on reconnect
  • v1.2.1 2026-05-19
    • Fixed: messages lost when switching conversations during streaming
    • Streaming responses now auto-save every 20 tokens to prevent data loss
    • Partial responses preserved when switching sessions mid-generation
    • Added in-app terminal panel for Coding and Agentic modes
    • Terminal parses code blocks, file ops, and tool calls from AI responses
    • Terminal toggle button with collapsible panel
    • Terminal state persists across sessions
    • Conversation list now shows message count
    • Improved conversation switch safety with flush-before-switch
  • v1.2.0 2026-05-19
    • Added light mode / dark mode toggle
    • Theme persists across sessions
    • Theme toggle button in chat header
    • Theme setting in Settings screen
    • Added changelog section to Settings
    • Optimized light theme color palette
  • v1.1.0 2026-05-19
    • Z.AI Coding Plan endpoint support
    • Fixed API base URL to use coding plan endpoint
    • Updated model list (GLM-5.1, GLM-5 Turbo, GLM-4.7, GLM-4.5 Air)
  • v1.0.0 2026-05-19
    • Initial release
    • Chat, Coding, Brainstorm, Agentic modes
    • Streaming SSE responses
    • Markdown rendering with syntax highlighting
    • Conversation management with sidebar
    • Settings with model, temperature, tokens controls
    • Web search integration
    • Export conversations to JSON
    • Android 15/16 support (targetSdk 36)