Labsco
langchain-ai logo

langsmith-fetch

โ˜… 2

by langchain-ai ยท part of langchain-ai/lca-skills

Fetches LangSmith traces for debugging agent behavior. Use when troubleshooting agent issues, reviewing conversation history, or investigating tool calls.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys
๐Ÿงฉ One of 2 skills in the langchain-ai/lca-skills package โ€” works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

by langchain-ai

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 Download ZIPGitHub2

Fetching LangSmith Traces

Requires langsmith-fetch in project dependencies and LANGSMITH_API_KEY in a .env file.

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 langsmith-fetch traces ./traces --limit 10
uv run --env-file langsmith-fetch traces ./traces --project-uuid --limit 10

# Fetch single trace by ID
uv run --env-file langsmith-fetch trace 

# Include metadata (timing, tokens, costs)
uv run --env-file langsmith-fetch trace --include-metadata

Output Formats

  • --format pretty - Human-readable (default)

  • --format json - Pretty-printed JSON

  • --format raw - Compact JSON for piping