Skip to main content

Getting Started With GLM-5.4 and ZCode 4.0: A Complete Guide

Get started with GLM-5.4 and ZCode, build interactive applications, automate development workflows, and customize your AI coding environment.
· 12 min read

Explore with AI

GLM-5.4 is Z.ai's new flagship model, and ZCode 4.0 is the desktop coding agent built around it. Together, they let us build applications from a single prompt, automate repetitive development work, and keep coding sessions running from a phone.

I have been using the GLM ecosystem since Z.ai introduced its GLM Coding Plan over a year ago, and the value for money is what keeps me coming back. The plan includes capable coding models as well as a set of tools that make my everyday development workflow easier.

ZCode is the best example of those tools. It is a complete development workspace where we can build applications, manage multiple projects, automate development tasks, customize our coding agents, and continue working from our phones. What I love most is how easy it is to get started, since most of the essential features work right out of the box.

With the release of GLM-5.4 and ZCode 4.0, I wanted to see what this combination could achieve beyond simple coding tasks. In this GLM-5.4 tutorial, I'll cover how to set up GLM-5.4 with ZCode, build an interactive 3D application from scratch, and use features such as Goal Mode, idle-time tasks, and remote control.

You can also see our guides to GLM-5.4 and GLM-5.4 vs Claude Opus 5.5.

If you are new to AI coding agents, the Claude Code 101 course is a good place to start. It shows how to use an agent in daily development workflows, which is the same way we will use ZCode here.

What Is GLM-5.4?

GLM-5.4 is Z.ai's latest flagship model, built for agentic coding, complex reasoning, and long-running tasks. It comes with a 1M-token context window, native vision capabilities, and a new Loop Transformer architecture.

The architecture is the most interesting part. Looping Transformer layers is not a new idea: it dates back to the Universal Transformer introduced in 2018, and smaller language models such as Ouro and SenseNova Loop-9B have used it more recently.

GLM-5.4 brings this approach to a flagship-scale model. It processes a shared block of 28 Transformer layers twice, which increases the model's computational depth without adding parameters for those layers. As the diagram below shows, the looped block sits between a 26-layer prelude and a 24-layer coda.

GLM-5.4 Loop Transformer architecture diagram showing the prelude, two loop passes, and coda
GLM-5.4 Loop Transformer architecture. Source: Z.ai.

Beyond the architecture, GLM-5.4 improves coding, reasoning, and computational efficiency. If you are interested in the technical details and benchmark results, we cover them in our dedicated GLM-5.4 article.

At the time of writing, we can access GLM-5.4 through the GLM Coding Plan and Z.ai's applications, while general-purpose API access and open model weights have yet to be released.

What Is ZCode 4.0?

ZCode is a desktop AI coding agent developed by Z.ai. Like Claude Code, Codex, and OpenCode, it lets us interact with code repositories, generate applications, run terminal commands, fix bugs, and automate development workflows.

The difference is that ZCode provides a graphical desktop environment with native integration for GLM models.

The ZCode 4.0 desktop application and development workspace
The ZCode desktop application and development workspace.

ZCode now covers autonomous development, project management, external tool integrations, and workflow customization. Its main features include:

  • Goal Mode for long-running coding tasks.
  • Computer Use and browser automation.
  • Integrated terminal and file management.
  • Custom skills, commands, and subagents.
  • MCP server and plugin integrations.
  • Scheduled and idle-time tasks.
  • Remote development and mobile control.

With ZCode 4.0, we can access GLM-5.4 directly and use the native integration without manually configuring an external coding agent.

GLM-5.4 Tutorial: How to Set Up and Use GLM-5.4 in ZCode

In this GLM-5.4 tutorial, we will use the ZCode desktop application to access GLM-5.4, build an application, and explore some of ZCode's additional features.

1. Downloading and installing ZCode

First, visit the official ZCode website and download the application for your operating system. ZCode is available for Windows, macOS, and Linux.

Downloading the ZCode desktop application from the official website
Downloading the ZCode desktop application.

Once the installation is complete, launch ZCode and sign in with your Z.ai account. The application gives us a workspace where we can open local project folders, start new coding sessions, manage conversations, and configure model settings.

If you have used a graphical coding agent before, the interface should feel familiar.

2. Setting up the GLM Coding Plan

To access GLM-5.4 regularly, we need an active GLM Coding Plan subscription. New users can also check whether the limited Start Plan trial is available.

Z.ai offers three tiers, with discounts of 20% for quarterly billing and 30% for yearly billing. At the time of writing, the monthly prices are:

  • Lite: $18 per month, for daily use.
  • Pro: $80 per month, with 6x the usage of Lite.
  • Max: $168 per month, with 14x the usage of Lite.
GLM Coding Plan subscription tiers: Lite, Pro, and Max
Available GLM Coding Plan subscriptions.

For this tutorial, we are using the Lite plan, which is good enough for smaller coding projects and for experimenting with ZCode.

