This integration is in beta, so its API may change.
google-genai connection or the Google Agent Development Kit (ADK), the integration captures each conversation as a single LangSmith trace with spans for transcripts, model responses, tool calls, turn boundaries, and interruptions.
Trace your Gemini Live voice agents to LangSmith. For high-level conventions, see Voice tracing fundamentals.
To trace non-live text agents, tools, and multi-agent workflows built with ADK, see Trace Google ADK applications.
Choose an approach
LangSmith provides a tracing integration for each way to connect to Gemini Live:- If you connect directly with
client.aio.live.connect(...), usewrap_gemini_live. - If you build with Google ADK, use
LangSmithGoogleADKLivePlugin.
Install
Use the Gemini Live client
Install thegemini-live extra for a raw google-genai connection:
Use Google ADK
Install thegoogle-adk-live extra for an ADK application:
The ADK Live integration requires
langsmith[google-adk-live]>=0.9.7. This extra is separate from the langsmith[google-adk] batch integration.Set environment variables
.env
Use the Gemini Live client
Use this approach when your application opens the WebSocket withclient.aio.live.connect(...) and owns the audio and tool loops.
Set up tracing
Enable input and output transcription in the live configuration.wrap_gemini_live returns a transparent proxy for the connected session, so your existing receive loop, audio handling, and tool dispatch remain unchanged:
Transcription is opt-in. To show transcripts in the trace, set both
input_audio_transcription and output_audio_transcription on LiveConnectConfig.Group a conversation into a thread
Each wrapped session is captured as its own trace with its own thread ID. To supply an ID, for example to group the conversation with related interactions in a LangSmith thread, passthread_id:
Record the conversation audio
Feed microphone and playback audio to the wrapped session to attach a single stereo recording, with the user on the left channel and the agent on the right channel:sample_rate. Record the agent’s audio from the speaker so the attachment reflects only what the user heard. For the underlying attachment API, see Upload files with traces.
Use Google ADK
Use this approach when ADK owns the Gemini Live session and tool loop.Set up tracing
ImportLangSmithGoogleADKLivePlugin and register it on your Runner. It runs alongside your run_live loop, so your loop only handles audio playback, barge-ins, and UI updates:
Transcription is opt-in. To show transcripts, set both
input_audio_transcription and output_audio_transcription on RunConfig.On a graceful end, when the live request queue closes, ADK sends its
after_run callback and the plugin finalizes the trace.On a cancelled run, such as a console app that stops run_live on Ctrl-C, ADK might not send that callback. Call plugin.finalize(session_id=adk_session.id) during teardown so the trace and audio attachment are finalized. The call is idempotent, so it does nothing if ADK’s callback already ran.Group a conversation into a thread
Each conversation is captured as its own trace with its own thread ID. To supply an ID, for example to group the conversation with related interactions in a LangSmith thread, pass athread_id_provider to the plugin:
run_live call and resolves the thread ID once at the start of each conversation. The default keeps concurrent conversations separate. If you pass a thread_id_provider on a server handling concurrent conversations, return the ID for the current conversation, for example by reading a ContextVar set at the start of each run.
Record the conversation audio
Feed microphone and playback audio to the plugin to attach a single stereo recording, with the user on the left channel and the agent on the right channel:sample_rate is 24 kHz by default. For the underlying attachment API, see Upload files with traces.
Next steps
Voice fundamentals
Core conventions for tracing voice agents.
Upload files with traces
Attach the conversation audio recording to your trace.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

