langsmith-fetch

作者: langchain-ai

获取LangSmith追踪记录以调试代理行为。在排查代理问题、查看对话历史或调查工具调用时使用。

npx skills add https://github.com/langchain-ai/lca-skills --skill langsmith-fetch

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

  1. Find .env: find . -name ".env" -type f 2>/dev/null
  2. Fetch recent traces: uv run --env-file <path> langsmith-fetch traces ./debug --limit 10
  3. Find relevant trace in saved JSON files
  4. Check: What tools were called? What did they return? Was it correct/expected?

来自 langchain-ai 的更多技能

arxiv-search
langchain-ai
通过主题搜索arXiv上的预印本和学术论文,并获取摘要。基于查询的搜索涵盖物理学、数学、计算机科学、生物学、统计学及相关领域。可配置结果数量限制(默认10篇论文),结果按相关性排序。返回每篇匹配论文的标题和摘要。需要安装arxiv Python包;若未安装,请通过pip安装。
official
blog-post
langchain-ai
长篇幅博客文章撰写,包含研究委托、结构化内容模板和AI生成的封面图片。在写作前将研究任务委托给子代理,并将发现结果以Markdown格式存储以供参考和上下文参考。强制采用五部分文章结构:钩子、背景、主要内容(3-5个部分)、实际应用和带行动号召的结论。通过涵盖主题、风格、构图、色彩和光线的详细提示生成SEO优化的封面图片。将文章输出至...
official
code-review
langchain-ai
对变更进行结构化代码审查,检查正确性、风格、测试及潜在问题。
official
coding-prefs
langchain-ai
在做出非平凡的样式决策前,先从 /memory/coding-prefs.md 读取用户的编码偏好,并在用户给出新偏好时追加记录。
official
competitor-analysis
langchain-ai
当被要求分析竞争对手时:
official
cudf-analytics
langchain-ai
用于在数据集、CSV或表格数据上执行GPU加速的数据分析,使用NVIDIA cuDF。当任务涉及分组聚合、统计…时触发。
official
cuml-machine-learning
langchain-ai
使用NVIDIA cuML在表格数据上进行GPU加速的机器学习。当任务涉及分类、回归、聚类、降维…时触发。
official
data-visualization
langchain-ai
用于创建出版级图表和多面板分析摘要。当任务涉及数据可视化、结果绘图、创建……时触发。
official