
Langsmith Trace
If you're running LangChain or LangGraph apps and need to debug why an agent took a weird path or build a dataset from real production traces, this gets you set up fast. It covers both sides: adding the @traceable decorator to your code (Python or TypeScript) and then querying that data via the langsmith CLI. The trace vs. run distinction matters here because traces give you the full execution tree while runs are just individual nodes, and you'll want traces first for most debugging work. The CLI filters are solid for finding slow traces, errors, or specific time windows. Good for turning observed behavior into datasets without manually crafting examples.
- skills.sh installs
- 5K
- GitHub stars
- 166
- last updated
- Aug 21, 2026
Install
$ npx -y skills add langchain-ai/langsmith-skills --skill langsmith-trace --agent claude-codeInstalls into .claude/skills of the current project.
Files
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. For agents, set the LANGSMITH_API_KEY environment variable (preferred); every langsmith command reads it automatically. To pass a key for a single command, use --api-key:
langsmith traces 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.
CLI Tool
curl -sSL https://raw.githubusercontent.com/langchain-ai/langsmith-cli/main/scripts/install.sh | sh
Sponsors
Details
- Repository
- github.com/langchain-ai/langsmith-skills
- Categories
- AI & Agent Building, CLI & Terminal