ClayがLangSmithを使用して月間3億エージェント実行をデバッグ・評価・監視する方法
Clayは月間3億回のAIエージェント実行を管理するためにLangSmithを観測・評価基盤として活用し、品質維持、コスト管理、モデル更新への対応を実現している。
キーポイント
大規模AIエージェント運用の実例
Clayは月間3億回のAIエージェント実行を処理しており、各実行は10〜30ステップの複雑な推論プロセスを含む。
LangSmithによる観測・評価基盤
品質維持、コスト管理、モデル更新への迅速な対応のために、LangSmithを専用の観測・評価基盤として採用している。
顧客獲得ライフサイクル全体へのAI統合
Find(ターゲット発見)、Close(リード獲得)、Grow(拡大)の3段階すべてにAIエージェントを構築し、自然言語入力で多様なタスクを処理している。
大規模運用における課題解決
オフラインベンチマークでは予測できない品質問題、コスト効率性、モデルの急速な進化という3つの課題をLangSmithで解決している。
LangSmithの統合とトレース機能
ClayはLangSmithをエージェント開発の初期段階から統合し、1行のコードでトレースを有効化。エンジニアはリアルタイムで実行ツリーをステップ実行し、エージェントの動作を詳細に確認できる。
多様なユースケースと品質管理の課題
Clayのエージェントは顧客によって多様な用途に使用されるため、品質の予測が困難。自然言語入力の自由形式性により、予期せぬ動作の発生リスクが大きく、実際のトラフィック観測が不可欠。
LangSmithによるコスト管理と財務的透明性の向上
LangSmithにより、月間3億回のエージェント実行にわたるコストの99-99.5%の正確な調整が可能になり、財務チームの請求書との整合性が大幅に向上した。これにより、モデルコストの削減を迅速に顧客に還元できる競争優位性を獲得している。
影響分析・編集コメントを表示
影響分析
この記事は、AIエージェント技術が実ビジネスで大規模に運用されている具体例を示しており、LangSmithのような観測ツールの重要性を実証している。特に月間3億回という運用規模での成功事例は、AIエージェント技術の実用段階への移行を示す重要な指標となる。
編集コメント
月間3億回という実運用規模でのAIエージェント事例は、技術の成熟度を示す重要な指標。LangSmithの実用性が大規模環境で証明された点が特に注目される。
imageClayは成長のためのクリエイティブツールであり、Go-to-Marketチームが企業や人物のリストを構築、充実、活性化するプラットフォームです。営業チームはClayを使ってターゲットアカウントを発見し、AIを活用した調査でリードを選定し、パーソナライズされたアウトリーチ文を作成し、CRMを通じて商談を振り分けます。Clayの顧客は急成長中のスタートアップから大規模なエンタープライズチームまで多岐にわたり、大規模なアウトバウンド活動を支える基盤としてこのプラットフォームに依存しています。
現在、Clayは月間約3億回のAIエージェント実行を行っています。それぞれが複数ステップの推論プロセスであり、ウェブページのスクレイピング、調査の統合、ICP(理想顧客像)に照らしたアカウントの選定、パーソナライズされたメッセージの作成などを行う可能性があります。品質を維持し、コストを管理し、モデルリリースの猛烈なペースに対応するために、Clayは観測可能性と評価の基盤としてLangSmithを活用しています。
(完全な対話を聞くには、以下のビデオをご覧ください。)
チャット補完から月間3億エージェント実行へ
ClayのAIへの取り組みはシンプルに始まりました。チームはチャット補完を使って長文書を要約し、アウトバウンド用の文案を作成していました。しかし、Clayのエンジニアはすぐに、より興味深い現象が起きていることに気づきます。ユーザーがウェブページを取得し、コンテンツをスクレイピングし、AIにそれらのページから自律的に洞察を抽出させていたのです。このユーザーの行動が、ClayのAIウェブ調査エージェント「Claytent」の設計図となり、GPT-4時代が始まってわずか数週間後の2023年半ばにローンチされました。
現在、AIは顧客獲得ライフサイクルのあらゆる段階に組み込まれています。Clayはその中核的価値提案における3つのフェーズすべてにわたってエージェントを構築しています。
発見: Clayの企業・人物データベースまたはオープンウェブからターゲットアカウントを発見し、推論を用いてICP適合性を評価するエージェント検索
獲得: 関連するコンテキストでアカウント情報を充実させ、構造化推論で選定し、パーソナライズされたアウトリーチの流れを作成する調査エージェント
成長: アップセルの兆候を特定し、顧客に合わせたメッセージを生成することで、既存アカウントの拡大を支援するエージェント
各エージェント実行は10〜30のステップを含み、ウェブ検索、ページクロール、文書統合、構造化データ抽出を組み合わせています。自然言語による入力(ユーザーは空のテキストボックスにほぼ何でも入力できます)により、タスクの範囲は事実上無限です。月間3億回という実行規模では、わずかな品質やコストの非効率さも急速に増幅します。
課題:大規模運用における品質、コスト、モデルの急増
Clayのエージェント利用が拡大するにつれ、専用のツールで解決すべき3つの明確な課題が浮かび上がりました。
品質はオフライン評価からは予測が難しい
Clayのユースケースの多様性により、本番環境での品質は根本的に予測不可能です。顧客は同じエージェントを使って、ある日はドイツのバイオテクノロジー企業を選定し、翌日にはベンチャー資本に支援された東南アジアの消費者向けスタートアップを調査するかもしれません。入力が自由形式の自然言語であるため、予期しないエージェントの挙動が発生する可能性は膨大です。品質の低下を検知するには、合成されたテストセットではなく、実際のトラフィックを観察する必要があります。
コスト調整は常に変動する目標である
Clayの規模では、推論コストは重要な事業費用です。Clayはユーザーに好みのモデルプロバイダー(Anthropic、OpenAIなど)を選択する機能を提供し、プロンプトを各タスクタイプに最適なモデルに自動的に割り当てるメタプロンプターを実行しています。複数のプロバイダー、動的モデルルーティング、月間数億回の実行という環境では、統一された観測可能性レイヤーなしに、どこにコストがかかっているのか、ユーザー向けの内部価格設定が正確かどうかを正確に把握することはほぼ不可能でした。
新しいモデルの登場が内部ツールの開発より速い
モデルリリースのペース(ClayのAI責任者であるJeff Bargが「毎週新しいモデル」と表現したように)は、Clayが常に新しいモデルをルーティングマップに加える価値があるか評価する必要があることを意味します。構造化された評価インフラストラクチャがなければ、各モデルの評価は手動で、時間がかかり、再現も困難でした。
観測可能性レイヤーとしてのLangSmith:開発開始から本番まで
Clayはエージェント開発プロセスの初期段階でLangSmithを統合しました。すべての新規エージェントに対して、トレーシングは開発開始時(デイゼロ)から有効になっています。統合自体は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エージェントシステムの一つを構築し、モデルに依存しないマルチプロバイダースタックで月間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日報で今日の重要ニュースをまとめ読み