Skip to main content
The control plane API is part of LangSmith Deployment. With the control plane API, you can programmatically create, manage, and automate your Agent Server deployments—for example, as part of a custom CI/CD workflow. Browse the full API reference in the Control Plane API section in the sidebar, or refer to the endpoint groups:

Host

The control plane hosts for Cloud data regions:
Region
GCP US
GCP EU
GCP APAC
AWS US
Note: Self-hosted deployments of LangSmith will have a custom host for the control plane. The control plane APIs can be accessed at the path /api-host. For example, http(s)://<host>/api-host/v2/deployments. See the self-host usage guide for more details.

Authentication

To authenticate with the control plane API, set the X-Api-Key header to a valid LangSmith API key and set the X-Tenant-Id header to a valid workspace ID to target. Example curl command:

Versioning

Each endpoint path is prefixed with a version (e.g. v1, v2).

Quick start

  1. Call POST /v2/deployments to create a new Deployment. The response body contains the Deployment ID (id) and the ID of the latest (and first) revision (latest_revision_id).
  2. Call GET /v2/deployments/{deployment_id} to retrieve the Deployment. Set deployment_id in the URL to the value of Deployment ID (id).
  3. Poll for revision status until status is DEPLOYED by calling GET /v2/deployments/{deployment_id}/revisions/{latest_revision_id}.
  4. Call PATCH /v2/deployments/{deployment_id} to update the deployment.

Example Code

Below is example Python code that demonstrates how to orchestrate the control plane APIs to create a deployment, update the deployment, and delete the deployment.