langsmith-trace

Installation
Summary

Add tracing to LangChain/LangGraph apps and query trace data via CLI for debugging and dataset generation.

  • Automatic tracing for LangChain/LangGraph apps with environment variables; manual tracing via @traceable decorator and wrap_openai() for other frameworks in Python and TypeScript
  • Query traces (complete execution trees) or runs (individual nodes) using langsmith CLI with filters for time, latency, errors, tags, and custom metadata
  • Export traces to JSONL files preserving hierarchy; supports bulk export for dataset creation and performance analysis
  • Manage datasets, examples, evaluators, experiments, and conversation threads through dedicated CLI command groups
SKILL.md
LANGSMITH_API_KEY=lsv2_pt_your_api_key_here          # REQUIRED
LANGSMITH_PROJECT=your-project-name                   # Optional: default project
LANGSMITH_WORKSPACE_ID=your-workspace-id              # Optional: for org-scoped keys

Authentication is REQUIRED: either set the LANGSMITH_API_KEY environment variable, or pass the --api-key flag to CLI commands (preferred):

langsmith trace list --project my-project --api-key $LANGSMITH_API_KEY

IMPORTANT: Always check the environment variables or .env file for LANGSMITH_PROJECT before querying or interacting with LangSmith. This tells you which project contains the relevant traces and data. If the LangSmith project is not available, use your best judgement to identify the right one.

Related skills
Installs
1.8K
GitHub Stars
115
First Seen
Mar 4, 2026