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

# Observability Options

> Configure recording. Traces and metrics are captured for every session and shown on the Zero Runtime Dashboard.

Zero Runtime captures recording, traces, and metrics for every session. Recording is configured directly on `serve()` and on the per-session `Room` passed to `invoke()`. Traces and metrics are collected automatically and shown on the Zero Runtime Dashboard with no extra setup.

| Capability       | Where you configure it                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| Recording        | `serve(recording=...)` or the per-session `Room(recording=True)` / `invoke(..., recording_config=...)`. |
| Traces & metrics | Collected automatically for every session and shown on the Dashboard.                                   |

## Quick Start

Record sessions (audio + video):

<CodeGroup>
  ```python title="main.py" Python theme={null}
  import zrt
  from zrt import RecordingConfig

  AGENT_ID = "assistant"

  if __name__ == "__main__":
      zrt.serve(
          Assistant,
          recording=RecordingConfig(enabled=True, record_video=True),
          on_ready=lambda: zrt.invoke(
              AGENT_ID,
              room=zrt.Room(
                  playground=True,
                  recording=True,
              ),
          ),
      )
  ```
</CodeGroup>

## Recording

Audio is recorded by default; video and screen share are opt-in. Pass a `RecordingConfig` to `serve(recording=...)` to set defaults for every session. See [Recording](/build/observability-and-monitoring/recording) for the full lifecycle.

| Parameter             | Type   | Default | Description                                                                  |
| --------------------- | ------ | ------- | ---------------------------------------------------------------------------- |
| `record_video`        | `bool` | `False` | Record the agent's camera video track (composite audio + video).             |
| `record_screen_share` | `bool` | `False` | Record the screen-share track. Requires `vision=True` on `serve()` / `Room`. |

<CodeGroup>
  ```python title="main.py" Python theme={null}
  import zrt
  from zrt import RecordingConfig

  zrt.serve(
      Assistant,
      vision=True,
      recording=RecordingConfig(
          enabled=True,
          record_video=True,
          record_screen_share=True,
      ),
      on_ready=lambda: zrt.invoke("assistant", room=zrt.Room(playground=True)),
  )
  ```
</CodeGroup>

## Traces & metrics

Traces and metrics are collected for every session and shown on the Zero Runtime Dashboard automatically (no configuration needed). For programmatic, in-process access to metrics, use Pipeline Observability hooks (`@pipeline.metrics.on(...)`).

## What's Next

<CardGroup cols={2}>
  <Card title="Session Analytics" icon="chart-simple" href="/build/observability-and-monitoring/analytics/session-analytics">
    Review sessions on the Dashboard.
  </Card>

  <Card title="Trace Insights" icon="diagram-project" href="/build/observability-and-monitoring/analytics/traces">
    Drill into per-turn traces and spans.
  </Card>
</CardGroup>

## References

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

    <CardGroup cols={2}>
      <Card title="Observability Hooks" icon="github" href="https://github.com/ZeroRuntimeAI/zrt-python-sdk-examples/blob/main/features/metrics.py">
        Configure what is observed in a session.
      </Card>
    </CardGroup>

    #### SDK Reference

    <CardGroup cols={2}>
      <Card title="Metrics" icon="chart-simple" href="/api-reference/python/core/events">
        `Metrics` in the Python API reference.
      </Card>

      <Card title="Pipeline Hooks" icon="sliders" href="/api-reference/python/core/pipeline">
        `Pipeline Hooks` in the Python API reference.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
