Search agent traces by behavior with AI Search in LangSmith
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.
Related posts
- Trace and evaluate Cursor agents with Langfuse, powered by ClickHouse
ClickHouse mediumAdept
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. Setup is a Marketplace install plus a `~/.cursor/langfuse.json` key file. File-content capture is off by default, and because Cursor reports tokens once per turn, cost should be read from the trace total. A worked loop shows finding expensive turns caused by repeated file reads and retried shell commands, fixing them with a project rule, and validating the fix with dataset-based evaluations, which can also gate CI via a GitHub Action.
- Five things you can do with Sentry’s Agent Tracing
Sentry mediumAdeptSentry'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. One recipe exports production conversations with `sentry agent-conversation list` (CLI 0.44+), maps them to eval records, upserts them into Braintrust, Langfuse, promptfoo or Arize Phoenix, and scores them with deterministic checks plus an LLM judge reserved for subjective quality. Practical traps it calls out: summing tokens from raw `gen_ai.invoke_agent` spans double-counts, the CLI defaults to only 25 conversations over 7 days, and recorded prompts may contain PII. A second recipe runs a daily Claude scheduled task that uses the Sentry MCP server to triage agent failures and file Linear tickets.
- Tracing OpenAI agents with ClickStack
ClickHouse mediumAdept
OpenAI's agents SDK has built-in tracing that can be redirected from OpenAI's hosted product to a custom TracingExporter. Spans can then be written into ClickHouse and explored in HyperDX as part of ClickStack. The worked example uses a gpt-5-mini agent that queries the ClickHouse SQL Playground through the ClickHouse MCP Server. The exporter is attached via a BatchTraceProcessor, adds the missing model name to response spans, and inserts rows into a JSON-typed ClickHouse table. The traces show tool calls, failed SQL attempts and LLM responses, which helps when comparing how different models handle ambiguous instructions.
- Trace & Evaluate your Agent with Arize Phoenix
Hugging Face mediumAdeptA 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. Evaluation works by querying the search tool's spans with SpanQuery and scoring query/result relevance with GPT-4o as an LLM judge via llm_classify and the RAG relevancy template. The scores are then logged back to Phoenix as span evaluations. Swapping in other prebuilt templates covers checks such as hallucination, toxicity, SQL generation and function calling.
- Debugging our AI search assistant with agent tracing
Sentry mediumAdeptSentry'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. One bug made queries on custom numeric attributes return nothing. Tracing the conversation's system prompt, LLM generations and tool calls through to the backend API trace showed the prompt listed fields by bare name (e.g. bug__predictions_count) instead of the required tags[name, number] form. The team turned that finding into a new eval, fixed the bug, confirmed the fix in production traces, and now sends local eval runs to Sentry too.