deepagents-planning-to…
Use the write_todos tool effectively for task planning and decomposition in Deep Agents. Use when users want to (1) implement…
Fetch, organize, and analyze LangSmith traces for debugging and evaluation. Use when you need to: query traces/runs by project, metadata, status, or time window; download traces to JSON; organize outcomes into passed/failed/error buckets; analyze token/message/tool-call
Claude Code
$ npx -y skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer --agent claude-code
Codex
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a codex -y
Cursor
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a cursor -y
Gemini CLI
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a gemini-cli -y
GitHub Copilot
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a github-copilot -y
OpenCode
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a opencode -y
Windsurf
$ npx skills add soba-labs/langchain-agent-skills --skill langsmith-trace-analyzer -a windsurf -y
name: langsmith-trace-analyzer description: "Fetch, organize, and analyze LangSmith traces for debugging and evaluation. Use when you need to: query traces/runs by project, metadata, status, or time window; download traces to JSON; organize outcomes into passed/failed/error buckets; analyze token/message/tool-call patterns; compare passed vs failed behavior; or investigate benchmark and production failures."
Use this skill to move from raw LangSmith traces to actionable debugging/evaluation insights.
# Install dependencies uv pip install langsmith langsmith-fetch # Auth export LANGSMITH_API_KEY=<your_langsmith_api_key>
1. Download traces with `scripts/download_traces.py` (or `scripts/download_traces.ts`). 2. Analyze downloaded JSON with `scripts/analyze_traces.py`. 3. Load targeted references only when needed:
1. **Known trace IDs** Use `langsmith-fetch trace <id>` directly, or `--trace-ids` in downloader scripts.
2. **Need to discover traces first** Use LangSmith SDK `list_runs/listRuns` with filters, then download selected trace IDs.
3. **Need aggregate insights** Run `analyze_traces.py` for summary stats, patterns, and passed-vs-failed comparisons.
Python:
uv run skills/langsmith-trace-analyzer/scripts/download_traces.py \ --project "my-project" \ --filter "job_id=abc123" \ --last-hours 24 \ --limit 100 \ --output ./traces \ --organize
TypeScript:
ts-node skills/langsmith-trace-analyzer/scripts/download_traces.ts \ --project "my-project" \ --filter "job_id=abc123" \ --last-hours 24 \ --limit 100 \ --output ./traces
Output layout:
traces/
├── manifest.json
└── by-outcome/
├── passed/
├── failed/
└── error/
├── GraphRecursionError/
├── TimeoutError/
└── DaytonaError/Notes:
# Markdown report uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --output report.md # JSON output uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --json # Compare passed vs failed (expects by-outcome folders) uv run skills/langsmith-trace-analyzer/scripts/analyze_traces.py ./traces --compare --output comparison.md
The analyzer reports:
Use official LangSmith run filter syntax via `filter` and/or `start_time`:
from datetime import datetime, timedelta, timezone
from langsmith import Client
client = Client()
start = datetime.now(timezone.utc) - timedelta(hours=24)
filter_query = 'and(eq(metadata_key, "job_id"), eq(metadata_value, "abc123"))'
runs = client.list_runs(
project_name="my-project",
is_root=True,
start_time=start,
filter=filter_query,
)For TypeScript:
import { Client } from "langsmith";
const client = new Client();
for await (const run of client.listRuns({
projectName: "my-project",
isRoot: true,
filter: 'and(eq(metadata_key, "job_id"), eq(metadata_value, "abc123"))',
})) {
console.log(run.id, run.status);
}| Issue | Likely Cause | Action | |---|---|---| | `LANGSMITH_API_KEY` missing | Auth not configured | `export LANGSMITH_API_KEY=<your_langsmith_api_key>` | | No runs returned | Wrong project/filter/time range | Verify project name and filter syntax | | Empty/partial message arrays | Run schema differs or incomplete data | Use downloaded trace JSON and inspect `status/error` fields | | JSON parse error on downloaded files | Bad/incomplete export | Re-download trace; use `--format raw` paths in scripts | | Re-downloading same traces repeatedly | Existing files in nested folders | Use current scripts (they check existing files across output tree) |
A comprehensive collection of agent-optimized skills for AI coding assistants working in the LangChain ecosystem.
Use the write_todos tool effectively for task planning and decomposition in Deep Agents. Use when users want to (1) implement…
Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the `deepagents` package. Use when…
Implement multi-agent coordination patterns (supervisor-subagent, router, orchestrator-worker, handoffs) for LangGraph…
Implement LangGraph error handling with current v1 patterns. Use when users need to classify failures, add RetryPolicy for…
Initialize and configure LangGraph projects with proper structure, langgraph.json configuration, environment variables, and…
Design state schemas, implement reducers, configure persistence, and debug state issues for LangGraph applications. Use when…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration