LangChain Adds a Readable View of AI Agent Sessions to LangSmith

Trajectories puts conversations, tool calls and subagent activity in order. Reviewers can score or annotate the result, then open a full trace when a step needs investigation.

By 3 min read
LangChain Adds a Readable View of AI Agent Sessions to LangSmith
LangChain Adds a Readable View of AI Agent Sessions to LangSmith

Listen to this story

The audio brief

About 1:27
0:001:27
Read transcript
LangChain has added Trajectories to LangSmith, giving reviewers a readable, chronological view of an AI agent session. It gathers messages from the main agent and subagents, plus tool activity, and shows each item once, in the order it first appeared. That makes a long interaction easier to follow without hiding the detailed execution record. When a step looks suspicious, a reviewer can open its linked trace. That trace preserves nested runs, plus inputs, outputs, timing and retries—the evidence needed to investigate what happened. LangChain’s example is a support agent that reaches a wrong answer after nine turns and sixty messages. The reviewer finds that it reused an old tool result instead of fetching current data. This is an illustrative debugging scenario, not a measured time saving. Teams can also use online evaluators to score production sessions, route low-scoring ones for human review, then save useful examples to datasets or export them for supervised fine-tuning. Those examples include prompts, user messages, responses and tool exchanges, so they capture more than just the final answer. Trajectories works with LangGraph, Deep Agents, OpenAI and Claude agent SDKs, and coding tools including Codex, Claude Code and Cursor. It is available now on all LangSmith plans in the United States. The key constraint is that the readable session helps locate a failure; understanding a difficult step may still require opening its full trace.

Story brief

3 key points

LangSmith now turns multi-turn agent threads into “Trajectories,” a flattened, chronological view intended to make behavior review accessible without discarding forensic detail: reviewers can jump from a message or action to its underlying trace, which retains nested runs, inputs and outputs, timing, and retries. Teams can score production sessions with online evaluators, route weak sessions for human review, and...

  1. 01

    LangChain’s example follows a support failure across nine turns and 60 messages; it is an illustrative debugging scenario, not a time-savings benchmark.

  2. 02

    Trajectories shows messages from main agents and subagents once, in first-appearance order; nested execution details remain available in linked traces.

  3. 03

    Online evaluators can score production trajectories; low-scoring sessions can be routed for review, then saved to datasets or exported for supervised fine-tuning.

An AI agent can give the wrong answer after many turns, tool calls and handoffs. Finding the misstep means following what it did without getting lost in every execution detail. LangChain has launched Trajectories in LangSmith to show that path as a chronological session record. The detailed trace is still there when a reviewer needs to investigate a particular step.

Read the path, then inspect the step

LangSmith records a unit of agent work as a run. Runs from one operation form a trace, and traces from a multi-turn session are linked into a thread. That structure preserves an execution tree, including nested work, timing, retries, inputs and outputs. It is useful for a close investigation, but a reader trying to follow the agent's decisions must navigate all that detail.

A trajectory gives that thread a different shape. It gathers messages and actions from the main agent and its subagents, removes the nested run structure, and shows each message once in the order it first appeared. A reviewer can follow the conversation and tool activity, then open the underlying trace to check how a suspicious step executed. The readable view drops the nested run structure; the underlying trace remains available for a closer look.

LangSmith Trajectories thread view showing an agent session in sequence.
The thread view presents the session as an ordered path rather than a nested execution tree. Image: LangChain. Source: langchain.com.

A starting point for a wrong answer

LangChain illustrates the debugging job with a support agent that gives a customer a wrong answer after nine turns and 60 messages. In the company's example, a reviewer spots where the agent reused an old tool result instead of fetching current data. The reviewer can then open that part of the trace to see the exact tool input and output, timing and retries. It is an illustration of the workflow, not a measured claim about time saved.

That split between reading and investigating also changes who can take part. A support lead or subject-matter expert may know whether an agent followed policy without needing to interpret nested runs. Teams can send trajectories to annotation queues so those reviewers can score behavior, flag problems and give feedback. Engineers still have the detailed record for questions the session view cannot settle.

LangChain's introduction to Trajectories shows the session view designed for reviewing agent behavior. Video via langchain.com.

From one session to a review queue

Trajectories can also be scored by LangSmith's online evaluators across production sessions. LangChain says run-level scoring of long conversations can repeatedly include earlier context as each turn accumulates. Keeping each message once gives an evaluator a less repetitive account of the agent's path. Teams can filter low-scoring sessions for closer review rather than rely on a single final answer to find a problem.

A useful reviewed session can go further: teams can save it to a dataset or export it for supervised fine-tuning, which trains a model on examples of desired behavior. Trajectories contain prompts, user messages, responses, tool calls and tool outputs. That means an example can capture how the agent reached an answer, not only the answer itself. Selecting which sessions represent good behavior remains a judgment for the team doing the review.

Where it works

The view works with traces sent from LangChain, LangGraph and Deep Agents, as well as agent SDKs including OpenAI and Claude and coding agents including Codex, Claude Code and Cursor. LangChain says Trajectories is available now on all LangSmith plans in the US. For teams already recording agent work there, the immediate change is a simpler place to begin a review—not a replacement for the execution record when the cause of a failure matters.

Sources

  1. langchain.comTrajectories now in LangSmith: A readable view of every agent session

Loading discussion...

YOUR READING SPACE

Notifications