# LangSmith Preview Builds: Test agent changes before production
<!--
ref: @content/youtube/langchain/langsmith-preview-builds-test-agent-changes-before-production
tags: [LangSmith, preview builds, agent deployment, pull requests, LangGraph, agent testing, CI workflow]
version: 2
updated_at: 2026-11-24T07:10:44.080Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=xEnUDGZ3_HE)**

# LangSmith Preview Builds: Test agent changes before production

*Synthesized from LangChain, 2026-08-20; speakers are not named in the source.*

An unnamed LangChain presenter walks through a screen-recorded demo of LangSmith deployment preview builds, using a customer-support agent built with LangChain's create-agent function.

## Core Thesis
The presenter argues that agents need the same preview-link workflow as ordinary software, because agent behaviour can change after deployment in ways code review does not reveal. LangSmith's preview builds give each GitHub pull request a temporary deployment of the agent that the team can test and share without touching production.

## Key Insights
- **Why previews.** An agent's behaviour depends on prompts, tools and model calls, so a merged change can behave differently in production. A preview deployment lets a team exercise the change first.
- **Setup in the deployment settings.** Continuous deployment creates a new version on every push to the master branch. Preview builds are enabled separately, with an optional base preview branch (blank defaults to the deployment branch), a trigger set to each merge request or to a label such as a GitHub preview tag, an idle time-to-live of about 72 hours by default, and a cap of five simultaneous previews.
- **Demo change.** The support agent could not say whether an order was refundable. The presenter added a return-eligibility tool, tested it locally with LangGraph dev and LangSmith Studio, then opened a pull request.
- **Iteration.** Each new commit on the pull request created a new revision of the preview deployment. The presenter then added the remaining return window to the tool's output and confirmed the agent reported 18 days left in the preview.
- **Cleanup.** Merging the pull request promoted the change to the main deployment and closed the preview automatically.

## Actionable Takeaways
1. Turn on preview builds for the agent's deployment and pick a trigger: every merge request, or only pull requests with a chosen label.
2. Set the idle time-to-live and the simultaneous-preview cap to match team size; the demo used the 72-hour default and a limit of five.
3. Test the change in the local dev server before opening the pull request, then re-check the preview after each new commit.
4. Rely on the automatic close after merge rather than deleting previews by hand.

## Notable Quotes
> "Agent development requires the same workflow, as changes to the agent may behave differently after deployment." — the unnamed presenter

> "Preview builds allow you to test a merge request as a deployed agent before it goes into production." — the unnamed presenter

---

*Related: `@content/youtube/langchain/how-credit-genie-debugs-thousands-of-agent-traces-with-langsmith` · `@content/youtube/langchain/inside-toyotas-manufacturing-ai-langchain-langsmith-and-six-figure-roi` · `@content/youtube/langchain/managed-deep-agents-conceptual-video` · `@content/youtube/langchain/agent-that-can-browse-the-web-with-managed-deep-agents-and-browserbases-stagehand` · `@content/youtube/langchain/managed-deep-agents-skills`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*