ClayがLangSmithを使用して月間3億エージェント実行をデバッグ・評価・監視する方法
Clayは月間3億回のAIエージェント実行を管理するためにLangSmithを観測・評価基盤として活用し、品質維持、コスト管理、モデル更新への対応を実現している。
キーポイント
大規模なAIエージェント運用の実績
Clayは月間約3億回のAIエージェント実行を処理しており、各実行は10〜30ステップの複雑な推論プロセスを含む。
LangSmithによる観測・評価基盤の構築
品質維持、コスト管理、モデル更新への迅速な対応のために、LangSmithをバックボーンとして活用している。
顧客獲得ライフサイクル全体へのAI統合
Find(ターゲット発見)、Close(リード獲得)、Grow(拡大)の3段階すべてにAIエージェントを構築し、自然言語入力で多様なタスクを処理している。
スケール時の課題と解決アプローチ
オフラインベンチマークでは予測できない品質問題、コスト効率性、モデルの急速な進化という3つの課題を、専用ツールで解決している。
LangSmithの統合とトレースの活用
ClayはLangSmithをエージェント開発の初期段階から統合し、単一行のコードでトレースを有効化している。エンジニアはリアルタイムでトレースを確認し、エージェントの実行ツリーをステップ実行することで、問題箇所を特定している。
多様なユースケースと品質管理の課題
Clayのエージェントは多様なユースケースに対応しており、入力が自然言語であるため予期せぬ動作のリスクが高い。品質劣化を検知するには、合成テストではなく実際のトラフィックの観測が必要である。
LangSmithによる大規模なコスト調整精度
LangSmithのデータと実際の請求書の間で99-99.5%の調整率を達成し、財務チームがコストを正確に把握できるようになった。
影響分析・編集コメントを表示
影響分析
この記事は、AIエージェントの本格的な実運用における課題と解決策を示す重要なケーススタディであり、大規模AIシステムの運用管理のベストプラクティスを提供している。特に月間3億回という運用規模での品質・コスト管理の実践は、AI実装が成熟段階に入ったことを示唆している。
編集コメント
AIエージェントの本格的な実運用における具体的な課題と解決策が詳細に記述されており、AI実装が成熟段階に入ったことを示す貴重なケーススタディ。
タイトル: ClayがLangSmithを使用して月間3億回のエージェント実行をデバッグ、評価、監視する方法
imageClayは成長のためのクリエイティブツールであり、マーケティング担当チームが企業や人物のリストを構築、充実化、活性化するプラットフォームです。営業チームはClayを使用してターゲットアカウントを発掘し、AIを活用したリサーチでリードを選別し、パーソナライズされたアウトリーチを起草し、CRMを通じて商機をルーティングします。Clayの顧客は急成長中のスタートアップから大企業チームまで多岐にわたり、すべての顧客が大規模なアウトバウンド活動を支えるプラットフォームに依存しています。
現在、Clayは月間約3億回のAIエージェント実行を行っています。それぞれが複数ステップの推論プロセスであり、ウェブページのスクレイピング、リサーチの統合、ICP(理想顧客像)に対するアカウントの選別、パーソナライズされたメッセージングの起草などを行う可能性があります。品質を維持し、コストを管理し、モデルリリースの猛烈なペースに対応するために、Clayはオブザーバビリティと評価の基盤としてLangSmithに依存しています。
(完全な対話を聞くには、以下のビデオをご覧ください。)
チャット補完から3億回のエージェント実行へ
ClayのAIへの旅は単純に始まりました:チームは長文書の要約やアウトバウンドコピーの作成にチャット補完を使用していました。しかし、Clayのエンジニアはすぐにより興味深い現象に気づきました。ユーザーがウェブページをダウンロードし、コンテンツをスクレイピングし、AIにそれらのページから自律的に洞察を抽出するよう求めていたのです。このユーザー行動がClaytent(ClayのAIウェブリサーチエージェント)の設計図となり、GPT-4時代が始まってわずか数週間後の2023年半ばにローンチされました。
現在、AIは顧客獲得ライフサイクルのあらゆる段階に織り込まれています。Clayはその中核的価値提案の3つのフェーズすべてにわたってエージェントを構築しています:
- 発見 (Find): Clayの企業・人物データベースまたはオープンウェブからターゲットアカウントを発掘するエージェント型検索。推論を使用してICP適合性を評価します。
- 獲得 (Close): 関連するコンテキストでアカウントを充実化し、構造化された推論で選別し、パーソナライズされたアウトリーチシーケンスを起草するリサーチエージェント。
- 成長 (Grow): アップセルの兆候を特定し、ターゲットに合わせたメッセージングを生成することで、顧客が既存アカウントを拡大するのを支援するエージェント。
各エージェント実行には10〜30のステップが含まれ、ウェブ検索、ページクロール、文書統合、構造化データ抽出を組み合わせています。自然言語入力(ユーザーは空白のテキストボックスに入力し、ほとんど何でも要求できます)により、タスクの範囲は事実上無限です。月間3億回の実行では、わずかな品質やコストの非効率性でも急速に増幅します。
課題:大規模での品質、コスト、モデルの急増
Clayのエージェント使用が拡大するにつれ、専用ツールで解決する必要がある3つの明確な問題が浮上しました。
オフラインのベンチマークから品質を予測するのは困難
Clayのユースケースの多様性により、本番環境での品質は根本的に予測不可能です。顧客は同じエージェントを使用して、ある日はドイツのバイオテクノロジー企業を選別し、翌日にはベンチャー支援を受けた東南アジアのコンシューマースタートアップをリサーチするかもしれません。入力が自由形式の自然言語であるため、予期しないエージェント動作の発生範囲は膨大です。品質のリグレッションを検出するには、合成テストセットではなく実際のトラフィックを観測する必要があります。
コストのレコンシリエーションは移動する標的
Clayの規模では、推論コストは重要な事業経費です。Clayはユーザーに好みのモデルプロバイダー(Anthropic、OpenAIなど)を選択する機能を提供し、プロンプトを各タスクタイプに最適なモデルに自動的にマッピングするメタプロンプターを実行します。複数のプロバイダー、動的なモデルルーティング、月間数億回の実行があるため、統一されたオブザーバビリティレイヤーなしでは、どこにお金が使われているのか、ユーザー向けの内部価格設定が正確かどうかを正確に理解することはほぼ不可能でした。
内部ツールが追いつけない速さで新しいモデルが登場
モデルリリースのペース(ClayのAI責任者であるJeff Barg氏が言うところの「毎週新しいモデル」)は、Clayが常に新しいモデルがルーティングマップに値するかどうかを評価する必要があることを意味します。構造化された評価インフラストラクチャがなければ、各モデル評価は手動で、遅く、再現が困難でした。
オブザーバビリティレイヤーとしてのLangSmith:開発開始日から本番環境まで
Clayはエージェント開発プロセスの初期段階でLangSmithを統合しました。すべての新しいエージェントに対して、トレーシングは開発開始日 (day zero) から有効になっています。統合自体はOpenAIのSDK上に構築された1行のコードで実現されました。Clayがカスタムエージェントハーネスを実行しているにもかかわらず、統合はシームレスでした。
ゼロから立ち上げ:完全なトレース可視性でエージェントを構築
新しいエージェントを構築する際、LangSmithのトレースビューは最初の実行から反復ループの一部です。エンジニアはトレースをリアルタイムでストリーミングし、完全な実行ツリーをステップ実行します。エージェントが何を見たか、どのツールを呼び出したか、モデルが何を返したか、どこで問題が発生したかを正確に確認できます。これは重要です。エンドユーザーが見るのは最終出力だけで、完全なエージェントトレースではないからです。
LangSmithがネストされたサブエージェント呼び出しとツール呼び出しを構造化された読みやすい方法で表現できる能力は、Clayがそれを使用することを決めた重要な要因でした。UIは十分に高速であり、ClayのAI組織にわたる25〜50人のエンジニア(顧客から報告された問題をデバッグするために使用するカスタマーサポートチームメンバーも含む)がトレーニングなしで効率的にトレースをナビゲートできます。
Jeff氏が言うように:「LangSmithは、実際にエージェントフレームワークを構築した人々によって構築されたプラットフォームのように感じます。それは、ネストされたサブエージェントとツール呼び出しパスをどのように扱うかで本当に輝いています。」
本番環境監視:数百万回の実行にわたるパターンの理解
本番環境では、LangSmithはClayに、使用パターン、コストプロファイル、エラーレート、レイテンシ分布、出力品質にわたる集約的な可視性を提供します。これらはすべて顧客ワークスペースとモデルプロバイダーごとにスライスされます。顧客が問題を報告した場合、エンジニアはすぐに関連するトレースを引き上げ、障害がツール呼び出しエラー、推論問題、プロンプト品質の問題のいずれであったかを特定できます。
Snowflakeへのエクスポート機能も役立っています。これにより、データチームが時間をかけてトレースデータに対してカスタム分析を実行できるようになります。これにより、データチームはコストトレンドを追跡し、異常なワークスペースを特定し、更新された価格設定を決定する前に新しいモデル導入の経済性をモデル化できます。
評価:実際のトラフィックを反映するベンチマーク
Clayは、モデル変更やプロンプト更新を評価する際のオフライン評価にLangSmithを使用しています。彼らの評価フレームワークは2つのアプローチを組み合わせています:
- 構造化出力のための決定論的マッチ評価。エージェントの回答が既知のグラウンドトゥルースと比較されます。
- リサーチおよび統合タスクのためのLLM-as-a-judge評価。エージェントが分析の段落を生成し、正確性と関連性についてスコアリングする必要があります。
新しいモデルがリリースされると、Clayはこれらの評価を使用してメタプロンプターのルーティングマップを更新します。モデルが優れているユースケースを特定し、それに応じて価格設定します。LangSmithのデータセット管理により、これらのベンチマークを迅速に実行し、モデルバージョン間のパフォーマンス差を追跡することが可能になります。
大規模でほぼ完璧なコストレコンシリエーションを実現
LangSmithの影響を定量化するように求められたとき、Jeff氏は次のように述べました:
「LangSmith以前は、異なる推論プロバイダー間でどこにお金を使っているのか本当によくわかりませんでした。LangSmithにより、現在、LangSmithデータと実際に受け取る請求書の間で約99〜99.5%のレコンシリエーション率を達成しています。そのおかげで財務チームは私たちを気に入っています。」 — Jeff Barg、Clay AI責任者
複数のモデルプロバイダーにわたる月間3億回のエージェント実行において、このレコンシリエーション率は財務的不確実性の大幅な削減を表しています。Clayは現在、エンドユーザー向けのエージェント実行価格を自信を持って設定し、請求書データが到着するのを数週間待つ代わりに、迅速に価格を調整しています(多くの場合、モデルローンチ当日に)。これはまた、Clayがモデルコスト削減をより速く直接顧客に還元できることを意味し、AI推論コストが急速に低下している市場において意味のある競争優位性となっています。
コストレコンシリエーションを超えて、LangSmithはエージェント開発の初日からトレーシングを利用可能にすることで、Clayのエンジニアリングチームのデバッグサイクルを圧縮するのに役立っています。カスタマーサポートチームメンバーも、エンジニアリングにエスカレーションすることなく、LangSmith内で直接エージェント品質に関する苦情を解決できるため、解決時間とエンジニアリング中断コストの両方を削減しています。
Clayはまた、LangSmithのプラットフォーム信頼性(特に大規模でのトレース取り込みの速度と一貫性)を、開発者の生産性を維持するための重要な要素として評価しています。月間数億回の実行では、取り込み量に対応できないオブザーバビリティツールは、可視性が最も重要なまさにその時に死角を作り出してしまいます。
今後の展望:より長い時間軸を持つエージェント
Clayのエージェントがより複雑になるにつれ(実行時間が長くなり、より多くのステップにまたがり、より多くのサブエージェントを調整する)、彼らは拡張された時間軸にわたるマルチターン相互作用を追跡するために、LangSmithのスレッド機能にますます依存しています。また、Rampなどの企業での同様の取り組みに触発され、ソフトウェア開発ライフサイクルの一部としてバックグラウンドコーディングエージェントの実験も行っています。
結論
ClayはB2B SaaS世界で最も運用に優れたAIエージェントシステムの1つを構築し、モデルに依存しないマルチプロバイダースタックで月間3億回のエージェント実行を行っています。LangSmithはその規模を管理可能にするオブザーバビリティ基盤を提供しています:新しいエージェント開発のための開発開始日トレーシング、使用とコストパターンにわたる本番環境監視、モデル評価のための構造化評価インフラストラクチャ、価格決定に直接影響を与えるほぼ完璧なコストレコンシリエーションです。
原文を表示
imageClay is the creative tool for growth — a platform where go-to-market teams build, enrich, and activate lists of companies and people. Sales teams use Clay to source target accounts, qualify leads with AI-powered research, draft personalized outreach, and route opportunities through their CRM. Clay's customers range from fast-growing startups to large enterprise teams, all relying on the platform to power their outbound motion at scale.
Today, Clay runs approximately 300 million AI agent runs per month — each one a multi-step reasoning process that might scrape web pages, synthesize research, qualify an account against an ICP, or draft personalized messaging. To maintain quality, control costs, and keep up with the breakneck pace of model releases, Clay relies on LangSmith as its observability and evaluation backbone.
(To listen to the full conversation, check out the video below.)
From chat completions to 300 million agent runs
Clay's AI journey started simply: teams used chat completions to summarize long documents and write outbound copy. But Clay's engineers quickly noticed something more interesting happening. Users were pulling down web pages, scraping content, and asking AI to extract insights from those pages autonomously. That user behavior became the blueprint for Claytent — Clay's AI web research agent — which launched in mid-2023, just weeks into the GPT-4 era.
Today, AI is woven into every stage of the customer acquisition lifecycle. Clay has built agents across all three phases of its core value proposition:
Find: Agentic search that sources target accounts from Clay's company and people database or the open web, using reasoning to evaluate ICP fit
Close: Research agents that enrich accounts with relevant context, qualify them with structured reasoning, and draft personalized outreach sequences
Grow: Agents that help customers expand existing accounts by identifying upsell signals and generating tailored messaging
Each agent run involves between 10 and 30 steps, combining web searches, page crawls, document synthesis, and structured data extraction. With natural language inputs — users type into a blank text box and can ask for almost anything — the range of tasks is effectively unbounded. At 300 million runs per month, even small quality or cost inefficiencies compound quickly.
The challenge: quality, cost, and model proliferation at scale
As Clay's agent usage scaled, three distinct problems emerged that required purpose-built tooling to solve.
Quality is hard to predict from offline benchmarks
The diversity of Clay's use cases makes production quality fundamentally unpredictable. A customer might use the same agent to qualify biotech companies in Germany one day and research venture-backed consumer startups in Southeast Asia the next. Because inputs are free-form natural language, the surface area for unexpected agent behavior is enormous. Catching quality regressions requires observing real traffic, not synthetic test sets.
Cost reconciliation is a moving target
At Clay's scale, inference costs are a material business expense. Clay offers users the ability to select their preferred model provider — Anthropic, OpenAI, and others — and runs a meta-prompter that automatically maps prompts to the model best suited for each task type. With multiple providers, dynamic model routing, and hundreds of millions of monthly runs, understanding exactly where money is being spent and whether internal pricing for users is accurate was nearly impossible without a unified observability layer.
New models arrive faster than internal tooling can keep up
The pace of model releases — "a new model every week," as Jeff Barg (Head of AI at Clay) put it, means Clay constantly needs to evaluate whether a new model deserves a place in the routing map. Without structured evaluation infrastructure, each model assessment was manual, slow, and hard to reproduce.
LangSmith as the observability layer: from day zero to production
Clay integrated LangSmith early in their agent development process — tracing is turned on at day zero for every new agent. The integration itself took a single line of code, built on top of OpenAI's SDK. Despite Clay running a custom agent harness, the integration was seamless.
Zero-to-one: building agents with full trace visibility
When building new agents, the LangSmith trace view is part of the iteration loop from the very first run. Engineers stream traces in real time and step through the full execution tree — seeing exactly what the agent saw, what tools it called, what the model returned, and where things went wrong. This matters because what the end user sees is only the final output, not the full agent trace.
LangSmith's ability to represent nested subagent calls and tool invocations in a structured, readable way was a key factor in Clay's decision to use it. The UI is fast enough that 25–50 engineers across Clay's AI organization — including some customer support team members who use it to debug customer-reported issues — can navigate traces efficiently without training.
As Jeff puts it: "LangSmith feels like a platform built by people who have actually built an agent framework. That really shines through in how it handles nested subagents and tool call paths."
Production monitoring: understanding patterns across millions of runs
In production, LangSmith provides Clay with aggregate visibility across usage patterns, cost profiles, error rates, latency distributions, and output quality — all sliced by customer workspace and model provider. When a customer reports a problem, engineers can immediately pull up the relevant traces and identify whether the failure was a tool call error, an inference issue, or a prompt quality problem.
The ability to export to Snowflake, which allows their data team to run custom analyses on trace data over time has also been helpful. This allows the data team to track cost trends, identify anomalous workspaces, and model the economics of new model introductions before committing to updated pricing.
Evaluation: benchmarks that reflect real traffic
Clay uses LangSmith for offline evaluations when assessing model changes or prompt updates. Their evaluation framework combines two approaches:
Deterministic match evals for structured outputs, where the agent's answer is compared against known ground truth
LLM-as-a-judge evals for research and synthesis tasks, where the agent produces a paragraph of analysis that must be scored for accuracy and relevance
When a new model is released, Clay uses these evaluations to update the meta-prompter's routing map — identifying which use cases the model excels at and pricing it accordingly. LangSmith's dataset management makes it possible to run these benchmarks quickly and track performance deltas across model versions.
Achieving near-perfect cost reconciliation at massive scale
When asked to quantify LangSmith's impact, Jeff mentioned that:
"Before LangSmith, we really didn't have a good sense of where we were spending money across different inference providers. With LangSmith, we now have around a 99–99.5% reconciliation rate between our LangSmith data and the actual bills we receive. Our finance team loves us for that." — Jeff Barg, Head of AI, Clay
At 300 million agent runs per month across multiple model providers, that reconciliation figure represents a huge reduction in financial uncertainty. Clay now prices agent runs to end users with confidence, adjusting pricing quickly — often on the day of a model launch — instead of waiting weeks for invoice data to arrive. This also means Clay can pass model cost reductions directly to customers faster, a meaningful competitive advantage in a market where AI inference costs are declining rapidly.
Beyond cost reconciliation, LangSmith has helped compress the debugging loop for Clay's engineering teams by making tracing available from day one of agent development. Customer support team members can also resolve agent quality complaints directly in LangSmith without escalating to engineering — reducing both resolution time and engineering interruption costs.
Clay also credits LangSmith's platform reliability — specifically the speed and consistency of trace ingest at scale — as a meaningful factor in sustaining developer productivity. At hundreds of millions of monthly runs, any observability tool that couldn't keep up with ingest volume would create blind spots precisely when visibility matters most.
Looking ahead: Agents with longer time horizons
As Clay's agents become more complex — running longer, spanning more steps, and coordinating more subagents — they're relying increasingly on LangSmith's threads feature to track multi-turn interactions across extended time horizons. They're also experimenting with background coding agents as part of their software development lifecycle, inspired by similar work at companies like Ramp.
Conclusion
Clay has built one of the most operationally sophisticated AI agent systems in the B2B SaaS world, running 300 million agent runs a month across a model-agnostic, multi-provider stack. LangSmith provides the observability foundation that makes that scale manageable: day-zero tracing for new agent development, production monitoring across usage and cost patterns, structured evaluation infrastructure for model assessments, and near-perfect cost reconciliation that directly informs pricing decisions.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み