エージェントの可観測性を支えるデータレイヤー「SmithDB」を構築
LangChain はエージェントの複雑な観測データに対応するため、従来のデータベースでは処理が困難な「SmithDB」という専用分散データベースを立ち上げたと発表した。
キーポイント
エージェント特有のデータ課題への対応
現代のエージェントは数百のネストされたスパンや長時間稼働するプロセス、マルチモーダルデータを生成するため、汎用データベースでは性能が限界に達している。
圧倒的なパフォーマンス向上の実現
SmithDB の導入により、トレースツリーの読み込みで 92ms、全文検索で 400ms、実行フィルタリングで 82ms という低遅延を実現し、既存の LangSmith 体験を最大 12 倍高速化した。
エンタープライズ向けの拡張可能なアーキテクチャ
オブジェクトストレージに依存し、ステートレスな ingestion とクエリサービスを採用することで、計算リソースの追加でスケーリング可能となり、マルチクラウドやセルフホスト環境への展開が容易になった。
重要な引用
Agent traces have outgrown traditional observability stores — modern agent traces contain hundreds of nested spans, multi-modal content, and spans that stay open for hours
SmithDB delivers industry-leading performance across every key observability workload — with P50 latencies of 92ms for trace tree loads, 400ms for full-text search, and 82ms for run filtering
A portable, scalable architecture built for enterprise needs — backed by object storage with stateless ingestion and query services
影響分析・編集コメントを表示
影響分析
この発表は、AI エージェントが複雑化・大規模化する中で、従来の観測ツール(Observability)のボトルネックを解消する重要な転換点となる。LangChain が自社プラットフォームの基盤インフラを独自に再構築したことは、エージェント開発におけるデータ管理の標準を根本から変える可能性があり、他社製品やオープンソースソリューションにも競争圧力をかけることになる。
編集コメント
エージェントの観測データが爆発的に増加する中、汎用データベースでは対応できなくなったという課題意識は業界全体で共有されています。LangSmith が独自データベースを構築したことは、この分野におけるインフラの成熟を示す重要な一歩です。

