Managing Sessions
3 items
Context Engineering
11 items
Recipes
4 items
Managing Tools
4 items
Updating zai
The zai CLI and desktop apps are under active and continuous development. To get the newest features and fixes, you should periodically update your zai client using the following instructions.
CLI Commands
zai provides a command-line interface (CLI) with commands for managing sessions, configurations and extensions. This guide covers the main CLI commands and interactive session features.
CLI Providers
Use Claude Code, Codex, Cursor Agent, or Gemini CLI subscriptions in zai
ACP Providers
Use ACP agents like Claude Code and Codex as zai providers with extension support
Configuration Files
zai uses YAML configuration files to manage settings and extensions. The primary config file is located at:
Environment Variables
zai supports various environment variables that allow you to customize its behavior. This guide provides a comprehensive list of available environment variables grouped by their functionality.
Quick Tips
Best practices for working with zai
Tool Shim
The tool shim is an experimental feature. Configuration options and behavior may change in future releases.
Security
3 items
MCP Apps
1 item
MCP Elicitation
How extensions can request structured information from you during a task
MCP Roots
How zai shares your working directory with roots-aware MCP extensions
Custom Distributions
zai is designed to be forked and customized. You can create your own "distro" of zai preconfigured with specific providers, bundled extensions, custom branding, and tailored workflows for your organization or audience.
LLM Rate Limits
Rate limiting is the process of restricting the number of requests a user or application can send to an LLM API within a specific timeframe. LLM providers enforce this with the purpose of managing resources and preventing abuse.
Logging System
zai uses a unified storage system for conversations and interactions. All conversations and interactions (both CLI and Desktop) are stored locally in the following locations:
Usage Data
On first use, zai asks for permission to collect anonymous usage data to help improve the product. You can change this setting at any time.
File Management
Efficiently find and reference files in zai Desktop and follow best practices for safe file operations
Run Tasks
When working with the zai CLI, you can pass files and instructions to the zai run command to execute tasks and workflows. This could be a simple one-liner command or a complex set of instructions stored in a file.
Extension Allowlist
zai is an extensible framework that, by default, allows you to install any MCP server. However, you may want stricter controls on which MCP servers can be installed as extensions (e.g. in a corporate setting).
Remote Server
zai Desktop normally runs its own zai serve ACP server process in the background on the same machine. You can also run zai serve separately β for example, on a remote VM or a different machine on your network β and point zai Desktop at it.
Offline Docs
The zai-doc-guide skill reads official zai documentation before answering
Roaming Agents
Roaming agents let you reach a running zai agent from another machine over a
Multi-Model Config
Approaches for configuring model-switching behavior to optimize for cost, performance, and results.
Codebase Analysis
Understand codebases with semantic analysis and call graphs
Azure AI Foundry
Use OpenAI, Anthropic, and partner model deployments from an Azure AI Foundry project
Customizing the Sidebar
Personalize how you navigate zai Desktop by changing the sidebar's look, position, and behavior
VMware Tanzu Platform
Connect zai to VMware Tanzu Platform AI Services
VMware Tanzu Platform - CLI Testing Guide
Prerequisites
Terminal Integration
Talk to zai directly from your shell prompt. Instead of switching to a separate REPL session, stay in your terminal and call zai when you need it.