langsmith-fetch

Fetches and analyzes LangSmith execution traces to debug LangChain and LangGraph agents.

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/johsquaree/claude-basic-docs --skill langsmith-fetch-johsquaree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langsmith-fetch
Source: https://github.com/johsquaree/claude-basic-docs/tree/main/.claude/skills/langsmith-fetch
Command: npx skills add https://github.com/johsquaree/claude-basic-docs --skill langsmith-fetch-johsquaree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires langsmith-fetch.

What problem does it solve? Debugging LangChain and LangGraph agents requires digging through LangSmith Studio manually to find traces, errors, and tool call details. This Skill brings that debugging workflow into the terminal, letting you fetch recent traces, inspect failures, and analyze agent behavior without leaving your development environment. ## Core Features & Use Cases - Trace Fetching & Analysis: Pull recent execution traces filtered by time window, then report errors, tool calls, execution times, and token usage. - Deep Dive Investigation: Inspect a specific trace by ID to reconstruct the execution flow, pinpoint the failing tool call, and get root cause analysis with suggested fixes. - Error Detection & Session Export: Scan recent traces for error patterns and export full debug sessions (traces plus threads) into organized folders for sharing or archiving. - Use Case: Your agent suddenly stops responding. Ask to check recent activity, discover a Neo4j connection timeout in the trace, and get a recommendation to add retry logic. ## Quick Start Ask the assistant to show what happened in your agent's recent runs by saying "debug my agent and show me the last few traces".

Frequently Asked Questions about langsmith-fetch

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

FAQPage Schema
How do I debug a LangChain agent using LangSmith traces?

Run langsmith-fetch traces with a time filter like --last-n-minutes 5 to pull recent executions, then review errors, tool calls, and durations. For a specific failure, fetch the individual trace by ID in JSON format to see the full execution flow and root cause.

How do I find errors in recent LangSmith traces?

Fetch recent traces in JSON or raw format and search the output for error, failed, or exception keywords. The skill groups failures by type, agent, and tool so you can identify recurring patterns like connection timeouts or rate limits.

What environment variables does langsmith-fetch need?

It requires LANGSMITH_API_KEY for authentication and LANGSMITH_PROJECT to target the correct project. Set both with export commands in your shell, and verify them with echo before running trace commands.

Why does langsmith-fetch return no traces found?

This happens when there is no agent activity in the timeframe, tracing is disabled, or the project name is wrong. Try a longer time window, confirm LANGCHAIN_TRACING_V2 is enabled in your agent code, and verify your project configuration.

Can I export LangSmith traces to share with my team?

Yes, you can export traces and conversation threads into a timestamped session folder with metadata included. The exported files can be reviewed individually, shared with teammates, or archived for later analysis.