--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.
Install
--dry-run flag to preview the update without installing.
Authenticate
Set your API key as an environment variable:Quickstart
The following commands cover the core resource types:Output formats
Default JSON to stdout — easy to pipe, script, or feed to an agent:--format pretty for human-readable output:
-o <path>:
Commands
Each command group targets a specific LangSmith resource. Most commands support--limit, --offset, and a shared set of filter flags.
List projects
Returns up to 20 projects by default, sorted by most recent activity. Lists tracing projects only. (Useexperiment list to list evaluation experiments.)
Query traces
Defaults to the last 7 days, newest first. Use--since or --last-n-minutes to change the time window.
Query runs
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.
Query threads
--project is required for all thread commands.
Manage datasets
dataset export exports the examples (rows) within a dataset, not the dataset metadata itself.
Manage examples
Use--split to assign examples to named splits (such as test or train) when creating or listing.
Manage evaluators
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.
View experiments
experiment list shows evaluation experiments, not tracing projects. (Use project list to list tracing projects.)
Filter flags
Mosttrace and run commands share these filters:
| Flag | Description | Example |
|---|---|---|
--project | Project name | --project my-app |
--limit, -n | Max results | -n 10 |
--offset | Pagination offset | --offset 20 |
--last-n-minutes | Override the 7-day default | --last-n-minutes 60 |
--since | After ISO timestamp | --since 2024-01-15T00:00:00Z |
--error / --no-error | Filter by error status | --error |
--name | Name search (case-insensitive) | --name ChatOpenAI |
--run-type | Run type (llm or tool) | --run-type llm |
--min-latency / --max-latency | Latency range in seconds | --min-latency 2.5 |
--min-tokens | Minimum total tokens | --min-tokens 1000 |
--tags | Tags, comma-separated (OR logic) | --tags prod,v2 |
--filter | Raw LangSmith filter DSL | --filter 'eq(status, "error")' |
--trace-ids | Specific trace IDs | --trace-ids abc123,def456 |
| Flag | Adds |
|---|---|
--include-metadata | Status, duration, tokens, costs |
--include-io | Inputs, outputs, error |
--include-feedback | Feedback stats |
--full | All of the above |
--show-hierarchy | Full run tree (traces only) |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

