The Messages view renders an agent’s trace as a chat-style conversation: user prompts, model responses, tool calls, and tool results, in order. It works automatically with any of the integrations listed in the table on this page. A couple of integrations (Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
wrap_anthropic alone, and the JavaScript Claude Agent SDK) need a single metadata key set manually, which are listed in the table and in Known limitations.
Supported integrations
| Integration | Tracing SDK | Setup required |
|---|---|---|
| LangChain chat models | langchain-core | None |
| LangGraph | langgraph | None |
langchain.create_agent | langchain | None (see caveat in Known limitations) |
| Deep Agents | deepagents | None |
| OpenAI Chat Completions | wrap_openai | None |
| OpenAI Responses | wrap_openai (responses API) | None |
| OpenAI Agents SDK | Python tracing processor | None |
| Vercel AI SDK | wrapAISDK | None |
Anthropic Messages (wrap_anthropic) | wrap_anthropic | Set ls_message_format: "anthropic" |
| Claude Agent SDK (Python) | claude-agent-sdk | None |
| Claude Agent SDK (JS) | claude-agent-sdk-js | Set ls_message_format: "anthropic" |
| Claude Code | claude-code | None |
Known limitations
A few integrations need a metadata override to be picked up:wrap_anthropicalone: the wrapper does not setls_message_format, so detection doesn’t match today. Setmetadata={"ls_message_format": "anthropic"}on the call (or viaRunnableConfig) for the run to be claimed.- Claude Agent SDK (JS): auto-detection currently allowlists only
"claude-agent-sdk"and"claude-code", not the JS-emitted"claude-agent-sdk-js". Setls_message_format: "anthropic"explicitly on JS traces. langchain.create_agent: not in the explicit detection allowlist. It’s claimed today vials_provider/ls_message_formatfallthroughs in the matching OpenAI/Anthropic detection, or viagraph_id/langgraph_nodewhen the agent runs inside LangGraph. If routing is unreliable, setmetadata.ls_message_format: "langchain"explicitly.
Exclude runs from the Messages view
Settingls_message_view_exclude on a run’s metadata tells the Messages view to skip that run. The key’s presence is what matters; True is the conventional value. The filter runs before any extraction strategy sees the trace, so an excluded LLM or tool run never affects detection, message extraction, or tool-call pairing.
Use it for LLM subspans that aren’t conversational turns, such as classification calls, embedding lookups, safety filters, or routing/guardrail decisions, that you still want visible elsewhere in LangSmith but don’t want cluttering the conversation transcript.
Python
1. On a@traceable decorator: exclude a whole function’s run.
trace context manager: exclude an ad-hoc span.
wrap_openai / wrap_anthropic: pass langsmith_extra through to the wrapped client call.
RunnableConfig: exclude a single invocation of a chain or chat model.
TypeScript
1. On atraceable wrapper: exclude a whole function’s run.
wrapOpenAI: pass langsmithExtra on the call.
lsConfig.metadata on wrapAISDK. The middleware merges this onto every emitted LLM run.
wrapAISDK normally and instead mutate getCurrentRunTree() from inside a parent traceable that calls into the AI SDK, or use a child RunTree with createChild({ extra: { metadata: { ls_message_view_exclude: true } } }).
5. Manual RunTree.createChild: when you’re building runs by hand.
Notes
- The filter checks for the presence of the key, not truthiness.
ls_message_view_exclude: falsestill excludes the run. Omit the key entirely to include the run. - Exclusion applies to that run only: child runs are not implicitly excluded. To drop a whole subtree, set the key on each run.
- Excluded runs still appear in the regular trace view, runs explorer, and metrics. Only the Messages view filters them out.
Manual instrumentation
If you trace without one of the wrappers in Supported integrations—for example, emitting runs throughRunTree, the REST API, or a custom wrapper around a provider SDK—set ls_message_format on each LLM run’s metadata to route the trace to the correct extractor:
| Trace shape | Set on metadata |
|---|---|
| LangChain messages (constructor envelope) | ls_message_format: "langchain" |
| OpenAI Chat Completions | ls_message_format: "completions" |
| OpenAI Responses API | ls_message_format: "responses" |
| Anthropic Messages API | ls_message_format: "anthropic" |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