主要なポイント
- エージェントのトレースは従来の観測性ストレージでは対応しきれなくなりました。現代のエージェントトレースには数百ものネストされたスパン、マルチモーダルコンテンツが含まれ、さらに数時間にわたって開いたままのスパンも存在するため、汎用データベースが設計されていなかったようなデータ量とクエリパターンが生じています。
- SmithDB は、すべての主要な観測性ワークロードにおいて業界最高レベルのパフォーマンスを提供します。トレーツツリー読み込みの P50 レイテンシは 92ms、全文検索で 400ms、ランフィルタリングで 82ms と非常に高速であり、これにより LangSmith の中核的なエクスペリエンスが従来比最大 12 倍も速くなりました。
- エンタープライズニーズに最適化された、ポータブルかつスケーラブルなアーキテクチャ。オブジェクトストレージをバックエンドとし、ステートレスな取り込みおよびクエリサービスを採用しているため、SmithDB はローカルディスクの管理ではなく計算リソースを追加することでスケールします。これにより、セルフホスト型やマルチクラウド環境へのデプロイが容易になります。
私たちは、LangSmith の中核的なワークロードを支えるようになった、エージェント観測性専用の分散データベース「SmithDB」をリリースしました。
SmithDB は、主要な観測性ワークロードにおいて LangSmith に業界最高レベルのパフォーマンスをもたらし、顧客が必要とする場所にデータを配置できるポータビリティを提供し、従来の観測性ストレージでは設計されていなかったエージェントネイティブなクエリパターンをサポートする柔軟性を備えています。
エージェントは新たなデータ課題を提示する
エージェントの観測可能性において、トレースはエージェントの中核的な行動記録として機能します。
2023 年に LangSmith が初めてリリースされた当時、AI アプリケーションは比較的単純でした:チームは RAG パイプライン、プロンプトチェーン、そして非常に初期段階のエージェントを構築していました。
それ以来、エージェントはより一般的になり、実行時間が長くなり、LLM のコンテキストウィンドウサイズが劇的に増加し、ワークロードには画像や音声などのマルチモーダルコンテンツが含まれることが増えています。
その結果、現代のエージェントに関連するトレースデータは、量(トレース数)とサイズ(個々のペイロードの大きさ)の両面で爆発的に増加しました。現代のエージェントのトレースには、数百もの深くネストされたスパンが含まれることがあります。
image.png)
image.png)
トレースが巨大でネストされているだけでなく、断片的に到着することもあります:エージェントのスパンの開始イベントは、終了イベントよりも数分、あるいは数時間前に到着することがあります。
このデータを分析するために必要なクエリパターンも、ますます複雑化しています。エージェントの観測可能性は以下の機能をサポートする必要があります:
- ランダムアクセス:個々のランやトレースを即座に読み込み
- インタラクティブなフィルタリング:メタデータ、フィードバック、レイテンシ、エラー、タグ、時間に基づいて大規模なトレースデータを切り分け
- 全文検索:エージェント実行の入力と出力内のフレーズやパターンを検索
- JSON フィルタリング:任意のユーザー定義メタデータおよび構造化されたツール出力をクエリ
- ツリー対応クエリ:ルートラン、子ラン、またはトレース内の任意のノードに基づいてフィルタリング
- スレッド再構築:多数のエージェントトレースにわたる長時間実行中の会話を即座に再構築
- 集計:異なるフィルターごとのコスト、レイテンシ、トークン使用量、評価者スコアを計算
これらすべてを低レイテンシで、大規模なエージェントトレース上で、セルフホスティングおよびマルチクラウド要件を満たしながらサポートするには、根本的に新しいアーキテクチャが必要です。
それが SmithDB の背景にある動機です。
SmithDB の紹介
SmithDB は、エージェントの観測性と評価ワークロードのために特別に設計された LangSmith のデータレイヤーです。
Rust で構築され、Apache DataFusion クエリエンジンおよび Vortex ファイルツールキットを活用しており、LangSmith の固有のワークロード向けに大幅なカスタマイズが施されています。
高レベルでは、SmithDB は 3 つのコンポーネントで構成されています:
- 永続的なトレースデータ用のオブジェクトストレージ
- セグメントメタデータ用の小規模な Postgres メタストア
- ステートレスな取り込み、クエリ、およびコンパクションサービス
image%201.png)
パフォーマンス
観測性において、パフォーマンスは単なる「あれば便利」なものではありません。人間にとってもエージェントにとっても、遅い観測性ツールはエージェント開発ループにおけるボトルネックとなります。SmithDB は、エージェントの観測性に重要な主要なワークロード全体で最先端のパフォーマンスを提供し、LangSmith のコアエクスペリエンスを従来比最大 15 倍高速化します。
Workload | SmithDB レイテンシ
---|---
Trace tree load(トレースツリー読み込み) | P50 92ms / P99 595ms
Single run load(単一実行読み込み) | P50 71ms / P99 358ms
Runs filtering(実行フィルタリング) | P50 82ms / P99 434ms
Trace ingestion(トレース取り込み) | P50 630ms / P99 1.47s
Full-text search(全文検索) | P50 400ms / P99 870ms
Threads filtering(スレッドフィルタリング) | P50 131ms / P95 268ms
ポータビリティ
SmithDB はオブジェクトストレージをバックエンドとして利用しているため、管理すべきローカルディスクは存在しません。クエリおよび取り込みサービスはステートレスです。システムは計算リソースを追加することでスケーリングし、永続的なデータはオブジェクトストレージ上に保存されます。
これにより、ローカルディスクと複雑なシャーディングを必要とする従来のデータベースクラスターと比較して、セルフホスト環境やマルチクラウド環境での SmithDB のデプロイがはるかに容易になります。
SmithDB は現在、本番トラフィックを提供しています
本日:
- US クラウドからのデータ取り込みの 100% が SmithDB に送信されます
- スレッドを含むすべてのトレーシング UI クエリトラフィックが SmithDB に送信されます
- メタデータ、フィードバック、テキスト検索、ツリーフィルター、トレースフィルターなど、主要なフィルターのすべてが SmithDB をバックエンドとして利用しています
- ルール実行、一括エクスポート、実験などの製品統合機能もまもなく完了します
間もなく:
- 関連するすべてのプロダクト画面が SmithDB へ移行され、SmithDB は LangSmith のセルフホストデプロイメントでも利用可能になります
初期フィードバック
過去数ヶ月にわたり、顧客のワークロードを SmithDB への移行を進めてきました。Clay、Vanta、Unify、Cogent の各チームからは以下のような声が寄せられています:
*私たちは毎日、何億件ものエージェント観測イベントを LangSmith にログ記録しています。SmithDB により、私たちのチームはプロダクション環境のエージェント改善に必要な速度で、そのデータを検索・デバッグ・分析できるようになりました。パフォーマンスの向上は即座に体感でき、特にトレース探索がボトルネックとなっていた大規模プロジェクトにおいては目を見張るほどです。* — Jeff Barg, Clay 社 AI 部門責任者
*SmithDB への移行以降、パフォーマンスの向上は即座に体感できるようになりました。ユーザーエクスペリエンス(UX)が著しくレスポンスが良くなり、データの詳細調査がこれまで以上に迅速かつ直感的に行えるようになりました。素晴らしい体験でした。* — Andy Almonte, Vanta 社 AI シニアエンジニアリングマネージャー
*ツール呼び出しの多いトレースが多くあり、SmithDB へ移行したことで、プロジェクト全体にわたるトレースの照会や閲覧が格段に容易になりました。これにより、エッジケースを特定し、評価用データセットを構築し、以前よりもはるかに速くトレースの改善を行うことが可能になっています。* — Kunal Rai, Unify の AI ソフトウェアエンジニア
*Cogent では、バックグラウンドエージェントが一度に膨大な量のトレースを生成します。これらのシステムに対するリアルタイムな観測性が必要であり、SmithDB はその体験を提供しています:他のプロバイダーでテストした際に数分かかっていたものを、数秒でトレースを確認できるのです。* — Larsen Weigle, Cogent Security の技術スタッフ
主要なエンジニアリング上の課題
SmithDB をエージェント観測性ワークロード向けに極めて高性能なデータベースとするためには、膨大な量のエンジニアリング努力が注ぎ込まれました。
高レベルでは、SmithDB はオブジェクトストレージをバックエンドとした ログ構造型マージツリー (LSM: Log-Structured Merge Tree) として構築されています。LSM は書き込みをメモリにバッファリングし、永続化されたストレージへ不変のソート済みバッチとしてフラッシュし、定期的にそれらのセグメント同士をコンパクトします。クエリ実行時には、複数のセグメントが読み込まれ、単一の順序付きストリームとしてマージされます。
SmithDB には5 つの主要なコンポーネントがあります:
- 取り込みサービス:トレース書き込みを受け入れ、パーティションおよび時間バケットごとにバッチ処理して、不変ファイルとして書き出します。
- メタストア:場所、時間範囲、行数、更新/削除ベクトルを含むセグメントのメタデータを記録します。
- クエリサービス:LangSmith の実行セマンティクスとオブジェクトストレージを理解するカスタム実行計画を備えたクエリインターフェースを提供します。SSD とメモリのキャッシングを積極的に活用しています。
- コンパクションサービス:書き込み最適化されたセグメントを書き換え、削除の適用、バージョンアップ、TTL 期限切れ処理、インデックスのマージを行いながら、クエリ最適化されたセグメントに変換します。
- クラスターマネージャー:ライブなサービスノードをキー範囲に割り当てます。これは SmithDB が単に負荷分散を図っているだけでなく、繰り返し行われるクエリが適切なデータがキャッシュされている可能性が高いノードに着地するように設計されているためです。
以下は、主要なエンジニアリング上の課題の詳細であり、今後のブログ記事でさらに詳しく解説します:
オブジェクトストレージ上での段階的クエリ実行
多くの LangSmith クエリでは、特定のテナントおよびトレーシングプロジェクトにおける最新のランを取得する必要があります。素朴なオブジェクトストアプランでは、まずすべての候補ファイルを検出し、多数のファイルをオープンし、ソートマージと重複排除を行った後にのみ制限条件を適用することになります。
SmithDB は時間を遡り、最新の候補セグメント上に有界な時間ウィンドウを構築します。これにより、「すべてをソートして制限する」という処理が「最新の有界スライスを読み込み、ストリーミングし、行をマージ・重複排除し、正しさが許す限りすぐに停止する」という処理に変換され、"Top K" 形式のクエリを実行するためにスキャンされるデータ量が大幅に削減されます。
image%201.png)
取り込みノードからの新鮮なデータの読み込み
オブジェクトストレージは永続的な真実の源ですが、最も新しいデータはまだそれを記述した取り込みノード上に存在していることがよくあります。
各ファイルセグメントには、そのファイルを生成したノードのサーバー識別子が記録されています。その書き込み元がまだオンライン状態であれば、クエリプランナーはカスタムプランを使用して、オブジェクトストレージから即座に読み返すのではなく、取り込みノードのローカル SSD やメモリキャッシュから直接これらのファイルをスキャンできます。これにより、最先端のクエリを実行するためにオブジェクトストレージから数十個の小さなファイルを読み込む必要がなくなります。
image%201.png)
実行ごとの複数イベント
エージェントの観測可能性は、長時間実行されるスパンを中心に構築されています。
従来のリクエスト/レスポンス型アプリケーションでは、スパンは数ミリ秒のうちに開始され終了します。しかし、エージェントのスパンははるかに長く開いたままになります。1 つの実行には、モデルによる補完、ツール呼び出し、再試行、バックグラウンド処理、または他のエージェントへの引き継ぎなどが含まれる可能性があります。スパンが完了するまで何も書き込まないのを待つのでは、理想的ではありません。
SmithDB では、実行は単一の不変の行ではなく、一連のイベントとして扱われます。これはシンプルに聞こえるかもしれませんが、クエリエンジン全体に影響を及ぼします。特定のイベントを対象とするフィルターの展開や、クエリ時に効率的にイベントをマージする処理には特別な配慮がなされています。1 つの実行あたりの複数のイベントを扱うことは、コンパクション戦略にも影響を与えます。

