langsmith-trace
Skill by langchain-ai
Adds LangSmith tracing to AI applications and queries trace data. It uses the langsmith CLI to list, inspect and export traces, for developers debugging LLM apps.
Install langsmith-trace
Built from the published package, never by AI.
git clone --depth 1 https://github.com/langchain-ai/design-agent /tmp/design-agent && mkdir -p ~/.claude/skills && cp -r /tmp/design-agent/skills/langsmith-trace ~/.claude/skills/langsmith-traceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/langchain-ai/design-agent /tmp/design-agent && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/design-agent/skills/langsmith-trace ~/.gemini/antigravity-cli/skills/langsmith-traceAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The langsmith-trace skill helps an AI assistant add LangSmith tracing to an application and query trace data. For LangChain and LangGraph apps, tracing is turned on with environment variables. For other apps, it shows how to use the traceable decorator or wrapper and wrap the OpenAI client in Python or JavaScript. It uses the langsmith CLI for querying.
For querying, the skill covers listing, getting and exporting traces, and listing individual runs. Filters include time, errors, latency, tokens, tags and raw feedback queries. Traces are exported as JSONL files. The skill is aimed at developers who debug and analyze LLM applications with LangSmith and need a LANGSMITH_API_KEY for authentication.
Written from the project's SKILL.md and checked against it.
What it can do
- Add tracing to LangChain appsTurns on automatic tracing for LangChain and LangGraph apps using environment variables.
- Trace other applicationsUses the traceable decorator and wrap_openai or wrapOpenAI to trace non-LangChain code.
- trace listLists traces, with options for metadata and an inline hierarchy view.
- trace getGets a single trace with its full hierarchy.
- trace exportExports traces to JSONL files, one file per trace.
- run listLists individual runs as a flat list, filterable by run type.
- Performance and error filtersFilters traces by minimum latency, errors, tokens and tags.
- Raw filter queriesUses a raw LangSmith filter query for feedback and metadata filters.
- Dataset and experiment commandsCovers dataset, example, evaluator, experiment, thread and project command groups.
What you need
- LANGSMITH_API_KEY
- langsmith CLI
- Python or JavaScript application
Try asking
- List the last 10 failed traces in my LangSmith project.
- Export the last 20 traces with full inputs and outputs to JSONL.
- Add LangSmith tracing to my LangChain app using environment variables.
Good to know
- Authentication with an API key is required.
- Trace filters apply to the root run only, while run filters apply to any matching run.
- The --run-type option is not available for trace commands.
Security check
C- Downloads a script from the internet and runs itIn
skills/langsmith-trace/SKILL.md:curl -sSL https://raw.githubusercontent.com/langchain-ai/langsmith-cli/main/scripts/install.sh | sh
Checked automatically: skills/langsmith-trace/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to langsmith-trace
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
langsmith-trace: common questions
How do I add LangSmith tracing to a LangChain app?
For LangChain and LangGraph apps, tracing is automatic. Set LANGSMITH_TRACING, LANGSMITH_API_KEY and your LLM provider key as environment variables.
What is the difference between a trace and a run?
A trace is a complete execution tree with the root run and all child runs. A run is a single node in that tree, such as one LLM call or tool call.
What format do exported traces use?
Exports are JSONL files with one run per line. Use --include-io or --full to include inputs and outputs, which dataset generation requires.
How do I install langsmith-trace?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is langsmith-trace free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is langsmith-trace safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to langsmith-trace?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
