langsmith-fetch
Fetches LangSmith traces for debugging agent behavior. Use when troubleshooting agent issues, reviewing conversation history, or investigating tool calls.
How do I install this agent skill?
npx skills add https://github.com/langchain-ai/lca-skills --skill langsmith-fetchIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill facilitates debugging by fetching LangSmith traces. It includes commands to locate `.env` files to find API keys and retrieves trace data from LangSmith. While these functions are necessary for the skill's purpose, users should be aware that searching for environment files is a sensitive action and that trace data could potentially contain untrusted content.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerfail
1/1 file flagged
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
Fetching LangSmith Traces
Requires langsmith-fetch in project dependencies and LANGSMITH_API_KEY in a .env file.
Setup
First, find the .env file containing LANGSMITH_API_KEY:
find . -name ".env" -type f 2>/dev/null | head -5
Commands
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
Output Formats
--format pretty- Human-readable (default)--format json- Pretty-printed JSON--format raw- Compact JSON for piping
Troubleshooting Workflow
- Find
.env:find . -name ".env" -type f 2>/dev/null - Fetch recent traces:
uv run --env-file <path> langsmith-fetch traces ./debug --limit 10 - Find relevant trace in saved JSON files
- Check: What tools were called? What did they return? Was it correct/expected?
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/langchain-ai/lca-skills/langsmith-fetch">View langsmith-fetch on skillZs</a>