時間階層型コンパクション
インgestion(データ取り込み)は書き込みレイテンシの最適化を目的としており、その結果として多くの小さな不変セグメントが生成されます。これらのセグメントを永遠にクエリし続けると、ファイルオープン時のオーバーヘッドや重複排除作業が多すぎることになります。
コンパクションとは、書き込み最適化されたセグメントを書き換え可能なクエリ最適化セグメントに変換するプロセスです。SmithDB は時間階層型(time-tiered)戦略を採用しています。この時間階層化により、SmithDB がどの程度積極的にこの処理を行うかを決定します。新しいデータは終了イベントを受け取る可能性が高いため、それを早期に巨大なファイルにコンパクションすると、不要な書き込み増幅を引き起こすことになります。一方、古いデータはより安定しており、繰り返しスキャンされる可能性が高いため、大きなファイルに統合する価値があります。
これにより、データ取り込みの速度を維持しつつ、古いデータの照会コストを段階的に低下させることができます。
削除、TTL および保持期間の変更
観測性システムにおいて、削除やアップグレードといった変更操作は、データファイルが不変であるためしばしば困難です。デフォルトでは、SmithDB は各削除ごとにデータファイルを同期的に書き換えません。代わりに、メタストアがセグメントエントリに対して削除ベクトルとアップグレードベクトルを付与します。照会パスおよびコンパクションパスはこれらのベクトルを使用して、不変ファイルの正しい解釈を行います。ファイルの書き換えはコンパクション中に発生します。
この戦略により、SmithDB における変更操作が極めてスケーラブルになります。これは特にエージェント観測性において重要であり、なぜなら保持期間が均一であることはめったにないからです。ほとんどのトレースは、最近のデバッグ、モニタリング、評価には有用ですが、特定のトレースの内容に基づき、長期保存が必要となるのはごく一部のサブセットに限られます。
大規模フィールドの遅延マテリアライゼーション
エージェントのトレースには、しばしば大規模で境界のないペイロードが含まれます。SmithDB は、コア実行フィールドと大規模フィールドを分離することで、一般的なリスト照会およびフィルタリングクエリを高速に保ちます。コア行は大規模フィールドファイルへのポインタを持ち、クエリエンジンは実際にそのフィールドを投影する際にのみ、それらの大規模ペイロードを取得します。
つまり、ユーザーが実行リストを読み込んだり、特定のフィールドを要求したりしない限り、実行リストの読み込みやフィルタリングの適用に際して、メガバイト単位の JSON データを読み込む必要はありません。
フルテキスト検索と JSON フィルタリング
1MB 以上のペイロードに対するサブ秒単位のフルテキスト検索および JSON キーパスフィルタリングをサポートすることは、困難なエンジニアリング課題です。
SmithDB は、オブジェクトストレージ向けに最適化されたカスタム逆インデックスレイアウトを通じて、これらのクエリを効率的に処理します。ローカルディスク上では、インデックスは安価なシークと多数の小さな読み取りに依存できますが、オブジェクトストレージ上ではそのパターンは崩壊します:不要なリクエスト一つひとつが遅延を引き起こし、大規模なポストイングやポジションリストを早期にフェッチするとクエリ全体を支配してしまう恐れがあります。
SmithDB のインデックスレイアウトはこの問題を回避するために設計されています。用語は行グループにソートされ、各行グループには最小値/最大値の用語ゾーンが記録されます。これにより、SmithDB がポストイングバイトを取得する前に、完全一致およびプレフィックス用語クエリでインデックス行グループを絞り込むことが可能になります。ポストイングとポジションは用語辞書とは別にチャンク化されるため、一般的な用語が巨大なメモリ割り当てやオブジェクトストレージ上の広範囲な読み取りを強制することはありません。行グループおよびチャンクのしきい値は、ビルダー時のメモリ使用量とクエリ実行時の I/O の両方を制限します。
クラスター管理とステッキルーティング
SmithDB には、どのサービスノードがどのトラフィックを担当するかを制御する軽量なクラスターマネージャーが含まれています。これは重要です。なぜなら SmithDB は単に負荷分散を図っているだけでなく、繰り返し行われるクエリが適切なデータがキャッシュされている可能性の高いノードに着地するようにも努めているからです。
このクラスタマネージャーは、Google の Slicer や Databricks の Dicer プロジェクトに触発されたもので、キー空間をスライスに分割し、各スライスを安定したサービスノードのセットに割り当てることで、その課題を回避します。ルーターはこれらの割り当て情報を用いて、関連するリクエストを同じノードまたは小さなレプリカセットへ送信します。
これにより、SmithDB には以下の 2 つの重要な特性が生まれます:
- スティックルーティング: 関連するリクエストは、すでに適切なキャッシュされたメタデータやセグメントバイトを持つノードに到達する確率が高まります。
- 適応型バランシング: ノードが参加したり離脱したり、あるいは過負荷状態になったりした場合でも、クラスタマネージャーは永続的なセグメントメタデータを変更することなくスライスを移動できます。
次のステップ
LangSmith の UI を SmithDB でバックアップする機能をさらに移行していくだけでなく、このデータレイヤーが実現する新しい製品体験についても非常に楽しみにしています。
LangSmith の次のフェーズは、単にトレースデータの読み込みを高速化するだけではありません。それは、トレースデータをより有用なものにすることです。検索しやすく、分析しやすく、そしてエージェント開発のループへフィードバックしやすくすることです。SmithDB は、これを実現するための基盤となるレイヤーとして機能します。
また、優秀なシステムエンジニアおよびデータベースエンジニアを募集していますので、ぜひご参加ください。
関連コンテンツ

