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:3
Deploy
Build the image and deploy it. The first deploy builds image
--env .env also uploads your provider keys as
secrets:Expected output
<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 byzeroruntime up (also stored as agent.id
in zeroruntime.yaml) wherever an agent ID is required.
Set up inbound calls
Set up inbound calls
1. Create an inbound gateway: the entry point for incoming calls.2. Create a routing rule: connects the inbound gateway to your deployed agent.3. Test it: dial your provider’s phone number from any phone. The agent greets you as soon as the call connects.
- Dashboard
- API
- Copy the Inbound URL from the Zero Runtime dashboard.
- Go to Twilio and create a new SIP Trunk.
- Go to the Origination section, paste the Inbound URL there, and save it.
- Dashboard
- API
- From your inbound gateway, click Configure rule, then Create new routing rule.
- Enter a Routing Rule Name and select API Key authentication.
- Choose the Call Direction (Inbound).
- Enter the Phone Number and select a Room Type.
- Enter your Agent ID and click Save.
Set up outbound calls
Set up outbound calls
1. Create an outbound gateway: lets the agent dial out to the PSTN.2. Place a call: trigger a call from the agent. Replace
- Dashboard
- API
- In Twilio, open your SIP Trunk and go to the Termination section. Create a Termination URI and add username/password credentials.
- Back in the Zero Runtime Dashboard, open the outbound gateway configuration.
- Paste the Twilio Termination URI as the address, add the same username/password credentials, and save.
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.