{"slug": "keep-every-langsmith-trace-without-the-10-retention-bill", "title": "Keep Every LangSmith Trace Without the 10 Retention Bill", "summary": "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.", "body_md": "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.\n\nToday we merged a new archive workflow into [ langsmith-cli](https://github.com/gigaverse-app/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.\n\nIn other words, you can preserve your complete trace history without placing every trace on LangSmith's extended-retention tier.\n\nLangSmith currently documents two trace-retention tiers:\n\n| Tier | Retention | Published trace price |\n|---|---|---|\n| Base | 14 days | 0.05¢ |\n| Extended | 400 days | 0.50¢ total |\n\nThe 0.45¢ extended-retention upgrade makes an extended trace cost 10× as much as a base trace.\n\nThat difference becomes material at production volume:\n\n| Monthly traces | Base, 14 days | Extended, 400 days | Added retention cost |\n|---|---|---|---|\n| 100,000 | $50 | $500 | $450 |\n| 1,000,000 | $500 | $5,000 | $4,500 |\n| 10,000,000 | $5,000 | $50,000 | $45,000 |\n\nThese 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](https://docs.langchain.com/langsmith/usage-and-billing#data-retention) before making budget decisions.\n\nThere 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.\n\nAt scale, an innocent-looking evaluator or rule can therefore create a much larger bill than expected.\n\n`langsmith-cli`\n\narchive workflow\nThe new workflow separates live observability from long-term retention:\n\n```\nLangSmith live traces (14 days)\n        │\n        ├── D+2 primary export ───────┐\n        └── D+12 reconciliation ──────┤ deduplicate by run ID\n                                      ▼\n                            private S3 / Parquet\n                                      │\n                                      ▼\n                         runs ... --archive (DuckDB)\n```\n\nThe 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.\n\nThe result is long-term trace history in storage your organization owns and controls.\n\nProjects can be routed to separate buckets or prefixes—for example, to isolate development and production data:\n\n```\n# archive.yaml\nroutes:\n  - name: dev\n    project_pattern: \"dev/**\"\n    archive_uri: s3://my-langsmith-traces-dev/langsmith\n  - name: production\n    project_pattern: \"prd/**\"\n    archive_uri: s3://my-langsmith-traces-prd/langsmith\n```\n\nPoint the CLI at that configuration and schedule the sync using cron, a Kubernetes CronJob, or your existing scheduler:\n\n```\nexport LANGSMITH_ARCHIVE_CONFIG=/etc/langsmith-cli/archive.yaml\n\nlangsmith-cli --json archive sync \\\n  --all-routes \\\n  --retention-days 14\n```\n\nThe 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.\n\nArchived traces remain searchable through familiar commands. Reads use DuckDB over Parquet in S3 and do not require a LangSmith API key:\n\n```\n# List production runs from the last 90 days\nlangsmith-cli --json runs list \\\n  --archive \\\n  --project prd/my-agent \\\n  --last 90d\n\n# Search historical runs\nlangsmith-cli --json runs search \"timeout\" \\\n  --archive \\\n  --project prd/my-agent\n\n# Inspect a run and its children\nlangsmith-cli --json runs get <run-id> \\\n  --archive \\\n  --follow-children\n```\n\nThat means incident investigations, regression analysis, audits, and offline analytics can continue long after a base-tier trace has disappeared from the live LangSmith API.\n\nFor many teams, the most economical model is now straightforward:\n\n`--archive`\n\nfor 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.\n\nThe merged change and implementation notes are in [langsmith-cli PR #163](https://github.com/gigaverse-app/langsmith-cli/pull/163).\n\nIf you operate LangSmith at meaningful volume, this is worth setting up before your next evaluator or automation rule quietly multiplies the retention bill.", "url": "https://wpnews.pro/news/keep-every-langsmith-trace-without-the-10-retention-bill", "canonical_source": "https://dev.to/aviadr1/keep-every-langsmith-trace-without-the-10x-retention-bill-2gl1", "published_at": "2026-08-21 00:38:17+00:00", "updated_at": "2026-08-21 01:13:51.923079+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure", "mlops"], "entities": ["LangSmith", "langsmith-cli", "DuckDB", "S3", "gigaverse-app"], "alternates": {"html": "https://wpnews.pro/news/keep-every-langsmith-trace-without-the-10-retention-bill", "markdown": "https://wpnews.pro/news/keep-every-langsmith-trace-without-the-10-retention-bill.md", "text": "https://wpnews.pro/news/keep-every-langsmith-trace-without-the-10-retention-bill.txt", "jsonld": "https://wpnews.pro/news/keep-every-langsmith-trace-without-the-10-retention-bill.jsonld"}}