LangSmith Deployment

Status: ACTIVE (pulled from docs.langchain.com) Source: https://docs.langchain.com/oss/python/langgraph/deploy Timestamp: 2026-05-11

Deploy your agent to LangSmith Cloud, a fully managed hosting platform designed for agent workloads.

Prerequisites

Deploy Your Agent

1. Create a GitHub repository

Your application's code must reside in a GitHub repository. Follow the local server setup guide first, then push your code.

2. Deploy to LangSmith

  1. Log in to LangSmith. In the left sidebar, select Deployments.
  2. Click + New Deployment.
  3. Click Add new account to connect your GitHub account.
  4. Select your application's repository. Click Submit to deploy (~15 minutes).

3. Test in Studio

Select the deployment and click Studio to test your agent visually.

4. Get the API URL

In the Deployment details view, click API URL to copy it.

5. Test the API

Python SDK:

pip install langgraph-sdk
from langgraph_sdk import get_sync_client

client = get_sync_client(url="your-deployment-url", api_key="your-langsmith-api-key")

for chunk in client.runs.stream(
    None, "agent",
    input={"messages": [{"role": "human", "content": "What is LangGraph?"}]},
    stream_mode="updates",
):
    print(f"Receiving new event of type: {chunk.event}...")
    print(chunk.data)

REST API:

curl -s --request POST \
    --url <DEPLOYMENT_URL>/runs/stream \
    --header 'Content-Type: application/json' \
    --header "X-Api-Key: <LANGSMITH_API_KEY>" \
    --data '{
        "assistant_id": "agent",
        "input": {
            "messages": [{"role": "human", "content": "What is LangGraph?"}]
        },
        "stream_mode": "updates"
    }'