Is it possible to enable agent insights without au...
# ask-ai
r
Is it possible to enable agent insights without audio/transcript being pushed into LiveKit?
✅ 1
t
Thanks for reaching out, James. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about enabling Agent insights without pushing audio/transcript to LiveKit. Short answer: No — Agent insights requires observability data to be sent to LiveKit Cloud. You can disable specific recordings (for example set
record={"audio": False, "transcript": False, "traces": True, "logs": True}
) so audio and transcripts are not stored or shown, but there is no supported way to enable the Agent insights feature while preventing all audio/transcript transmission and still get a functioning insights experience. If you disable those components, they simply won’t appear in the insights. Sources: Streamline troubleshooting with Agent Observability | LiveKit | Why is my Agent insights data missing? | LiveKit | LiveKit Agent Observability | Debug and optimize voice agents | LiveKit | Why is my Agent insights data missing? | LiveKit, with interactive elements
r
Where do I set those?
t
You're right to ask — you set the
record
options in your agent code when creating/initializing the LiveKit agent (before starting the session). Typical places to set it: • When constructing the agent object: e.g.
LiveKitAgent(..., record={ "audio": False, "transcript": False, "traces": True, "logs": True })
• Or disable recording for a session: e.g.
record=False
when you call the agent start/run function. If you share which SDK/language and a small snippet of your agent startup code, I can show the exact line to change. , with interactive elements
r
python
t
Thanks — regarding where to set
record
in Python, set it when you create/start the agent session. Example patterns: 1) When constructing the agent:
Copy code
agent = LiveKitAgent(
    api_key=API_KEY,
    api_secret=API_SECRET,
    record={
        "audio": False,
        "transcript": False,
        "traces": True,
        "logs": True
    }
)
agent.start()
2) When starting a session/run (toggle recording for that session):
Copy code
# if the SDK exposes a start/run call with record param
agent.start(record={"audio": False, "transcript": False})
# or disable all recording for the session
agent.start(record=False)
If you paste the small snippet of your current Python agent initialization (the lines where you create or start the agent), I’ll mark the exact line to change. , with interactive elements
r
Is there a way to enforce redaction on the audio and transcript data being sent to the agent insights data?
t
Thanks — responding about enforcing redaction for audio and transcripts sent to Agent insights. • Transcript redaction: You can enforce redaction at the transcription stage by configuring the STT settings (Deepgram) in your Python AgentSession. Use the
redact
parameter (examples:
"pci"
,
"numbers"
,
"ssn"
) to remove sensitive numeric data from transcripts before they’re produced:
Copy code
session = AgentSession(
    stt=inference.STT(
        model="deepgram/flux-general",
        redact=["pci", "ssn"]  # redact credit card numbers and SSNs
    ),
    llm=inference.LLM(model="openai/gpt-5.3-chat-latest"),
    tts=inference.TTS(model="cartesia/sonic-3"),
)
• Audio redaction: There is no built-in support to redact or alter audio (masking, selective silence, etc.) within the Agent Insights pipeline. Your options are: ◦ Disable audio recording entirely by setting
record={"audio": False}
or
record=False
so audio is not sent/stored. ◦ Perform custom audio processing client-side (e.g., using
rtc.AudioStream
to detect and modify sensitive segments) before deciding whether to send/store audio. LiveKit does not provide an automatic audio-redaction feature. • Post-upload redaction: There is no documented mechanism to redact transcripts or audio after they’ve been uploaded to Agent insights. If you want, tell me which sensitive items you need redacted (PCI, SSN, phone numbers, custom patterns) and whether you prefer disabling audio or implementing client-side audio processing — I can suggest the exact Python config or a processing approach. Sources: Deepgram STT | LiveKit Documentation | Capturing the First Few Seconds of a Call for Processing | Why is my Agent insights data missing? | LiveKit | Streamline troubleshooting with Agent Observability | LiveKit, with interactive elements
r
I want to ensure the LLM has the unredacted transcript such that it can respond and record necessary intent properly, but in analytics and observability redact the data such that we can still run evaluation and monitor for accuracy without exposing unredacted data.
t
Thanks — I’m responding to your requirement: LLM gets unredacted transcripts while Agent insights stores redacted transcripts for analytics. Short answer: LiveKit does not provide a built-in way to keep one unredacted transcript for the LLM and a separate redacted transcript for Agent insights. Transcript redaction happens at the STT stage, so if you enable redaction, the LLM will receive the redacted text. If you disable redaction, the unredacted transcript will be available to both the LLM and Agent insights. Two practical approaches you can use instead: • Client-side/server-side dual pipeline (recommended) a. Send raw audio to your own STT processor (or Deepgram without redact) to produce the unredacted transcript for the LLM. b. Create a redacted copy of that transcript (apply rules or Deepgram redact) and only upload the redacted transcript to Agent insights (or send the redacted transcript through the LiveKit STT path while preventing audio upload). c. Keep observability recording of audio disabled (
record={"audio": False}
) if you don’t want raw audio stored in Agent insights. • Proxy transcription approach a. Let LiveKit handle STT for real-time use, but route the raw audio or raw transcript through a proxy service that provides the unredacted transcript to the LLM. b. Configure LiveKit’s STT with redaction for the observability path so Agent insights stores the redacted transcript. Notes and limits: • Agent insights will only store what is provided to it; there’s no built-in facility to automatically maintain separate redacted/unredacted transcript streams. • Audio-level redaction is not supported; disabling audio recording is the only native way to prevent raw audio from being uploaded. • You’ll need to implement or host the proxy/processing component that handles the unredacted transcript for the LLM and produces the redacted copy for analytics. If you’d like, tell me: • whether you prefer processing audio or post-STT text, • which STT provider you use (Deepgram or others), and I’ll sketch a minimal Python flow/snippet showing how to route unredacted text to the LLM and push a redacted transcript to observability. , with interactive elements
r
We're using Deepgram STT and would like to do post-processing of the transcript to layer on redaction before shipping it to LiveKit analytics, that way we're not getting in the way of the main processing loop nor redacting the data being sent to the LLM.
t
Great — I’ll show a concise, practical Python pattern for your plan: use Deepgram for real-time STT (unredacted) for the LLM, post-process that transcript to redact sensitive pieces, disable LiveKit’s automatic transcript upload, then push the redacted transcript into Agent insights (or your analytics store). Summary of steps 1. Disable automatic transcript/audio recording to LiveKit: set
record={"audio": False, "transcript": False}
when starting the agent/session so LiveKit won’t store raw audio/transcripts. 2. Keep your real-time STT path to the LLM unredacted (Deepgram without redact) for intent and response generation. 3. After receiving the raw transcript, run your redaction logic (rules, regexes, or Deepgram redact/other service). 4. Send the redacted transcript to Agent insights by uploading it as an observability event/log or using whatever Agent Observability API the SDK exposes for sending transcripts/logs. If you prefer, store redacted transcripts in your analytics backend instead of LiveKit. Minimal Python flow (pseudocode — adapt to your SDK methods)
Copy code
# 1. Start agent without LiveKit recording
agent = LiveKitAgent(..., record={"audio": False, "transcript": False, "traces": True, "logs": True})
agent.start()

