# langsmith-fetch

Pulls LangSmith traces into local files so you can see which tools an agent called and what came back.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 883 installs · ★ 3
- Author: langchain-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/langchain-ai/lca-skills/tree/HEAD/skills/langsmith-fetch/SKILL.md
- Updated: 2026-02-18
- HTML: https://affpapa.org/en/nevibecode/skills/langsmith-fetch

## What it does

The skill walks your agent through the `langsmith-fetch` CLI. It starts by locating the `.env` file that holds the key, then fetches recent traces or a single one by ID into a folder you pick.

Two things have to be in place: `langsmith-fetch` in your project dependencies and `LANGSMITH_API_KEY` in `.env`. No key, no traces. Every command runs with `--env-file <path-to-.env>`; the project comes from `LANGSMITH_PROJECT` unless you pass `--project-uuid`.

Output comes in three shapes. `--format pretty` is for reading, `--format json` and `--format raw` are for parsing or piping. Add `--include-metadata` and you also get timing, token counts and cost. From there the agent opens the saved files and answers the useful questions: what was called, what it returned, did that match what you expected.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/langsmith-fetch/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/langsmith-fetch/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/langsmith-fetch/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/langsmith-fetch/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install langchain-ai/lca-skills langsmith-fetch
```

2. **Manually: put the files in place**
- File: `.github/skills/langsmith-fetch/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/langchain-ai/lca-skills --path skills/langsmith-fetch
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/langsmith-fetch/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add langchain-ai/lca-skills --skill langsmith-fetch -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/langchain-ai/lca-skills/tree/HEAD/skills/langsmith-fetch/SKILL.md

## When to use it
- dump recent agent traces into a local folder
- inspect one trace by ID when you know which run broke
- check which tools the agent called and what they returned
- compare timing, tokens and cost for a trace
- locate the `.env` holding the LangSmith key in an unfamiliar repo

## Example prompts
- find the .env with LANGSMITH_API_KEY and fetch the last 10 traces into ./traces
- show trace <trace-id> with metadata: timing, tokens, cost
- export the project traces as json and tell me which tools failed

## Similar
- [langsmith-custom-apps](https://affpapa.org/en/nevibecode/skills/langsmith-custom-apps.md) — skill · 398 installs
- [langchain-dependencies](https://affpapa.org/en/nevibecode/skills/langchain-dependencies.md) — skill · 16000 installs
- [sentry-setup-ai-monitoring](https://affpapa.org/en/nevibecode/skills/getsentry-sentry-setup-ai-monitoring.md) — skill · 893 installs
- [analyzing-mlflow-trace](https://affpapa.org/en/nevibecode/skills/analyzing-mlflow-trace.md) — skill · 1000 installs
- [analyzing-mlflow-session](https://affpapa.org/en/nevibecode/skills/analyzing-mlflow-session.md) — skill · 960 installs
- [trace](https://affpapa.org/en/nevibecode/skills/trace.md) — skill · 790 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
