Skip to main content
A complete reference for the zrt CLI. For a guided walkthrough, see Deploy an Agent and Managing Deployments. Install the CLI with pip (Python 3.11+):
Add --help to any command to see its flags, e.g. zrt up --help. Most commands read missing values (agent ID, image, version) from zrt.yaml in the current folder, so you rarely pass them by hand. Run commands from your project root.

How values are resolved

Every value a command needs is found in this order:
  1. The flag you pass on the command line.
  2. The matching field in zrt.yaml (e.g. agent.id, build.image).
  3. A built-in default, otherwise the command tells you what’s missing.

The typical flow

These are the commands you’ll run most, in the order you’ll use them:

Authentication

Quickstart

zrt quickstart downloads a ready-made example, drops it in a new folder, and runs it locally so you can talk to it immediately. If you’re not signed in, it logs you in first.

Run locally

zrt run <project> runs an agent on your machine. Point it at a project folder or a single .py file. It creates a virtual environment, installs requirements.txt once, and reads provider keys from the project’s .env.

Initialize

zrt init registers an agent + deployment, writes the IDs to zrt.yaml, and generates a Dockerfile if your project doesn’t have one.

Deploy

zrt up deploys your agent to Zero Runtime Cloud in a single command, using sensible defaults.
On success, the new version.id is saved to zrt.yaml.

Take it down

zrt down deactivates all active versions so they stop using resources.

Versions

A version is one immutable, deployed configuration. Every zrt up creates a new one.

version list flags

Secrets

Secrets are environment variables (provider keys, tokens) injected into your running agent. The easiest way to set them is zrt up --env .env; you can also manage sets directly:

Invoke

zrt invoke starts your deployed agent in a room so you can talk to it.

Sessions

A session is one live conversation. zrt invoke starts one; session lists and stops them.

session list flags

Logs

zrt logs streams console output from your running agent.

The zrt.yaml file

The CLI stores deployment state in zrt.yaml so commands can run without repeating flags. You rarely edit it by hand; each command fills in the values it produces.
zrt.yaml