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

# Configure a Pipeline

> Wire STT, LLM, and TTS into the Pipeline your agent runs on.

The `Pipeline` is what your agent hears and speaks through. Pass the components you need (STT, LLM, TTS, plus optional VAD and turn detection) and the pipeline auto-detects its mode from what you give it.

<img src="https://mintcdn.com/zeroruntime/q3ZgSvvBl7VLzLk2/images/pipeline.svg?fit=max&auto=format&n=q3ZgSvvBl7VLzLk2&q=85&s=158222ac249018860efaa51140459876" alt="Pipeline flow from user audio through input processing to cascading, realtime, or hybrid mode, then audio output" className="block w-full my-4" width="1120" height="540" data-path="images/pipeline.svg" />

<CodeGroup>
  ```python title="main.py" Python theme={null}
  from zrt import Pipeline
  from zrt.plugins import DeepgramSTT, GoogleLLM, CartesiaTTS, SileroVAD, TurnDetector
  from zrt.inference import AICousticsDenoise

  pipeline = Pipeline(
      stt=DeepgramSTT(),
      llm=GoogleLLM(),
      tts=CartesiaTTS(),
      vad=SileroVAD(),
      turn_detector=TurnDetector(model="echo-large"),
      denoise=AICousticsDenoise(model_id="quail-vf-2.2-l-16khz"),
  )
  ```
</CodeGroup>

Pass `pipeline` to your [Agent](/build/creating-an-agent), then [run it](/build/run-the-runtime).

## Configure it further

<CardGroup cols={3}>
  <Card title="Modes" icon="sliders" href="/build/configure-a-pipeline/modes">
    Cascade, Realtime, and Hybrid, chosen automatically from the components you pass.
  </Card>

  <Card title="Hooks" icon="code" href="/build/configure-a-pipeline/runtime-hooks">
    Tap into the pipeline at runtime to inspect or transform each stage.
  </Card>

  <Card title="Fallback Adapter" icon="shield-halved" href="/build/configure-a-pipeline/fallback-adapter">
    Fail over between providers to keep sessions resilient.
  </Card>
</CardGroup>

## What's Next

<CardGroup cols={2}>
  <Card title="Run Your Agent" icon="play" href="/build/run-the-runtime">
    Register and serve the agent.
  </Card>

  <Card title="Tools and Capabilities" icon="wrench" href="/build/tools-and-capabilities/overview">
    Give the agent function tools and external services.
  </Card>
</CardGroup>

## References

<Tabs>
  <Tab title="Python">
    #### Examples

    <CardGroup cols={2}>
      <Card title="Cascade Basic" icon="github" href="https://github.com/ZeroRuntimeAI/zrt-python-sdk-examples/blob/main/features/basic_cascade.py">
        Minimal STT-LLM-TTS cascade agent you can run.
      </Card>
    </CardGroup>

    #### SDK Reference

    <CardGroup cols={2}>
      <Card title="pipeline.py" icon="book" href="/api-reference/python/core/pipeline">
        `pipeline.py` in the Python API reference.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
