How It Works
Enable recording when you serve or invoke the agent, and the framework automatically:- Starts recording when the agent joins the session.
- Starts recording for each participant as they join.
- Stops and merges the recordings when the session ends.
What You Can Record
By default, only audio is captured. Pass aRecordingConfig to opt in to additional streams:
Configure Recording
The quickest way to record every session a process serves isrecording=True on zrt.serve():
recording=True on the Room you pass to zrt.invoke():
RecordingConfig with record_video=True instead of a plain True:
record_screen_share=True along with vision=True on the session:
Recording Lifecycle Events
Recording lifecycle hooks let you observe when recording starts, stops, or fails without polling any API. They are side-effect-only: they react to events without changing the data flow.Hooks fire only when recording is enabled. Turn recording on with
recording=True on zrt.serve(), or by setting recording=True on the Room you pass to zrt.invoke().
Register the hooks on your pipeline to react to each event:
Best Practices
- Inform participants that the session is being recorded.
- Ensure requests are properly authenticated with a valid token.
- Monitor recording status and errors using the recording lifecycle hooks.
- Implement a data retention policy and meet the regulations that apply to your users.
What’s Next
Analytics
Pair recordings with traces, metrics, and logs for each session.
Run Your Agent
Run an agent session and capture it with recording.
References
- Python
SDK Reference
Recording
Recording in the Python API reference.