---
title: "Search agent traces by behavior with AI Search in LangSmith"
description: "LangSmith's AI Search lets users find agent traces by behavior described in plain language (e.g. \"did PII leak?\", \"did the user get frustrated?\") by running a fast decision model over each candidate trace rather than relying on lossy embedding-based vector search."
url: "https://swe.quest/articles/search-agent-traces-by-behavior-with-ai-search-in-langsmith-b56f880ffba2ede5"
canonical: "https://www.langchain.com/blog/agent-traces-ai-search-langsmith"
source: "LangChain"
published: "2026-10-13"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 7
tags: ["observability","ai-agents","llms","search"]
---

# Search agent traces by behavior with AI Search in LangSmith

A post on [LangChain](https://swe.quest/sources/langchain.md), published 2026-10-13, 7 min read, Announcement. Original: [https://www.langchain.com/blog/agent-traces-ai-search-langsmith](https://www.langchain.com/blog/agent-traces-ai-search-langsmith)

## Summary

LangSmith's AI Search lets users find agent traces by behavior described in plain language (e.g. "did PII leak?", "did the user get frustrated?") by running a fast decision model over each candidate trace rather than relying on lossy embedding-based vector search. SmithDB normalizes traces from different SDKs into deduplicated per-session trajectories, which are then packed into an 8K-token budget that prioritizes user messages and agent replies over tool output. In a sample of Open SWE conversations, the median had 72K tokens but only about 2K came from user and agent messages, while roughly 85% was tool output. Structured filters narrow candidates first, then batches are classified in parallel with prefetching and results streamed back as they match.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)

## Prerequisites

- LLM agent traces ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- embeddings and vector search ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

LangSmith, AI Search, SmithDB, Open SWE, OpenTelemetry, LangGraph

## Related posts

- [Trace and evaluate Cursor agents with Langfuse, powered by ClickHouse](https://swe.quest/articles/trace-and-evaluate-cursor-agents-with-langfuse-powered-by-clickhouse-b04d90713d1833e1.md): ClickHouse · 2026-10-22 · Medium · 5 min read · AI for coding, Observability, Evaluation, AI agents
  The Langfuse Observability plugin for Cursor captures each agent prompt as a \`Cursor Turn\` trace containing LLM observations, tool executions, subagents and token usage, stored in a wide ClickHouse observations table that avoids trace/observation joins for cost and latency aggregation.
- [Five things you can do with Sentry’s Agent Tracing](https://swe.quest/articles/five-things-you-can-do-with-sentry-s-agent-tracing-5ac2ff6886459921.md): Sentry · 2026-10-28 · Medium · 19 min read · AI agents, Observability, Evaluation, LLMs
  Sentry's Agent Tracing captures model calls, tool executions and multi-agent handoffs in a single trace, and Sentry Cookbook recipes build workflows on top of that data.
- [Tracing OpenAI agents with ClickStack](https://swe.quest/articles/tracing-openai-agents-with-clickstack-27a1630cee998ca8.md): ClickHouse · 2025-10-27 · Medium · 13 min read · Observability, AI agents, Python, Analytics & OLAP
  OpenAI's agents SDK has built-in tracing that can be redirected from OpenAI's hosted product to a custom TracingExporter.
- [Trace & Evaluate your Agent with Arize Phoenix](https://swe.quest/articles/trace-evaluate-your-agent-with-arize-phoenix-ea5d226abd11d54e.md): Hugging Face · 2025-02-28 · Medium · 6 min read · AI agents, Evaluation, Observability, LLMs, Python
  A smolagents CodeAgent with DuckDuckGo search and webpage tools can be instrumented with OpenTelemetry and OpenInference so every agent call is traced in a local or hosted Arize Phoenix instance.
- [Debugging our AI search assistant with agent tracing](https://swe.quest/articles/debugging-our-ai-search-assistant-with-agent-tracing-56459c7d4f094d19.md): Sentry · 2026-09-11 · Medium · 4 min read · AI agents, Observability, Debugging, Evaluation, LLMs
  Sentry's Search Query Assistant converts natural-language prompts into Sentry Search Syntax, and its team relies on evals plus agent tracing to debug wrong outputs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