Although the longer billing periods are cheaper, I would not commit to a full year. The AI coding landscape changes quickly, and we do not want to lock ourselves into a single ecosystem. Instead, we can pay $18 for the monthly Lite plan and start experimenting.

Once we have an active subscription, connect the account and select GLM-5.4 from the model selector in ZCode.

Selecting GLM-5.4 and setting reasoning effort in the ZCode model selector
Selecting GLM-5.4 and configuring reasoning effort in ZCode.

We can also adjust the model's reasoning effort depending on the complexity of the task:

  • Low: Suitable for quick questions and minor code changes.
  • High: Ideal for everyday coding and debugging tasks.
  • Max: Suitable for complex reasoning and challenging software engineering tasks.

Since GLM-5.4 tends to spend more time reasoning, I recommend starting with High and switching to Max only for challenging tasks. This saves time and makes better use of our subscription quota.

3. Testing GLM-5.4 on a coding project

Instead of building another simple landing page, we will test GLM-5.4 on a project that combines visual programming, mathematical calculations, 3D rendering, and interactive components. For this example, we will build an interactive 3D solar system simulator using Three.js.

Open an empty project folder in ZCode, select Autonomous mode, and provide the following prompt:

Build an interactive 3D solar system simulator using Three.js. Include planetary orbits, realistic lighting, planet textures, camera controls, adjustable simulation speed, and an information panel for each planet. Make the interface responsive, test the application, and resolve any errors.
GLM-5.4 building a 3D solar system simulator in ZCode
GLM-5.4 working on the solar system simulator.

During execution, we can watch the agent plan the project, create files, install dependencies, run terminal commands, and resolve implementation errors.

This is a good test because the model has to coordinate orbital calculations, 3D animations, and user interactions, not just generate a static frontend.

Interactive 3D solar system simulator built with GLM-5.4 and Three.js
The interactive solar system simulator generated using GLM-5.4.

I was impressed with the result. GLM-5.4 built a complete interactive solar system from a single prompt, with all the features we requested.

We can watch the planets orbit the Sun, adjust the simulation speed, and move around with the camera controls. We can also focus on individual planets, such as Earth or Mars, and read about them in the information panel.

Focusing on Earth in the GLM-5.4 solar system simulator
Focusing on Earth in the solar system simulator generated using GLM-5.4.

The visual quality stood out most. The planetary textures, lighting, 3D animations, and camera transitions all worked well together, and the result felt like a finished interactive experience. All of this came from a single prompt.

4. Exploring Goal Mode, Computer Use, and Browser Use

ZCode includes several features that let the coding agent work independently, interact with applications, and verify its own implementation.

One of my favorites is Goal Mode, which keeps the agent working toward a defined objective across multiple iterations. We activate it with the /goal command. For example, we can ask the agent to improve our solar system simulator:

/goal Fix the Moon's shadow, improve overall planetary lighting and shadows, and resolve any remaining visual or runtime errors.
Using ZCode Goal Mode to improve the solar system simulator
Using Goal Mode to improve the solar system simulator.

Instead of repeatedly asking the agent to continue, we set an objective and let it iterate. The agent checks its work after each round and carries on until the goal is confirmed done, which suits larger projects that need several rounds of development and debugging.

ZCode also has two features for interacting with applications:

  • Computer Use: Allows the agent to interact with desktop applications and graphical interfaces after receiving the necessary permissions.
  • Browser Use: Allows the agent to interact with websites, test web applications, and inspect frontend behavior.

We can switch both features on in the ZCode settings.

Computer Use and Browser Use settings in ZCode
Configuring Computer Use and Browser Use in ZCode.

Both features are useful for frontend development, where the agent can go beyond reading code and test the running application. We should still review the changes and verify the final result ourselves.

5. Automating development workflows

ZCode can also handle repetitive and long-running development work that does not need our immediate attention. Its automation features include:

  • Scheduled tasks: Schedule recurring activities such as code reviews, documentation updates, and project maintenance.
  • Idle-time tasks: Queue non-urgent tasks to run when spare computing capacity is available. Automatic idle-time runs do not use your plan quota, but they need a GLM Coding Plan connection.
  • Hooks: Trigger predefined actions in response to specific events during the agent's workflow.
  • Subagents: Delegate specialized tasks such as debugging, research, testing, and code reviews to separate agents.
Idle-time tasks in the ZCode Automation tab
Idle-time tasks inside the Automation tab in ZCode.

For example, we can schedule regular code reviews, configure hooks to run validation checks, and delegate specialized tasks to subagents.

Idle-time tasks are the feature I find most interesting. Not every development task needs an immediate answer, and because automatic idle-time runs do not use plan quota, queuing non-urgent work is an easy way to get more from a subscription.

There are limits to keep in mind. The Start Plan and API-key-only setups are not supported, ZCode must stay running, your computer must stay awake, and the tasks only run on local projects. You can read more in the ZCode documentation on idle-time tasks.

6. Managing coding sessions and projects

