when recording with observability, the cost is per...
# ask-ai
a
when recording with observability, the cost is per minute of audio or minute of session? is it possible to enable/disable observability on the fly?
t
Thanks for reaching out, Sebastián. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll answer both parts. • Billing: recording for agent sessions is billed per minute of audio recorded (not per minute of session). Observability events (transcripts, trace spans, logs) are billed per entry. • Dynamic control: you can enable/disable observability on the fly. Use the
record
parameter of
session.start()
to turn recording on/off or control parts individually, for example:
Copy code
# disable all observability
await session.start(agent, record=False)

# control features individually (Python SDK 1.4.2+)
await session.start(agent, record={"audio": True, "traces": False, "logs": False, "transcript": False})
Would you like examples for another SDK or details about which observability entries are billed per entry? Sources: Pricing | LiveKit | https://livekit.com/pricing.md| | Pricing | LiveKit | Why is my Agent insights data missing? | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements
a
but mid session you can enable/disable? and if there's a room with agent and participant that last 5mins but audio only flows for 2 turns of 10 seconds, recording is billed for 5 mins or the 20 seconds of the user and agent?
t
Thanks — quick answers to both parts. • Can you toggle observability mid-session? No. Recording is set when the agent session starts via the
record
parameter; there’s no documented way to turn recording on/off during an active session. • How is billing measured? Agent session recordings are billed per minute of the agent session duration. So if the room/session lasts 5 minutes, it’s billed for 5 minutes even if only 20 seconds of audio were exchanged. Would you like guidance on minimizing billed session time or examples for setting
record
when starting sessions? Sources: Why is my Agent insights data missing? | LiveKit | Streamline troubleshooting with Agent Observability | LiveKit | LiveKit Agent Observability | Debug and optimize voice agents | LiveKit | Pricing | LiveKit | Pricing | LiveKit, with interactive elements
a
you're contradicting yourself
t
Sorry about the contradiction — thanks for pointing it out. I’ll be clear and concise: • You cannot toggle observability recording mid-session. Recording is set when the agent session is started via the
record
flag; there’s no documented API to switch recording on/off while that same session is active. • Billing is for actual recorded audio minutes (observability events are billed per entry). So if recording is enabled for the session, you are charged for the minutes of audio that were recorded, not for the entire room duration. Example (set at session start):
Copy code
# disable all observability for this session
await session.start(agent, record=False)

# enable audio-only (Python SDK 1.4.2+)
await session.start(agent, record={"audio": True, "traces": False, "logs": False, "transcript": False})
Would you like the same example for another SDK or tips to avoid recording idle sessions? Sources: Pricing | LiveKit | Why is my Agent insights data missing? | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements
a
how to enable observability?
t
Thanks — here’s how to enable observability. 1) Project-level switch • In the LiveKit console open your project → Data and privacy → enable Agent Observability (this allows observability to be used for sessions). 2) Per-session control in code • When starting an agent session set the
record
parameter. Examples: Python (SDK 1.4.2+)
Copy code
# disable observability for this session
await session.start(agent, record=False)

# enable audio-only
await session.start(agent, record={"audio": True, "traces": False, "logs": False, "transcript": False})

# enable all observability
await session.start(agent, record=True)
• If
record
is not enabled for a session, no observability data is collected or billed for that session. Would you like the equivalent example for a different SDK or help locating the console setting? , with interactive elements
a
but by default is enabled right?
t
Observability is disabled by default at the project level. You must enable it in the LiveKit Console under Project → Data and privacy → Agent Observability. After that: • Sessions will only record if you explicitly enable recording for them (or leave project-level observability enabled and don’t set
record=False
). • You control per-session recording when starting the session with the
record
parameter (example shown earlier). Would you like a screenshot or the exact console navigation steps? , with interactive elements
a
is there a way to have observability only charging audio minutes when actual audio flows in the room?
t
Thanks — I’ll be crystal clear. • Billing: observability recording is charged per minute of recorded audio (and observability events are billed per entry). You pay for actual audio recorded, not the full room duration. • Mid-session toggling: you cannot toggle recording mid-session. The
record
flag is set when the agent session starts. To avoid charges for idle time, start a new session with
record=True
when audio begins and use
record=False
(or don’t start a recorded session) for idle periods. If you tell me which SDK/language you use, I’ll give the exact code pattern to start/stop sessions to minimize billed minutes. , with interactive elements
a
but is that possible on the fly?
t
Short answer: no — you cannot toggle observability recording mid-session. Details and what to do instead: • Recording is set when the agent session is started via the
record
flag; there’s no API to turn recording on/off while that same session is active. • Billing is for actual recorded audio minutes (and per-entry for other observability events). To avoid charges for idle time, end the current session and start a new session with
record=True
when audio begins, and use
record=False
(or don’t start a recorded session) for idle periods. If you tell me which SDK/language you use, I’ll provide a concise code pattern to stop/start sessions and minimize billed audio minutes. , with interactive elements
a
python agent 1.5.7 and this end and start isn't slow? i saw on dashboard even if spoke less than a minute that whole session duration was billed
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!