TellWorldAI World Archive
Ask中文

Home›Practice›Practice

Practice

Deploying LangChain agents to production

A working agent still needs a hosting model. Learn the LangSmith Cloud route from a GitHub repository, plus JavaScript framework hosting and the other LangSmith options.

Who this is for and what you will be able to do

This guide is for developers who have a LangChain agent running locally and want to put it into production. After reading it, you should be able to choose between the two main hosting routes, know what you need before deploying to LangSmith Cloud, and complete the first step, which is getting your code into a GitHub repository.

Two hosting routes

There are two main ways to run a LangChain agent in production[1]:

  • LangSmith Cloud is a managed hosting option. It is described as fully managed infrastructure for stateful, long-running agents, with persistent state and background execution. LangSmith handles infrastructure, scaling, and operational concerns[1].
  • JavaScript frameworks and hosting platforms. The page lists Next.js, SvelteKit, Nuxt, Cloudflare Workers, and Deno Deploy as examples. These deployments use the Agent Streaming Protocol[1].

If neither route fits, LangSmith also offers hybrid deployment, standalone servers, and self-hosting with a control plane[1]. For more on these options, see the LangSmith Agent Server overview[1].

Prerequisites

To deploy to LangSmith Cloud, you need two accounts[1]:

  • A GitHub account.
  • A LangSmith account. Signing up is free.

Deploying from a GitHub repository

Your application's code must be in a GitHub repository before LangSmith can deploy it. Public and private repositories are both supported[1]. That means you can deploy from a private repository and keep the code out of public view. Choosing between the routes comes down to the shape of your application. LangSmith Cloud is the route the page describes for stateful, long-running agents that need persistent state and background execution. The JavaScript framework route fits an application that already lives in one of those frameworks and uses the Agent Streaming Protocol for communication[1].

The first step is to create a repository on GitHub[1]. Before you push the code, make sure your app is LangGraph-compatible by following the local server setup guide[1]. Then push your code to the repository[1].

The page gives Python and JavaScript deployment instructions in separate sections, marked with :::python and :::js. Read the section for the language you use[1].

Limits and common questions

  • This guide stops at getting the code into a GitHub repository. The deployment steps after that are included from separate content on the page, and they are not expanded here, so follow the page's links to continue[1].
  • The page says LangSmith takes care of infrastructure, scaling, and operations. It does not list pricing, regions, or quotas, so check LangSmith's own documentation for those details[1].
  • Deploying to a JavaScript framework and deploying to LangSmith Cloud are two different routes. Which one fits depends on how you run your application and on the stack your team already uses. The page does not make that choice for you[1].

Next steps

Because the page presents both hosting routes side by side, decide which one fits your application before you start the GitHub steps. The GitHub steps described here are the route for deploying to LangSmith. Make that choice first, then follow the steps for the route you picked. To compare the other LangSmith deployment options, read the LangSmith Agent Server overview linked from this page[1]. To get a local server running first, follow the local server setup guide that the page points to[1].

Adapted from LangChain's documentation page *Deployment*[1], released under the MIT License.

Sources

  1. 1
    DeploymentLangChain docs (MIT)

Cite this page: Deploying LangChain agents to production. TellWorld, https://www.tellworld.net/practice/practice-langchain-deploy. Updated 2026-11-14

Related news

View all