# 2. Real-time STT for LLM (Deepgram) - get raw transcript
raw_transcript = deepgram_streaming_transcribe(audio_stream)  # returns unredacted text

# 3. Send raw_transcript to LLM for processing
llm_response = llm_client.generate(response_context=raw_transcript)

# 4. Post-process transcript to redact sensitive items
def redact_text(text):
    # example rules: mask SSNs, credit cards, phone numbers, or use Deepgram's redact endpoint
    text = re.sub(r"\b\d{3}-\d{2}-\d{4}\b", "[REDACTED_SSN]", text)
    text = re.sub(r"\b(?:\d[ -]*?){13,16}\b", "[REDACTED_CARD]", text)
    return text

redacted_transcript = redact_text(raw_transcript)

# 5. Push redacted transcript to analytics/Agent insights
# Option A: push to your analytics service
analytics_client.store_transcript(call_id, redacted_transcript, metadata)

# Option B: if SDK exposes sending observability transcripts/logs, use that
agent.send_observability_event(type="transcript", body=redacted_transcript, metadata={...})
Notes and tips • Redaction quality: use combination of regex, entity recognition, and Deepgram’s redact features to cover edge cases. • Latency: do redaction asynchronously so it doesn’t block the LLM path. You can stream raw transcript to the LLM immediately, then redact & ship in the background. • Storage: keep redacted transcripts (and any other observability artifacts) in a controlled analytics store if you prefer not to push them into LiveKit Agent insights. • Limitations: LiveKit does not offer an automatic dual-stream (unredacted to LLM + redacted to Agent insights) out of the box — this custom pipeline is required. If you want, I can: • Provide a concrete code example tailored to the exact Deepgram streaming client you use, or • Sketch how to call the LiveKit SDK/Agent Observability API to upload the redacted transcript (paste your agent start snippet and I’ll mark the exact lines)., with interactive elements