> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Zero Runtime

> How Zero Runtime compares to voice frameworks and no-code platforms (real code with your own providers, no infrastructure to run) and how it works under the hood.

Zero Runtime is a runtime, not a framework. With a framework, you write the code *and* run
the servers and GPUs, and manage latency yourself. With a runtime, you write the code and we
run the rest. You write the agent; Zero Runtime runs it in real time and handles the hard part. It
is serverless for voice AI agents.

That puts it between two common options. Self-hosted frameworks give you full control, but
you have to run the real-time infrastructure. No-code platforms run that for you, but lock
you into a dashboard. Zero Runtime gives you the control of a framework with the ease of a
managed platform: real code and your own providers, with nothing to operate.

|                                      | Self-hosted frameworks | No-code platforms | Zero Runtime |
| ------------------------------------ | :--------------------: | :---------------: | :----------: |
| Write real code and custom tools     |           Yes          |   No (dashboard)  |      Yes     |
| Operate media servers, GPUs, scaling |         You do         |      Managed      |    Managed   |
| Swap any STT, LLM, or TTS provider   |           Yes          |      Limited      |      Yes     |
| Low-latency speech-to-speech         |       You tune it      |      Managed      |    Managed   |

## What you get

<CardGroup cols={1}>
  <Card title="Real code, not configuration" icon="code">
    Agents are ordinary Python, TypeScript, or Go. Your logic and tools run in your own
    process, so you can use your existing libraries, data, and services.
  </Card>

  <Card title="Your providers, no lock-in" icon="puzzle-piece">
    Each pipeline stage is a provider you choose. Swap any provider in a single line.
  </Card>

  <Card title="No real-time infrastructure to operate" icon="server">
    Transport, GPUs, turn-taking, and autoscaling run on the runtime. You deploy a worker,
    not a cluster.
  </Card>

  <Card title="The same model in three languages" icon="layer-group">
    Concepts and behavior match across Python, JavaScript, and Go.
  </Card>
</CardGroup>

## How it works

A Zero Runtime agent has two halves:

* **The agent** is your code: the instructions, logic, and tools you write.
* **The runtime** is everything real-time that we run for you: streaming the audio, the
  GPUs, and the latency of the conversation.

Your code runs in your process. The runtime runs on ours.

### Building blocks

Every agent uses the same three pieces, named the same way in each SDK.

<CardGroup cols={3}>
  <Card title="Agent" icon="user-robot" href="/build/creating-an-agent">
    Holds your behavior: the instructions, plus `on_enter` and `on_exit` hooks that run when
    a conversation starts and ends.
  </Card>

  <Card title="Pipeline" icon="diagram-project" href="/build/configure-a-pipeline">
    The voice stack you build from plugins: speech-to-text (STT), an LLM, and text-to-speech
    (TTS), plus voice activity detection (VAD), turn detection, and noise cancellation.
  </Card>

  <Card title="Invoke" icon="play" href="/build/run-the-runtime">
    Starts a session on demand. It hosts your agent, connects to the runtime, and handles
    each conversation.
  </Card>
</CardGroup>

### A single turn

<Frame>
  <img src="https://mintcdn.com/zeroruntime/4_cfATkjcwT4WAC6/images/zrt-single-turn.svg?fit=max&auto=format&n=4_cfATkjcwT4WAC6&q=85&s=f7c1c27957e7d4feec0dde4dbbdfd86e" alt="A single turn in Zero Runtime: caller audio flows through noise cancellation, voice activity detection, speech-to-text, turn detection, the LLM, and text-to-speech, then back to the caller, who can interrupt at any time." width="1600" height="290" data-path="images/zrt-single-turn.svg" />
</Frame>

Each time the caller speaks:

1. **Noise cancellation** cleans up the audio.
2. **Voice activity detection (VAD)** notices that someone is speaking.
3. **Speech-to-text (STT)** turns the speech into text.
4. **Turn detection** decides when the caller has finished, so the agent doesn't cut in too
   early.
5. **The LLM** writes the reply.
6. **Text-to-speech (TTS)** speaks it back.

The caller can interrupt at any time. The runtime stops talking and listens again.

### Who runs what

<Frame>
  <img src="https://mintcdn.com/zeroruntime/4_cfATkjcwT4WAC6/images/zrt-who-runs-what.svg?fit=max&auto=format&n=4_cfATkjcwT4WAC6&q=85&s=39e4081ca097d5db56541ad7d8b99353" alt="Who runs what in Zero Runtime: a caller connects to Zero Runtime, which we manage and which runs transport, GPUs, and the speech-to-text, LLM, and text-to-speech pipeline; it connects to your worker, which you run and which holds your agent's instructions, logic, and tools." width="1520" height="340" data-path="images/zrt-who-runs-what.svg" />
</Frame>

|                              | Your process | Runtime |
| ---------------------------- | ------------ | ------- |
| Agent instructions and logic | Yes          | No      |
| Tool execution               | Yes          | No      |
| Transport, GPUs, turn-taking | No           | Yes     |
| Autoscaling                  | No           | Yes     |

Your agent logic and tools run on your side. The hard real-time infrastructure, the part
that has to be fast and always available, is ours.

## When it fits

Zero Runtime is built for phone agents, replacing phone menus (IVR), customer-support voice
bots, voice assistants, and automated outbound or inbound calls. It fits when you want to
own the agent code but not the real-time infrastructure.
