cd /news/developer-tools/keep-every-langsmith-trace-without-t… · home topics developer-tools article
[ARTICLE · art-105308] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Keep Every LangSmith Trace Without the 10 Retention Bill

The open-source langsmith-cli project merged a new archive workflow that lets teams keep every LangSmith trace without paying for extended retention. The tool continuously exports traces to organization-owned S3 as Parquet, queryable via DuckDB, avoiding the 10x cost of LangSmith's extended-retention tier. It also addresses the risk of online evaluators and automation rules inadvertently upgrading traces to extended retention.

read3 min views1 publishedAug 21, 2026

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.

── more in #developer-tools 4 stories · sorted by recency
── more on @langsmith 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/keep-every-langsmith…] indexed:0 read:3min 2026-08-21 ·