LangSmith
LangSmith Engine のご紹介

Ben Tannyhill
2026 年 5 月 13 日
5 分

LangSmith
LangSmith Context Hub のご紹介

Harrison Chase
2026 年 5 月 13 日
8 分

LangSmith
LangSmith Sandboxes が一般提供開始

Mukhil Loganathan
2026 年 5 月 13 日
6 分
必ず JSON 形式で返してください。translation フィールドのみ。他のフィールド (technical_terms 等) は一切追加しないこと — 余計なフィールドを書こうとして本文翻訳がトークン上限で打ち切られる事故を防ぐため:
{"translation": "翻訳全文"}
あなたのエージェントが実際に何をしているかを確認する
LangSmith は、私たちが提供するエージェントエンジニアリングプラットフォームであり、開発者がすべてのエージェントの意思決定をデバッグし、変更の評価を行い、ワンクリックでデプロイできるように支援します。
原文を表示

Key Takeaways
- Agent traces have outgrown traditional observability stores — modern agent traces contain hundreds of nested spans, multi-modal content, and spans that stay open for hours, creating data volumes and query patterns that general-purpose databases were never designed to handle.
- SmithDB delivers industry-leading performance across every key observability workload — with P50 latencies of 92ms for trace tree loads, 400ms for full-text search, and 82ms for run filtering, it makes core LangSmith experiences up to 12x faster than before.
- A portable, scalable architecture built for enterprise needs — backed by object storage with stateless ingestion and query services, SmithDB scales by adding compute rather than managing local disks, making it straightforward to deploy in self-hosted and multi-cloud environments.
We’re launching SmithDB, our purpose-built distributed database for agent observability that now backs core LangSmith workloads.
SmithDB gives LangSmith industry-leading performance across key observability workloads, the portability to run wherever customers need their data to live, and the flexibility to support agent-native query patterns that traditional observability stores were not designed for.
Agents present a new data problem
In agent observability, traces serve as the agent’s core behavioral record.
When LangSmith first launched in 2023, AI applications were relatively simple: teams were building RAG pipelines, prompt chains, and very early agents.
Since then, agents have become more ubiquitous and longer running, LLM context window sizes have increased dramatically, and workloads increasingly contain more multi-modal content, such as images and audio.
As a result, the trace data associated with modern agents has exploded in both volume (number of traces) and size (individual payload size). A modern agent trace can have hundreds of deeply nested spans.
smithdbpayloadovertime.png)
.png)
In addition to being large and nested, agent traces also arrive in pieces: a start event for an agent span can arrive minutes, maybe even hours before an end event.
The query patterns needed to analyze this data have also gotten increasingly complex. Agent observability needs to support:
- Random access: instantly load an individual run or trace
- Interactive filtering: slice large trace datasets by metadata, feedback, latency, errors, tags, and time
- Full-text search: find phrases and patterns inside agent run inputs and outputs
- JSON filtering: query arbitrary user-defined metadata and structured tool outputs
- Tree-aware queries: filter based on root runs, child runs, or any node in a trace
- Thread reconstruction: rebuild long-running conversations across many agent traces instantly
- Aggregations: compute cost, latency, token usage, evaluator scores for different filters
Supporting all of them, at low latency, over large agent traces, with self-hosting and multi-cloud requirements, requires a fundamentally new architecture.
That is the motivation behind SmithDB.
Introducing SmithDB
SmithDB is LangSmith’s data layer purpose-built for agent observability and evaluation workloads.
It is built in Rust and leverages the Apache DataFusion query engine and Vortex file toolkit, with heavy customizations for LangSmith’s unique workloads.
At a high level, SmithDB is made of three components:
- Object storage for durable trace data
- A small Postgres metastore for segment metadata
- Stateless ingestion, query, and compaction services
%201.png)
Performance
Performance is not just a nice-to-have for observability. For both humans and agents, slow observability tools become a bottleneck in the agent development loop. SmithDB delivers leading performance across the key workloads that matter for agent observability and makes core LangSmith experiences up to 15x faster than before.
Workload
SmithDB latency
Trace tree load
P50 92ms / P99 595ms
Single run load
P50 71ms / P99 358ms
Runs filtering
P50 82ms / P99 434ms
Trace ingestion
P50 630ms / P99 1.47s
Full-text search
P50 400ms / P99 870ms
Threads filtering
P50 131ms / P95 268ms
Portability
Because SmithDB is backed by object storage, there are no local disks to manage. Query and ingestion services are stateless. The system scales by adding compute, while durable data lives in object storage.
This makes SmithDB much easier to deploy in self-hosted and multi-cloud environments than traditional database clusters that require local disks and complex sharding.
SmithDB is now serving production traffic
Today:
- 100% of US Cloud ingestion goes to SmithDB
- 100% of tracing UI query traffic goes to SmithDB, including threads
- All major filters are backed by SmithDB, including metadata, feedback, text search, tree filters, and trace filters
- Product integrations like run rules, bulk export, and experiments are nearing completion
Soon:
- All relevant product surface will be ported over to SmithDB and SmithDB will be available for self-hosted deployments of LangSmith
Early feedback
We've been migrating customer workloads to SmithDB over the past few months. Here's what teams at Clay, Vanta, Unify, and Cogent are saying:
We log hundreds of millions of agent observability events to LangSmith every day. SmithDB has made it possible for our team to search, debug, and analyze that data at the speed we need to improve our agents in production. The performance improvements are immediately noticeable and impressive, especially on large projects where trace exploration used to be a bottleneck. — Jeff Barg, Head of AI at Clay
Since moving to SmithDB, the performance improvements have been immediately noticeable. Our UX feels significantly snappier, and it’s made digging into our data faster and more intuitive than ever. It’s been a great experience.— Andy Almonte, Senior Engineering Manager, AI at Vanta
We have a lot of traces with large tool calls and after migrating to SmithDB, querying for and reading through traces across our projects has been much easier to do. This has helped us pinpoint edge cases, build eval datasets, and iterate on our traces much faster than before.— Kunal Rai, Software Engineer, AI at Unify
At Cogent, our background agents can produce a huge volume of traces all at once. We need live observability into those systems, and SmithDB has been able to deliver that experience: seeing traces in seconds instead of minutes, which is what we experienced when testing other providers.— Larsen Weigle, Member of Technical Staff at Cogent Security
Key engineering challenges
There was an insane amount of engineering effort that went into making SmithDB an extremely performant database for agent observability workloads.
At a high level, SmithDB is built as an object-storage backed log-structured merge tree (LSM). An LSM buffers writes in memory, flushes them to durable storage as immutable sorted batches, and periodically compacts those segments together. At query time, multiple segments are read and merged together as a single ordered stream.
SmithDB has five main components:
- Ingestion service: accepts trace writes, batches them per partition and time bucket, and writes immutable files
- Metastore: records segment metadata, including location, time bounds, row counts, and update/delete vectors
- Query service: exposes a query interface, with custom execution plans that understand LangSmith run semantics and object storage. SSD and memory caching are leveraged heavily.
- Compaction service: rewrites write-optimized segments into query-optimized segments while applying deletes, upgrades, TTL expiry and index merging
- Cluster manager: assigns live service nodes to key ranges. This matters because SmithDB is not only trying to distribute load; it is also trying to make repeated queries land on nodes that are likely to have the right data cached.
Here are details on some of the key engineering challenges, which we’ll expand on in future blog posts:
Progressive querying over object storage
Many LangSmith queries ask for the newest runs for a particular tenant and tracing project. A naive object-store plan would discover all candidate files, open many of them, sort-merge and deduplicate the data, and only then apply the limit.
SmithDB walks backward through time and builds a bounded time window over the newest candidate segments. This turns "sort everything, then limit" into "read the newest bounded slice, stream, merge and dedupe rows, and stop as soon as correctness allows” which significantly cuts down on the data scanned to fulfill “Top K” style queries.
%201.png)
Reading fresh data from ingestion nodes
Object storage is the durable source of truth, but the freshest data often still exists on the ingestion node that wrote it.
Each file segment records the server identifier of the node that produced it. If that writer is still online, the query planner can use a custom plan to scan those files directly from the ingestion node’s local SSD and memory cache instead of immediately reading them back from object storage. This prevents us from having to read dozens of small files from object storage to fulfill leading-edge queries.
%201.png)
Multiple events per run
Agent observability is built around long-running spans.
In a traditional request/response application, a span may start and finish within milliseconds. But agent spans can stay open much longer. A single run may involve model completion, tool calls, retries, background work, or handoffs to other agents. Waiting until the span finishes before writing anything would be less than ideal.
In SmithDB, a run is a sequence of events, not a single immutable row. This sounds simple, but it affects the entire query engine. Extra care is taken to fanout filters to target specific events and merge events at query time in an efficient manner. Handling these multiple events per run also affects our compaction strategy.

