Skip to main content
Zero Runtime Cloud hosts and runs your worker on our compute, so you never operate a server. You need an agent project that runs locally.
Run every zeroruntime command from inside your project folder. The CLI keeps your agent, image, and version IDs in zeroruntime.yaml there, so most commands need no flags. See how the CLI tracks state.
1

Remove the local test invoke

For local testing, use the on_ready callback in serve() to start a playground session when the worker is ready. Remove it in production to avoid automatically creating a new room for every worker. In production, start sessions via zeroruntime invoke CLI, the dispatch API, or telephony routing rules.
2

Initialize the deployment

Register the agent with Zero Runtime Cloud. This writes agent.id and deploy.id to zeroruntime.yaml and generates a Dockerfile if your project doesn’t have one:
Please make sure the entry-point file name matches the file specified in the Dockerfile’s CMD.
3

Deploy

Build the image and deploy it. --env .env also uploads your provider keys as secrets:
Expected output
The first deploy builds image <agent-id>:v0.0, and each later up builds the next one. See Version Management.
4

Confirm it's live

5

Talk to your agent

Start the agent in a room. The CLI prints a playground link you can open to talk to it:
Expected output

Ship an update

Changed your code? Run the same command. It builds the next image and creates a new version:

Connect telephony

Deployed a telephony agent but skipped gateway setup? Configure it now so calls reach your deployed agent. Use the Agent ID printed by zeroruntime up (also stored as agent.id in zeroruntime.yaml) wherever an agent ID is required.
1. Create an inbound gateway: the entry point for incoming calls.
  1. Copy the Inbound URL from the Zero Runtime dashboard.
  2. Go to Twilio and create a new SIP Trunk.
  3. Go to the Origination section, paste the Inbound URL there, and save it.
Using a different SIP provider? Follow its inbound setup: Telnyx, Vonage, or Plivo.
2. Create a routing rule: connects the inbound gateway to your deployed agent.
  1. From your inbound gateway, click Configure rule, then Create new routing rule.
  2. Enter a Routing Rule Name and select API Key authentication.
  3. Choose the Call Direction (Inbound).
  4. Enter the Phone Number and select a Room Type.
  5. Enter your Agent ID and click Save.
3. Test it: dial your provider’s phone number from any phone. The agent greets you as soon as the call connects.
1. Create an outbound gateway: lets the agent dial out to the PSTN.
  1. In Twilio, open your SIP Trunk and go to the Termination section. Create a Termination URI and add username/password credentials.
  2. Back in the Zero Runtime Dashboard, open the outbound gateway configuration.
  3. Paste the Twilio Termination URI as the address, add the same username/password credentials, and save.
Using a different SIP provider? Follow its outbound setup: Telnyx, Vonage, or Plivo.
2. Place a call: trigger a call from the agent. Replace YOUR_ZERORUNTIME_AUTH_TOKEN and routingRuleId with your own.

Next

Operate your agent

Versions, secrets, sessions, logs, and scaling down.

CLI Reference

Every command and flag.