dry-salesmen-44030
02/20/2026, 12:36 AMtall-airline-16756
02/20/2026, 12:36 AMtall-airline-16756
02/20/2026, 12:36 AMrecord=False when starting a session to prevent audio, transcripts, traces, and logs from being uploaded.
Python example:
# Assuming you have an existing `session` and `agent` objects
await session.start(
agent=agent,
room=ctx.room,
record=False # Disables audio/transcripts/traces/logs for this session
)
Notes:
• Use this for PCI-compliant or other sensitive workflows where recording must be blocked.
• This setting applies only to the specific session.
2) Enable automatic recording (Auto-Egress) via dispatch rules (records to cloud storage)
• Configure your SIP dispatch rule or room configuration to include an AutoEgress configuration that writes encoded files (MP4/other) to S3 or another supported destination.
Python-style pseudocode example (structure shown for clarity):
from livekit import api
from livekit.agents import SIPDispatchRuleIndividual, CreateSIPDispatchRuleRequest
from livekit.egress import AutoEgressConfiguration, EncodedFileOutput, EncodedFileType_MP4, S3Upload, RoomConfiguration
dispatch_rule_request = CreateSIPDispatchRuleRequest(
trunk_ids=[inbound_trunk.sip_trunk_id],
rule=SIPDispatchRuleIndividual(room_prefix="call"),
room_config=RoomConfiguration(
egress=AutoEgressConfiguration(
file_outputs=[
EncodedFileOutput(
file_type=EncodedFileType_MP4,
filepath="recordings/${room_name}_${time}",
s3=S3Upload(
bucket="my-bucket",
access_key="YOUR_AWS_KEY",
secret="YOUR_AWS_SECRET",
region="us-east-1"
)
)
]
)
)
)
# Then create the dispatch rule via the API client
api.create_sip_dispatch_rule(dispatch_rule_request)
Notes:
• Auto-Egress records sessions automatically (useful for call recording).
• Ensure credentials and permissions for S3 (or other egress storage) are configured.
3) Enable Agent Observability at project level (dashboard setting)
• Turn on Agent Observability in Project Settings → Data and Privacy in the LiveKit Cloud Dashboard to allow recording/observability by default.
• Once enabled at project level, individual sessions can still opt out using record=False.
4) Manual egress after a session (start egress job)
• If you prefer to record selectively after the session ends, use room/track composite egress APIs to start recording jobs (e.g., StartRoomCompositeEgress or StartTrackCompositeEgress) that save outputs to your storage.
Example concept (call egress API after session ends):
1. Session completes.
2. Call the Egress API with the room name and desired output configuration (file type, storage destination).
3. Monitor the egress job until completion and retrieve the file location.
Environment / credentials checklist
• LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL for LiveKit access.
• If using S3/GCS: AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (or equivalent GCS credentials).
• Ensure IAM/bucket permissions allow uploads from your egress jobs.
Which example do you want next?
• I can provide a full, runnable sample app (Python or Node) that:
◦ a) starts an agent session with recording disabled, or
◦ b) configures Auto-Egress dispatch rules and uploads to S3, or
◦ c) shows starting a room composite egress after the call ends.
Which language and use case should I expand into a complete example for you?
Sources: Handling payments with PCI compliance | LiveKit | examples/frontdesk | livekit/livekit_composite | DeepWiki | Streamline troubleshooting with Agent Observability