langchain-ai/langsmith-fetch
Fetches LangSmith traces for debugging agent behavior. Use when troubleshooting agent issues, reviewing conversation history, or investigating tool calls.
npx skills add https://github.com/langchain-ai/lca-skills --skill langsmith-fetch
Requires langsmith-fetch in project dependencies and LANGSMITH_API_KEY in a .env file.
First, find the .env file containing LANGSMITH_API_KEY:
find . -name ".env" -type f 2>/dev/null | head -5
Use --env-file <path-to-.env> with all commands:
# Fetch recent traces (uses LANGSMITH_PROJECT from .env, or specify --project-uuid)
uv run --env-file <path> langsmith-fetch traces ./traces --limit 10
uv run --env-file <path> langsmith-fetch traces ./traces --project-uuid <uuid> --limit 10
# Fetch single trace by ID
uv run --env-file <path> langsmith-fetch trace <trace-id>
# Include metadata (timing, tokens, costs)
uv run --env-file <path> langsmith-fetch trace <trace-id> --include-metadata
--format pretty - Human-readable (default)--format json - Pretty-printed JSON--format raw - Compact JSON for piping.env: find . -name ".env" -type f 2>/dev/nulluv run --env-file <path> langsmith-fetch traces ./debug --limit 10Take langchain-ai/langsmith-fetch from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.