langsmith-fetch

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

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill langsmith-fetch-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langsmith-fetch
Source: https://github.com/surfingalien/FinSurfing/tree/main/Downloads/FinSurfing/.agents/skills/langsmith-fetch
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill langsmith-fetch-surfingalien

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 errors, failed tool calls, and performance bottlenecks. This Skill brings trace fetching and analysis directly into the terminal so failures can be diagnosed without leaving the development workflow. ## Core Features & Use Cases - Recent Trace Inspection: Fetch traces from the last N minutes with pretty, JSON, or raw output formats to quickly see what an agent just did. - Deep Trace Analysis: Investigate a specific trace ID to reconstruct execution flow, identify the exact failing tool call, and get root-cause analysis with suggested fixes. - Error Detection & Session Export: Grep recent traces for errors and failure patterns, or export full debug sessions (traces plus threads) into organized timestamped folders for sharing or archiving. - Use Case: An agent silently fails during a Neo4j query. Run a quick trace fetch, spot the connection timeout in the failing tool call, and get a concrete recommendation such as adding retry logic. ## Quick Start Ask the assistant to show what my agent did in the last 5 minutes and flag any errors using langsmith-fetch.

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 list recent executions, then inspect a specific trace ID in JSON format to see the ordered tool calls, errors, and token usage that explain the failure.

How do I find errors in recent LangSmith traces?

Fetch recent traces in raw or JSON format and grep for terms like error, failed, or exception. This reveals failure counts, error types, which agents and tools failed, and recurring patterns such as timeouts or rate limits.

What do I need to set up before using langsmith-fetch?

Install the CLI with pip install langsmith-fetch, then set the LANGSMITH_API_KEY and LANGSMITH_PROJECT environment variables. Verify both with echo commands before fetching traces.

Why does langsmith-fetch return no traces found?

Common causes are no agent activity in the timeframe, tracing being disabled, a wrong project name, or API key issues. Try a longer time window, verify environment variables, and confirm LANGCHAIN_TRACING_V2=true is set in your agent code.

Can I export LangSmith traces for sharing with my team?

Yes. Create a timestamped session folder and export traces with metadata plus conversation threads using the traces and threads commands. The exported files can be reviewed individually, shared, or archived for later analysis.