acceptable-bird-64568
12/25/2025, 7:05 AMtall-airline-16756
12/25/2025, 7:05 AMtall-airline-16756
12/25/2025, 7:05 AMconversation_item_added event on the session, attaching a timestamp (for example ISO UTC) to the item’s metadata, and optionally forwarding the augmented item to persistent storage or your observability pipeline.
Example (Python):
from datetime import datetime
from livekit.agents import ChatItem
@session.on("conversation_item_added")
def handle_convo_item(item: ChatItem):
if not hasattr(item, "metadata") or item.metadata is None:
item.metadata = {}
item.metadata["timestamp"] = datetime.utcnow().isoformat()
# optional: send item to your backend/logging here
Notes and alternatives:
• For richer time data (e.g., per-transcript chunk), also listen to user_input_transcribed and add timestamps there.
• If you already use Agent Observability in the Cloud Dashboard, it provides synchronized playback with timestamps for transcripts and actions, which may remove the need to add timestamps manually.
Would you like a JavaScript/TypeScript example or instructions for storing these augmented events in a database or log pipeline?
Sources: How to capture real-time agent transcriptions during conversations | Testing and evaluation | LiveKit docs | Transcriber | LiveKit docs | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal|