langsmith-fetch

Fetch LangSmith Studio execution traces to debug agent runs.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/shapris/svarus-darbas --skill langsmith-fetch-shapris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langsmith-fetch
Source: https://github.com/shapris/svarus-darbas/tree/main/.kilocode/skills/langsmith-fetch
Command: npx skills add https://github.com/shapris/svarus-darbas --skill langsmith-fetch-shapris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Quickly surface and interpret execution traces from LangSmith Studio to diagnose agent failures, tool misrouting, memory issues, and performance bottlenecks so teams can resolve agent behavior without manual log spelunking.

Core Features & Use Cases

  • Trace Retrieval: Pull recent or specific execution traces from LangSmith for immediate inspection.
  • Error & Tool Call Analysis: Identify failed steps, error messages, and the sequence of tool invocations to pinpoint root causes.
  • Exportable Debug Sessions: Save trace and thread exports for sharing with teammates or for offline analysis.
  • Use Case: Investigate why an agent selected the wrong tool, determine whether memory recalls occurred, or measure token usage and latency across traces.

Quick Start

Run the langsmith-fetch traces command to fetch the last five minutes of traces in pretty format for quick inspection.

Frequently Asked Questions about langsmith-fetch

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

FAQPage Schema
How do I fetch LangSmith execution traces to debug LangChain agents?

Fetch LangSmith execution traces by running the langsmith-fetch CLI command to pull recent agent runs for immediate inspection. You can retrieve the last five minutes of traces in pretty format to quickly review agent behavior and diagnose failures.

What is the best way to investigate LangGraph tool misrouting and memory issues?

Investigating LangGraph tool misrouting and memory issues requires analyzing execution traces to identify failed steps, error messages, and tool invocation sequences. Fetching these traces surfaces the root causes of incorrect tool selection or missing memory recalls.

Do I need an API key to pull LangSmith traces for offline analysis?

Pulling LangSmith traces for offline analysis requires valid LANGSMITH_API_KEY and LANGSMITH_PROJECT environment variables configured. You also need the langsmith-fetch CLI installed to authenticate and retrieve the execution data successfully.

Can I export LangSmith debug sessions in JSON format for sharing?

Exporting LangSmith debug sessions in JSON format is fully supported alongside pretty and raw output options. Saving these trace and thread exports allows you to share detailed agent execution data with teammates for collaborative debugging.

How do I measure token usage and latency across LangChain agent runs?

Measure token usage and latency across LangChain agent runs by fetching execution traces to review performance metrics. Analyzing these traces helps identify bottlenecks and investigate agent performance issues in both development and production workflows.

Why does fetching traces fail without environment variables configured?

Fetching traces fails because the CLI requires valid LANGSMITH_API_KEY and LANGSMITH_PROJECT environment variables to authenticate requests. Without these variables properly configured, the tool cannot access your LangSmith Studio project data.