LangSmith で音声エージェントをトレース
LangChain は、開発者が音声エージェントの動作を詳細に追跡・分析できるよう、LangSmith に新しい機能を追加した。
キーポイント
音声エージェント追跡機能の追加
LangSmith プラットフォームにおいて、音声ベースのエージェントの振る舞いを可視化・分析する専用機能が実装された。
開発者のデバッグ能力向上
エージェントがどのように応答し、処理を行っているかを詳細に確認できるため、開発プロセスの効率化と品質向上が可能になる。
複雑な音声ワークフローの可視化
従来のテキストベースの追跡に加え、音声入力・出力を含むマルチモーダルなエージェントの挙動を一元管理できる環境が整った。
影響分析・編集コメントを表示
影響分析
この機能追加は、音声 AI エージェントの実装における「ブラックボックス化」への対策として重要であり、開発者が内部挙動を可視化することで、信頼性の高い音声アプリケーションの構築を加速させる。特に複雑なマルチモーダルワークフローを持つプロジェクトにおいて、デバッグコストの削減と品質保証の強化に寄与する。
編集コメント
音声 AI の普及に伴い、その挙動を可視化・分析するツールの重要性は高まっています。今回の LangSmith の機能強化は、開発者が音声エージェントの信頼性を担保するための重要なステップと言えます。

本日、LangSmith で 4 つの主要な音声エージェントフレームワーク——Pipecat、LiveKit、OpenAI Realtime、そして Google ADK を用いた Gemini Live——をトレースするための Python インテグレーションを発表します。
音声エージェントは実用性が高まりつつあり、市場も急速に拡大しています。この成長は技術スタック全体での進歩によって支えられています。音声活動検出モデルの精度向上により、不要な中断や不自然な対話が減り、音声生成モデルはより感情豊かで自然な声を実現しています。また、大規模言語モデル(LLM)も高速化・知能化し、リアルタイムでの会話が可能になっています。
音声エージェントにも可観測性が不可欠
音声エージェントの構築は、チャットベースのエージェントと多くの点で共通しています。どちらもモデルを呼び出し、ツールを活用し、状態を維持し、文脈を取得し、意思決定を行います。本番環境で音声エージェントをスケールさせるには、パイプライン内のあらゆる時点での状況を可視化できることが必要です。さらに、チームメンバーとのトレース共有、エージェントの行動評価、エラーのデバッグ、そして時間経過に伴う改善——これらはテキストベースのエージェントと同様に重要です。
ただし、音声のトレースや監視には特有の要件が存在します。今回のリリースでは、会話音声を録音したり、音声からテキストへ、あるいはテキストから音声への推論をトレースしたり、中断を検出したりといった機能をネイティブサポートとして追加しました。
これで、テキストエージェントと音声エージェントを同じ場所で管理できるようになりました。LangSmith で既に設定済みのレビューやコラボレーションワークフローをそのまま活用できます。

音声エージェントのアーキテクチャ
音声エージェントを構築する主なアーキテクチャには、「サンドイッチ型」と「音声対音声型」の 2 つがあります。
「サンドイッチ型」では、エージェントは音声テキスト変換(STT)、テキストベースのエージェント、音声合成(TTS)という 3 つの推論コンポーネントを連鎖させて構成されます。1 トークンごとにこれら 3 つのコンポーネントを順に通過します。具体的には、ユーザーの音声が文字起こしされ、そのテキストが従来のテキストベースのエージェントに入力として扱われ、エージェントからの出力が再び音声に変換されてユーザーに再生されます。
「サンドイッチ型」の音声エージェントで優れた観測性を確保するには、パイプラインの各ステップに関する洞察を捉えられることが重要です。具体的には、各推論リクエストからのメタデータや入力・出力データの取得、STT、LLM、TTS 間のレイテンシの内訳を分析して遅延の原因箇所を特定すること、音声活動検出(VAD)イベントの追跡などが含まれます。
一方、音声対音声アーキテクチャでは、エージェントはオーディオ入力を処理し、ネイティブにオーディオ出力を生成するマルチモーダルモデルを用いて構築されます。このアーキテクチャを採用すると、音声エージェントアプリケーションは双方向の WebSocket を介してストリーミングされるイベントで構成されます。具体的には、ユーザーの音声を表すオーディオイベントをモデルへ送信し、モデルからはツール呼び出し、中断検出イベント、文字起こし結果、オーディオ出力などが返されます。
音声対音声の場合、ネットワーク上で送受信するイベントをキャプチャして確認する必要があります。これらのイベントは、音声エージェントのやり取りにおける正解(グランドトゥルース)を再構築したり、アプリケーションのデバッグを行ったりする際に不可欠だからです。
LangSmith を使えば、両方のアーキテクチャをトレースでき、本番環境での会話に関する完全な可観測性を確保できます。
音声トレースの分解
新しいトレーシング統合機能により、LangSmith は各本番トレースからの主要な実行(run)をすべてキャプチャします。各トレーシング統合は数行のコードで設定でき、音声インタラクション中に何が起こったかについて完全な可観測性を提供します。具体的には以下が含まれます:
- トレース上に重ねて表示される会話全体のオーディオ
- 入力、出力、その他のメタデータを含む音声から音声へのモデルイベント
- レイテンシやその他のメタデータを含む音声認識推論のトレース
- レイテンシやその他のメタデータを含むテキスト読み上げ推論のトレース
- ユーザーとエージェントのやり取りをまとめた高レベルのターン
- 発話活動検出イベント
- 割り込みや重なる音声の記録
- モデルへの入力と出力
- ツール呼び出し、引数、結果、およびエラー
- 音声パイプライン各段階におけるタイミング
捕捉した各イベントと作業単位は単一のトレースツリーに表示され、インタラクションがオーディオからエージェントのアクション、そして発話による応答へとどのように移行したかを追跡できます。
エージェントの実際の動作を確認する
エージェントエンジニアリングプラットフォームである LangSmith は、開発者がすべてのエージェント判断をデバッグし、変更の評価を行い、ワンクリックでデプロイできるように支援します。
原文を表示

