Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

langsmith-trace

Skill by langchain-ai

Adds LangSmith tracing to AI applications and queries trace data. It uses the langsmith CLI to list, inspect and export traces, for developers debugging LLM apps.

  • Score 80
  • 800 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install langsmith-trace

Built from the published package, never by AI.

git clone --depth 1 https://github.com/langchain-ai/design-agent /tmp/design-agent && mkdir -p ~/.claude/skills && cp -r /tmp/design-agent/skills/langsmith-trace ~/.claude/skills/langsmith-trace

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install langsmith-trace in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The langsmith-trace skill helps an AI assistant add LangSmith tracing to an application and query trace data. For LangChain and LangGraph apps, tracing is turned on with environment variables. For other apps, it shows how to use the traceable decorator or wrapper and wrap the OpenAI client in Python or JavaScript. It uses the langsmith CLI for querying.

For querying, the skill covers listing, getting and exporting traces, and listing individual runs. Filters include time, errors, latency, tokens, tags and raw feedback queries. Traces are exported as JSONL files. The skill is aimed at developers who debug and analyze LLM applications with LangSmith and need a LANGSMITH_API_KEY for authentication.

Written from the project's SKILL.md and checked against it.

What it can do

  • Add tracing to LangChain appsTurns on automatic tracing for LangChain and LangGraph apps using environment variables.
  • Trace other applicationsUses the traceable decorator and wrap_openai or wrapOpenAI to trace non-LangChain code.
  • trace listLists traces, with options for metadata and an inline hierarchy view.
  • trace getGets a single trace with its full hierarchy.
  • trace exportExports traces to JSONL files, one file per trace.
  • run listLists individual runs as a flat list, filterable by run type.
  • Performance and error filtersFilters traces by minimum latency, errors, tokens and tags.
  • Raw filter queriesUses a raw LangSmith filter query for feedback and metadata filters.
  • Dataset and experiment commandsCovers dataset, example, evaluator, experiment, thread and project command groups.

What you need

  • LANGSMITH_API_KEY
  • langsmith CLI
  • Python or JavaScript application

Try asking

  • List the last 10 failed traces in my LangSmith project.
  • Export the last 20 traces with full inputs and outputs to JSONL.
  • Add LangSmith tracing to my LangChain app using environment variables.

Good to know

  • Authentication with an API key is required.
  • Trace filters apply to the root run only, while run filters apply to any matching run.
  • The --run-type option is not available for trace commands.

Security check

C
  • Downloads a script from the internet and runs itIn skills/langsmith-trace/SKILL.md: curl -sSL https://raw.githubusercontent.com/langchain-ai/langsmith-cli/main/scripts/install.sh | sh

Checked automatically: skills/langsmith-trace/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to langsmith-trace

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

langsmith-trace: common questions

How do I add LangSmith tracing to a LangChain app?

For LangChain and LangGraph apps, tracing is automatic. Set LANGSMITH_TRACING, LANGSMITH_API_KEY and your LLM provider key as environment variables.

What is the difference between a trace and a run?

A trace is a complete execution tree with the root run and all child runs. A run is a single node in that tree, such as one LLM call or tool call.

What format do exported traces use?

Exports are JSONL files with one run per line. Use --include-io or --full to include inputs and outputs, which dataset generation requires.

How do I install langsmith-trace?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is langsmith-trace free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is langsmith-trace safe to use?

It scores 80 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to langsmith-trace?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

langsmith-trace Install

Add to stack

Loading.