LangSmith is excellent for debugging live AI systems. But keeping every trace in its extended-retention tier can turn observability into a surprisingly large line item.
Today we merged a new archive workflow into langsmith-cli that changes that tradeoff: keep LangSmith for live debugging, continuously archive verified traces to organization-owned private S3, and query the retained Parquet directly with DuckDB.
In other words, you can preserve your complete trace history without placing every trace on LangSmith's extended-retention tier.
LangSmith currently documents two trace-retention tiers:
| Tier | Retention | Published trace price |
|---|---|---|
| Base | 14 days | 0.05¢ |
| Extended | 400 days | 0.50¢ total |
The 0.45¢ extended-retention upgrade makes an extended trace cost 10× as much as a base trace.
That difference becomes material at production volume:
| Monthly traces | Base, 14 days | Extended, 400 days | Added retention cost |
|---|---|---|---|
| 100,000 | $50 | $500 | $450 |
| 1,000,000 | $500 | $5,000 | $4,500 |
| 10,000,000 | $5,000 | $50,000 | $45,000 |
These examples use the published per-trace rates before free allowances, plan terms, negotiated pricing, or taxes. Always check the official LangSmith usage and billing documentation before making budget decisions.
There is another subtle risk: online evaluators and automation rules can upgrade matching traces when retention extension is enabled. A rule that matches one run upgrades the whole trace, and a thread-level rule can upgrade every trace in that thread. LangSmith currently enables retention extension by default for new online evaluators and automation rules, although you can opt out.
At scale, an innocent-looking evaluator or rule can therefore create a much larger bill than expected.
langsmith-cli
archive workflow The new workflow separates live observability from long-term retention:
LangSmith live traces (14 days)
│
├── D+2 primary export ───────┐
└── D+12 reconciliation ──────┤ deduplicate by run ID
▼
private S3 / Parquet
│
▼
runs ... --archive (DuckDB)
The D+2 export captures traces after normal late-arriving data has settled. The D+12 reconciliation pass catches delayed updates before the 14-day base-retention window closes. Both passes deduplicate by run ID, so retries are safe and the archive converges on the latest exported data.
The result is long-term trace history in storage your organization owns and controls.
Projects can be routed to separate buckets or prefixes—for example, to isolate development and production data:
routes:
- name: dev
project_pattern: "dev/**"
archive_uri: s3://my-langsmith-traces-dev/langsmith
- name: production
project_pattern: "prd/**"
archive_uri: s3://my-langsmith-traces-prd/langsmith
Point the CLI at that configuration and schedule the sync using cron, a Kubernetes CronJob, or your existing scheduler:
export LANGSMITH_ARCHIVE_CONFIG=/etc/langsmith-cli/archive.yaml
langsmith-cli --json archive sync \
--all-routes \
--retention-days 14
The organization supplies the scheduler, LangSmith API key used during export, AWS workload identity, private buckets, encryption, lifecycle policies, and reader IAM. The CLI owns the archive and query mechanism—not your infrastructure.
Archived traces remain searchable through familiar commands. Reads use DuckDB over Parquet in S3 and do not require a LangSmith API key:
langsmith-cli --json runs list \
--archive \
--project prd/my-agent \
--last 90d
langsmith-cli --json runs search "timeout" \
--archive \
--project prd/my-agent
langsmith-cli --json runs get <run-id> \
--archive \
--follow-children
That means incident investigations, regression analysis, audits, and offline analytics can continue long after a base-tier trace has disappeared from the live LangSmith API.
For many teams, the most economical model is now straightforward:
--archive
for older investigations and analysis.You keep LangSmith's excellent live debugging experience, retain your full historical dataset under your own controls, and make long-term storage costs predictable.
The merged change and implementation notes are in langsmith-cli PR #163.
If you operate LangSmith at meaningful volume, this is worth setting up before your next evaluator or automation rule quietly multiplies the retention bill.