Query and manage LangSmith projects, traces, runs, datasets, evaluators, experiments, and threads from the terminal
The LangSmith CLI is a fast, agent-friendly command-line tool for working with your LangSmith data and workflows directly from the terminal. It’s designed for both humans and AI coding agents to list, filter, retrieve, and export data — with predictable JSON output by default and a pretty table mode for humans.
Built for agents and scripts: defaults to JSON, supports clean stdout/stderr separation, and offers --yes flags for non-interactive use.
The following commands cover the core resource types — projects, traces, runs, datasets, experiments, and threads:
Copy
# List tracing projects (sessions)langsmith project list# List recent traces in a projectlangsmith trace list --project my-app --limit 5# Get a specific trace with full detaillangsmith trace get <trace-id> --project my-app --full# List LLM runs with token countslangsmith run list --project my-app --run-type llm --include-metadata# Datasets and experimentslangsmith dataset listlangsmith experiment list --dataset my-eval-set# Conversation threads in a projectlangsmith thread list --project my-chatbot
langsmith run list --project my-app --run-type llmlangsmith run list --project my-app --run-type tool --name searchlangsmith run get <run-id> --fulllangsmith run export llm_calls.jsonl --project my-app --run-type llm --full