One advantage of ZCode over a terminal-based coding agent is its graphical workspace for managing development activities. We can open different project folders, maintain separate coding sessions, review file changes, and run commands in the integrated terminal.

Managing multiple coding sessions and projects in ZCode
Managing multiple coding sessions and projects in ZCode.

This helps on larger projects. We can keep separate conversations for implementing new features, debugging existing code, and exploring different approaches, without cluttering a single conversation.

We can also review the files the agent modified before accepting its changes, which gives us more control over the development process. Personally, I prefer having everything in a single interface instead of constantly switching between the terminal, file explorer, and coding agent.

7. Accessing ZCode remotely

ZCode also supports remote access, so we can monitor projects and control active coding sessions from a smartphone without being at our workstation.

To get started, click the phone icon at the bottom left of the ZCode sidebar, then scan the QR code or copy the connection link. Sign in on both devices with the same ZCode account, and choose the same account region.

ZCode Remote Control QR code and Bot Channels options
Setting up Remote Control and Bot Channels in ZCode.

The best part is that there is no dedicated Android or iOS app to install. Everything runs in the phone's web browser.

Once connected, we can monitor task progress, switch between projects, create new tasks, review code changes, open the terminal, and give the agent further instructions.

ZCode projects and coding sessions on a smartphone through Remote Control
Accessing ZCode projects and coding sessions from a smartphone.

ZCode also supports Bot Channels, which let us control the coding agent through Telegram, WeChat, Feishu, and Lark.

For example, we can connect a Telegram bot using BotFather, link it with ZCode, and send coding instructions directly through Telegram. We can also check task progress, switch projects, change models, and stop running tasks using bot commands.

Connecting a Telegram bot to ZCode through BotFather in Bot Channels
Connecting Telegram to ZCode through Bot Channels.

This is useful when running long coding tasks in Autonomous or Goal Mode, because we can step away from our workstation and keep managing our projects remotely.

Keep ZCode running and your computer online and awake, since the code still executes on your computer. If the app quits or the computer sleeps, the phone loses its connection.

8. Customizing ZCode

One reason developers like coding agents such as Claude Code and OpenCode is how customizable their workflows are. ZCode offers several options for building a personalized development environment: we can configure MCP servers, install plugins, create custom commands, manage memory, and develop reusable skills.

  • Memory: Retain useful project context, development conventions, and user preferences across coding sessions.
  • Models: Configure additional model providers and switch between different models depending on the task.
  • Skills: Create reusable instructions for tasks such as code reviews, documentation, and testing.
  • MCP servers: Connect the coding agent to external tools, services, and data sources.
  • Plugins: Extend the functionality of ZCode through additional integrations.
  • Custom commands: Create shortcuts for frequently repeated instructions and development workflows.
Managing skills, MCP servers, and plugins in ZCode
Managing skills, MCP servers, and plugins in ZCode.

For example, instead of repeatedly explaining how we want the agent to review our code, we can create a skill containing our coding standards, testing requirements, and review instructions. To learn more about writing skills, see our Introduction to Agent Skills course.

Skills can be organized into personal and project-specific directories:

  • Personal skills: ~/.zcode/skills/
  • Project skills: .zcode/skills/

These options let us gradually shape ZCode around our own workflow, instead of adapting our workflow to the coding agent. You can explore more features and configuration options in the official ZCode documentation.

Final Thoughts

GLM-5.4 with ZCode is an affordable and flexible setup for building applications, running long tasks, and automating development workflows, and I use it almost every day. I have been loving the experience, with one caveat: the model is a little slow to finish a task.

The delay is not necessarily token generation, since our GLM-5.4 article reports throughput of up to 200 tokens per second off-peak and 70 to 80 under load. The time goes on reasoning, planning, and reviewing its own work, which may partly come from the new Loop Transformer architecture.

What matters to me is the quality of the final result.

ZCode makes the experience better. Its customization options, its idle-time tasks, and the ability to manage coding sessions from my phone make it useful for my everyday work. If you want to build complex applications, automate repetitive tasks, or try different models through other providers, this ecosystem is worth a try.

If you want to go further with agent-based coding after trying GLM-5.4 and ZCode, the Software Development with Claude Code course teaches the terminal workflows that make an AI agent reliable for real software projects, and many of them carry over to ZCode. To get up to speed with AI more broadly, I recommend starting with the AI Fundamentals skill track.

Abid Ali Awan

Author

Abid Ali Awan

As a certified data scientist, I am passionate about leveraging cutting-edge technology to create innovative machine learning applications. With a strong background in speech recognition, data analysis and reporting, MLOps, conversational AI, and NLP, I have honed my skills in developing intelligent systems that can make a real impact. In addition to my technical expertise, I am also a skilled communicator with a talent for distilling complex concepts into clear and concise language. As a result, I have become a sought-after blogger on data science, sharing my insights and experiences with a growing community of fellow data professionals. Currently, I am focusing on content creation and editing, working with large language models to develop powerful and engaging content that can help businesses and individuals alike make the most of their data.

Topics

Related