langsmith-trace

Instrument applications and query LangSmith traces to debug LLM workflows.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/dotlab-hq/torque --skill langsmith-trace-dotlab-hq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langsmith-trace
Source: https://github.com/dotlab-hq/torque/tree/main/.agents/skills/langsmith-trace
Command: npx skills add https://github.com/dotlab-hq/torque --skill langsmith-trace-dotlab-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a clear workflow to add tracing to LLM and agent applications and to query, analyze, and export full execution traces for debugging, performance analysis, and dataset generation.

Core Features & Use Cases

  • Automatic tracing for LangChain/LangGraph with environment switches to enable full trace capture across nested calls.
  • Instrumentation for other frameworks via OpenTelemetry integration or language wrappers that trace individual LLM calls and nested functions.
  • CLI-first querying and export using langsmith trace list, langsmith trace get, and langsmith trace export with rich filters for time, latency, errors, and metadata.
  • Export to JSONL for downstream dataset creation, cost/token analysis, and offline inspection.
  • Use Cases: Debug slow or failing agent runs, extract trajectories for dataset labeling, and audit LLM calls across environments.

Quick Start

Set LANGSMITH_API_KEY and optionally LANGSMITH_PROJECT, enable tracing or wrap your client, then use the langsmith trace list or langsmith trace get commands to inspect and export traces.

Frequently Asked Questions about langsmith-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export LangSmith traces to JSONL for debugging?

You can export LangSmith traces to JSONL by using the langsmith trace export CLI command, which captures full execution trees for offline inspection, cost analysis, and dataset creation. Requires LANGSMITH_API_KEY authentication.

Can I trace custom OpenTelemetry-instrumented frameworks with LangSmith?

Yes, LangSmith supports tracing custom OpenTelemetry-instrumented frameworks alongside LangChain applications by using language wrappers to trace individual LLM calls and nested functions.

How do I query LangSmith traces using the CLI to find slow agent runs?

Use the langsmith trace list and langsmith trace get CLI commands with rich filters for time, latency, errors, and metadata to query and inspect slow or failing agent execution runs.

What environment variables do I need to set up LangSmith tracing?

LangSmith tracing requires the LANGSMITH_API_KEY for authentication, and optionally supports LANGSMITH_PROJECT or LANGSMITH_WORKSPACE_ID configuration to target specific trace environments.

Why are my LangChain nested calls not showing up in LangSmith traces?

Nested calls may not appear if tracing environment switches are not enabled. Ensure LangChain or LangGraph automatic tracing is activated to capture full execution trees across nested function calls.