many-afternoon-9428
11/26/2025, 8:17 AMtall-airline-16756
11/26/2025, 8:17 AMmany-afternoon-9428
11/26/2025, 8:18 AMtall-airline-16756
11/26/2025, 8:18 AMtall-airline-16756
11/26/2025, 8:18 AMmany-afternoon-9428
11/26/2025, 8:19 AMtall-airline-16756
11/26/2025, 8:19 AMctx.make_session_report() in your agent’s on_session_end callback to produce a structured report with conversation history, timestamps, events, and recording metadata.
b. Save that report (JSON) to your storage (S3, DB, or local) from the shutdown callback.
• Post‑process transcripts after session
◦ Capture the session transcript (from session.history or the session report), then run your post‑processing pipeline (redaction, punctuation, summarization, NLP) as a separate job or serverless function after the session ends.
• Access transcripts via Agent Insights
◦ Use the Agent Insights dashboard to view turn‑by‑turn transcripts, recordings, traces, and metrics. This data is retained for 30 days by default; export from the dashboard or pull reports programmatically if needed.
Next steps I need from you to give exact sample code and API calls:
1. Do you want a code example to save the session report automatically to S3 (or another target)? If so, which target?
2. Do you need a sample post‑processing pipeline (redaction or summarization)?
3. Do you want instructions for downloading data from Agent Insights or automating exports?
Tell me which option and target you prefer and I’ll provide the exact steps/code.many-afternoon-9428
11/26/2025, 8:20 AMtall-airline-16756
11/26/2025, 8:20 AMmodalities=["text"]) and pair it with an STT plugin so user speech is transcribed separately and is available for post‑processing.
• You can still use transcription_node to modify agent-generated text (agent output) even with OpenAI Realtime.
• Use ctx.make_session_report() or session.history in on_session_end to export/save transcripts once you have STT output (or to capture agent outputs).
If you want, I can:
1. Provide a sample AgentSession config showing OpenAI Realtime + Whisper STT, or
2. Show code to auto-save ctx.make_session_report() to S3 on session end.
Which would you like?
Sources: Realtime model plugins | LiveKit Docs | Text and transcriptions | LiveKit docs | Pipeline nodes and hooks | LiveKit docs | Azure OpenAI Realtime API and LiveKit | LiveKit Docsmany-afternoon-9428
11/26/2025, 8:22 AMtall-airline-16756
11/26/2025, 8:22 AMUserInputTranscribedEvent.
session = AgentSession(
llm=openai.realtime.RealtimeModel(modalities=["text"]), # Realtime model handles conversation
stt="openai/gpt-4o-transcribe-1", # example transcription plugin
tts="cartesia/sonic-3" # optional
)
• With this, user transcripts arrive as separate events and can be processed, emitted to session.history, and included in session reports.
2) Capture and export post‑transcription (auto save session report to S3)
• Use on_session_end / shutdown callback to call ctx.make_session_report() or save session.history to JSON, then upload to S3.
import json
import boto3
s3 = boto3.client("s3")
async def on_session_end(ctx: JobContext) -> None:
report = ctx.make_session_report()
data = json.dumps(report, indent=2)
key = f"transcripts/session_report_{ctx.room.name}_{ctx.job.id}.json"
s3.put_object(Bucket="your-bucket-name", Key=key, Body=data, ContentType="application/json")
• This stores a structured session report that includes turn-by-turn transcripts, timestamps, events, and recording metadata.
3) Post‑processing pipeline (example: redact then summarize)
• After saving or in a separate serverless job, run post‑processing:
def redact(text):
# simple example: remove SSNs/emails (use regex as needed)
return re.sub(r"\b\d{3}-\d{2}-\d{4}\b", "[REDACTED]", text)
def summarize(transcript_text):
# call LLM or your summarizer
return call_summary_model(transcript_text)
# Usage
raw = report["conversation_history"] # adapt to actual report structure
clean = [redact(turn["text"]) for turn in raw]
summary = summarize("\n".join(clean))
• Save redacted transcripts and summaries back to S3 or DB.
Notes and tips
• Keep Realtime modalities=["text"] so the Realtime model does not swallow user audio transcripts.
• Use RoomOutputOptions(sync_transcription=False) if you want transcription forwarded immediately rather than synchronized to TTS timing.
• Agent Insights still captures transcripts and recordings for 30 days; use reports for long‑term storage.
• If you want code tailored to your runtime (Node, Python) or an S3 example with credentials/permissions, tell me which and I’ll provide it.
Which of the three (config, S3 export, or post‑processing) would you like a detailed sample for first?many-afternoon-9428
11/26/2025, 8:24 AMtall-airline-16756
11/26/2025, 8:24 AMmany-afternoon-9428
11/26/2025, 8:30 AMtall-airline-16756
11/26/2025, 8:30 AMmany-afternoon-9428
11/26/2025, 8:33 AMtall-airline-16756
11/26/2025, 8:33 AMsession.history or generate a SessionReport) when the interview ends.
• Upload the final transcript/recording to your S3 bucket for long‑term storage and any post‑processing (redaction, summarization).
Cost recap (per minute)
• LiveKit agent runtime: $0.01 / minute.
• OpenAI STT (your reported rate): $0.006 / minute.
• Combined estimate: ~$0.016 / minute (plus storage/recording overages and any extra LiveKit/Cloud costs).
Key considerations
• Make Realtime operate in text mode or ensure the STT plugin is configured so user speech is emitted as separate transcription events (otherwise Realtime may not expose user transcripts).
• Interim (live) captions rely on the STT plugin producing interim updates; final transcripts come from the STT finalization or the saved session report.
• Use ctx.make_session_report() or session.history at session end to capture full turn‑by‑turn transcripts and metadata for upload to S3.
• Recording/storage: store audio and transcripts to S3; expect additional charges if you exceed Ship plan recording/storage allowances.
• Privacy/compliance: redact sensitive data before long‑term storage if required.
If you want, I can:
• Confirm exactly which STT model name/pricing you’ll be billed for, or
• Estimate monthly cost given your expected minutes and storage.
Which of those would help next?many-afternoon-9428
11/26/2025, 8:34 AMtall-airline-16756
11/26/2025, 8:35 AM