This release is a pre-release and may not be stable for production use.
zeroruntime
Build real-time voice agents in Python. You describe the agent — instructions, tools, and a pipeline of providers — and the runtime runs it.
Beta. This is a pre-release. The API may still change between betas, so pin an exact version in anything you depend on.
Install
Beta releases are not installed by default, so ask for them explicitly:
pip install --pre zeroruntime
or pin the version:
pip install zeroruntime==0.1.0b1
Requires Python 3.10 or newer.
Most providers need no extra: their credential is a string you set in the environment, so the base install is enough.
Quickstart
import zrt
from zrt import Agent, Pipeline, Room, function_tool
from zrt.inference import TurnDetector
from zrt.plugins import CartesiaTTS, DeepgramSTT, GoogleLLM, SileroVAD
AGENT_ID = "cascade-basic-agent"
class VoiceAgent(Agent):
def __init__(self) -> None:
super().__init__(
agent_id=AGENT_ID,
instructions="You are a helpful voice assistant.",
pipeline=Pipeline(
stt=DeepgramSTT(),
llm=GoogleLLM(),
tts=CartesiaTTS(),
vad=SileroVAD(),
turn_detector=TurnDetector(),
),
)
async def on_enter(self) -> None:
await self.session.say("Hello, how can I help you today?")
@function_tool
async def get_weather(self, latitude: str, longitude: str) -> dict:
"""Fetch the current weather for a location.
Args:
latitude: Latitude of the location. Estimate it; do not ask.
longitude: Longitude of the location. Estimate it; do not ask.
"""
return {"latitude": latitude, "longitude": longitude, "temperature_c": 28}
def invoke_agent() -> None:
zrt.invoke(AGENT_ID, room=Room(name="Cascade Agent", playground=True))
if __name__ == "__main__":
zrt.serve(VoiceAgent, on_ready=invoke_agent)
Run it and the playground URL is printed once, on stdout. Open it to talk to the agent.
Credentials
Set your runtime token in the environment before serving:
export ZERORUNTIME_AUTH_TOKEN="..."
Vendor keys go in the environment too, one per provider you use — each provider names the variable it reads when the key is missing.
Providers
zrt.plugins calls the vendor directly with your key on your account.
zrt.inference reaches a subset of the same providers through the runtime
gateway instead. The names mirror each other, so swapping the import swaps who
makes the call and who is billed:
from zrt.plugins import DeepgramSTT # your Deepgram account
from zrt.inference import DeepgramSTT # through the gateway
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeroruntime-0.1.0b1.tar.gz.
File metadata
- Download URL: zeroruntime-0.1.0b1.tar.gz
- Upload date:
- Size: 89.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cf5d601878729c7af8d2c930ed8f5868a0f11211b3c248dcbee76c480c98627
|
|
| MD5 |
8bfcd41d83812d0d854ac2711457c00d
|
|
| BLAKE2b-256 |
0a8b5cb25fb908ab9a69f7686cc65dc92c90fa20c9f564ca3b46b78cc21cc577
|
File details
Details for the file zeroruntime-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: zeroruntime-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 136.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c8a1fd7c13dbaacda32cf5b955d17be693b40a02a5d902c5d6a94017395535f
|
|
| MD5 |
221907ce7e6f28a21f7a38f23fe9cfd4
|
|
| BLAKE2b-256 |
2bb0a1bf66845621ce16c90a77e11742b9c51bdb2007f443a1d0a82eae7efaf0
|