Time-tiered compaction
Ingestion optimizes for write latency, which produces many small immutable segments. Querying those forever would create too much file-open overhead and deduplication work.
Compaction turns those write-optimized segments into query-optimized segments. SmithDB uses a time-tiered strategy. Time-tiering decides how aggressively SmithDB should do this work. Recent data is more likely to receive end events, so compacting it into huge files too early would create unnecessary write amplification. Older data is more stable and more likely to be scanned repeatedly, so it is worth collapsing into larger files.
This keeps ingestion fast while gradually making older data cheaper to query.
Deletes, TTL, and Retention changes
Mutations like deletes and upgrades are often difficult in observability systems because the data files are immutable. By default, SmithDB does not rewrite a data file synchronously for every delete. Instead, the metastore attaches deletion and upgrade vectors to segment entries. Query and compaction paths use those vectors to interpret the immutable file correctly. File rewrites occur during compaction.
This strategy makes mutations highly scalable in SmithDB. This matters especially for agent observability because retention is rarely uniform. Most traces are useful for recent debugging, monitoring, and evaluation, but only a small subset need to be retained for a long time based on the content of the particular trace.
Late materialization of large fields
Agent traces often contain large, unbounded payloads. SmithDB keeps common list and filter queries fast by separating core run fields from large fields. Core rows carry pointers to large-field files, and the query engine only fetches those large payloads when the query actually projects them.
This means loading a run list or applying filters does not require reading megabytes of JSON unless the user actually opens the run or asks for those fields.
Full-Text Search and JSON Filtering
Supporting sub-second full-text search and JSON key-path filtering on 1MB + payloads is a challenging engineering problem.
SmithDB handles these queries efficiently through a custom inverted index layout optimized for object storage. On local disk, an index can rely on cheap seeks and many small reads. On object storage, that pattern falls apart: every unnecessary request adds latency, and fetching large postings or positions lists too early can dominate the query.
SmithDB’s index layout is built to avoid that. Terms are sorted into row groups, and every row group records min/max term zones. Exact and prefix term queries can therefore prune index row groups before SmithDB fetches postings bytes. The postings and positions are chunked separately from the term dictionary, so common terms do not force one huge in-memory allocation or one huge object-store range read. Row-group and chunk thresholds bound both builder memory and query-time I/O.
Cluster management and sticky routing
SmithDB includes a lightweight cluster manager that controls which service nodes own which traffic. This matters because SmithDB is not only trying to distribute load. It is also trying to make repeated queries land on nodes that are likely to have the right data cached.
The cluster manager, inspired by Google’s Slicer and Databrick’s Dicer project, avoids that by dividing the keyspace into slices and assigning each slice to a stable set of service nodes. Routers use those assignments to send related requests to the same node or small replica set.
That gives SmithDB two important properties:
- Sticky routing: related requests have a higher chance of landing on a node that already has the right cached metadata or segment bytes.
- Adaptive balancing: when nodes join, leave, or become overloaded, the cluster manager can move slices without changing durable segment metadata.
What’s next
In addition to migrating more of the LangSmith UI to be backed by SmithDB, we’re super excited about the new product experiences this data layer unlocks.
The next phase of LangSmith is not just faster trace loading. It is making trace data more useful: easier to search, easier to analyze, and easier to feed back into the agent development loop. SmithDB will serve as the foundational layer to make that possible.
We’re also looking for talented systems and database engineers to join us!
Related content

LangSmith
Introducing LangSmith Engine

Ben Tannyhill
May 13, 2026
5
min

LangSmith
Introducing LangSmith Context Hub

Harrison Chase
May 13, 2026
8
min

LangSmith
LangSmith Sandboxes are Generally Available

Mukhil Loganathan
May 13, 2026
6
min
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日報で今日の重要ニュースをまとめ読み