Today we're launching Python integrations to trace four popular voice agent frameworks in LangSmith: Pipecat, LiveKit, OpenAI Realtime, and Gemini Live with the Google ADK.
Voice agents are getting more practical and the market for voice agents is growing quickly. This growth is propelled by gains across the stack: voice activity detection models are getting more precise, reducing interruptions and awkward interactions, speech models sound more emotive and natural, and LLMs are now fast and smart enough to hold real-time conversations.
Voice agents need observability too
Building voice agents is similar in many ways to building chat-based agents: voice agents call models, use tools, maintain state, retrieve context, and make decisions. In scaling voice agents in production, you need visibility into what happened at any point in your voice pipeline, as well as the ability to share traces with teammates, evaluate your agent's behavior, debug errors, and improve your agents over time — just like you do for text-based agents.
That said, there are a number of requirements that are unique to tracing and observing voice. With this release, we’re announcing native support for capturing and tracing voice interactions, including recording conversation audio, tracing speech-to-text and text-to-speech inference, highlighting interruptions, and more.
Now, your text and voice agents can live in one place, under the same review and collaboration workflows you’ve already set up in LangSmith.

Voice Agent Architectures
There are two main architectures for building voice agents: the “sandwich” architecture and the speech-to-speech architecture.
In the “sandwich” architecture, the agent is composed of three distinct inference components that are chained together: speech-to-text (STT), a text-based agent, and text-to-speech (TTS). Each turn flows through all three of these components: the user’s audio is transcribed, the transcript is used as input in a traditional text-based agent, and the agent’s output is synthesized back to speech for the user to listen to.
Good observability for a “sandwich” voice agent involves being able to capture insights about each step of this pipeline: the metadata, inputs, and outputs from each of the inference requests, a breakdown of latency across STT, LLM and TTS to identify where turn delays stem from, voice activity detection events, and more.
In contrast, in the speech-to-speech architecture, the agent is built using a multi-modal model that processes audio input and emits audio output natively. With this architecture, your voice agent application consists of events streamed across a bidirectional websocket: you send audio events to the model representing the user’s audio, and the model returns tool calls, interruption detection events, transcripts, audio output, etc.
With speech-to-speech, you need to capture and inspect the events that you’re sending and receiving over the wire, as these are crucial to reconstructing the ground truth for your voice agent interaction and debugging your application.
With LangSmith, you can trace both architectures and get full observability into your production conversations.
Deconstructing a voice trace
With our new tracing integrations, LangSmith captures all of the key runs from each production trace. Each tracing integration takes just a few lines of code to set up, and gives you full observability into what happened during a voice interaction, including:
- Full conversation audio, overlaid on your traces
- Speech-to-speech model events, with inputs, outputs, and other metadata
- Speech-to-text inference tracing, with latency and other metadata
- Text-to-speech inference tracing, with latency and other metadata
- High-level user and agent turns
- Voice activity detection events
- Interruptions and overlapping speech
- Model inputs and outputs
- Tool calls, arguments, results, and errors
- Timing across each stage of the voice pipeline
Each event and unit of work we capture appears in a single trace tree, which allows you to follow how an interaction moved from audio to agent action to spoken response.
See what your agent is really doing
LangSmith, our agent engineering platform, helps developers debug every agent decision, eval changes, and deploy in one click.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み