zrt CLI. For a guided walkthrough, see
Deploy an Agent and
Managing Deployments.
Install the CLI with pip (Python 3.11+):
How values are resolved
Every value a command needs is found in this order:- The flag you pass on the command line.
- The matching field in
zrt.yaml(e.g.agent.id,build.image). - 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. Everyzrt 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 iszrt 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