Metadata-Version: 2.4
Name: zeroruntime
Version: 0.1.0b6
Summary: Build real-time voice agents in Python.
Author: ZeroRuntime
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://github.com/ZeroRuntimeAI/zeroruntime-py
Project-URL: Repository, https://github.com/ZeroRuntimeAI/zeroruntime-py
Project-URL: Issues, https://github.com/ZeroRuntimeAI/zeroruntime-py/issues
Keywords: voice,voice-agents,realtime,speech,stt,tts,llm,grpc
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio>=1.83.0
Requires-Dist: protobuf<8.0,>=7.35.1
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: mcp>=1.28.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: grpcio-tools==1.83.0; extra == "dev"
Dynamic: license-file

# 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:

```bash
pip install --pre zeroruntime
```

or pin the version:

```bash
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

```python
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:

```bash
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:

```python
from zrt.plugins import DeepgramSTT    # your Deepgram account
from zrt.inference import DeepgramSTT  # through the gateway
```
