Use this file to discover all available pages before exploring further.
The LangSmith CLI is a command-line tool for querying and managing your LangSmith data. It’s designed for both developers and AI coding agents and outputs JSON by default for scripting, with a --format pretty option for human-readable tables. Use it when you need scriptable access to your LangSmith data, such as bulk exports, automation, or giving a coding agent direct access to your traces, runs, and datasets.
The LangSmith CLI is in alpha. Commands, flags, and output schemas may change between releases. Report issues on GitHub.
The following commands cover the core resource types:
# List tracing projectslangsmith 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 threadslangsmith thread list --project my-chatbot# Sandboxeslangsmith sandbox listlangsmith sandbox tunnel my-vm --remote-port 5432
Returns up to 20 projects by default, sorted by most recent activity. Lists tracing projects only. (Use experiment list to list evaluation experiments.)
langsmith project listlangsmith project list --limit 50 --name-contains chatbotlangsmith --format pretty project list
Defaults to 50 results (most other commands default to 20). The same 7-day time window applies. Use --since or --last-n-minutes to override.
langsmith run list --project my-app --run-type llmlangsmith run list --project my-app --run-type tool --name searchlangsmith run list --project my-app --min-tokens 1000 --include-metadatalangsmith run get <run-id> --fulllangsmith run export llm_calls.jsonl --project my-app --run-type llm --full
Use --split to assign examples to named splits (such as test or train) when creating or listing.
langsmith example list --dataset my-dataset --limit 50langsmith example list --dataset my-dataset --split testlangsmith example create --dataset my-dataset \ --inputs '{"question": "What is LangSmith?"}' \ --outputs '{"answer": "A platform for LLM observability"}' \ --split testlangsmith example delete <example-id> --yes
Evaluators can be offline (run against a dataset during experiments) or online (run against a live project). Use --sampling-rate to evaluate only a fraction of production runs, and --replace to overwrite an existing evaluator by name.
Sandbox commands let you build snapshots, create sandboxes, execute commands, open interactive consoles, and tunnel TCP ports to services running inside sandboxes.See Sandbox CLI for the full sandbox command reference.