INVOKE THIS SKILL when working with LangSmith tracing OR querying traces. Covers adding tracing to applications and querying/exporting trace data. Uses the langsmith CLI tool.
Detected risks:
The langsmith-trace skill provides guidance for integrating LangSmith tracing into AI applications and querying trace data for debugging, monitoring, and analysis. It focuses on two core workflows: adding tracing instrumentation to applications and interacting with stored traces using the LangSmith CLI. The skill supports both Python and JavaScript environments and is designed to help developers capture execution flows, inspect LLM interactions, and analyze nested operations in AI pipelines. It also explains authentication requirements, environment variable configuration, and project selection for accessing the correct trace data.
The skill includes support for multiple tracing approaches depending on the application framework. For LangChain and LangGraph applications, tracing can be enabled automatically through environment variables. For non-LangChain applications, it documents how to use OpenTelemetry integrations when supported, or alternatively how to apply tracing manually using decorators and wrappers. Python examples use the `@traceable` decorator and `wrap_openai()` wrapper, while TypeScript examples use `traceable()` and `wrapOpenAI()`. The skill also demonstrates nested tracing patterns for multi-step AI pipelines such as retrieval-augmented generation workflows.
This skill is intended for AI engineers, backend developers, and platform teams building or maintaining LLM-powered systems. Common use cases include debugging prompt pipelines, monitoring application behavior, tracing model requests, inspecting retrieval workflows, and exporting trace data for analysis. It is especially useful for teams using LangChain, LangGraph, OpenAI integrations, or custom AI orchestration pipelines that require observability and operational debugging capabilities.
Set the required environment variables including `LANGSMITH_TRACING=true`, `LANGSMITH_API_KEY`, and your LLM provider API key. Tracing is automatic for LangChain and LangGraph applications once these variables are configured.
Yes. For frameworks with OpenTelemetry support, LangSmith's OpenTelemetry integration can be used. For custom applications or frameworks without automatic support, the skill documents how to use tracing decorators and wrappers manually.
Authentication requires a LangSmith API key. You can either set the `LANGSMITH_API_KEY` environment variable or provide the `--api-key` flag directly when running LangSmith CLI commands.
Yes. The documentation includes tracing examples for both Python and TypeScript/JavaScript implementations using the LangSmith tracing utilities and OpenAI wrappers.
You should check the `LANGSMITH_PROJECT` environment variable or `.env` configuration before querying traces to ensure you are interacting with the correct LangSmith project.
Quick Setup:
.claude/skills/Repository
langchain-ai/langsmith-skills