Skip to main content
BYOC on GCP runs the LangSmith data plane in your GCP project, on the LangSmith US control plane at smith.langchain.com. You create the service account LangSmith provisions as, then create the data plane with the LangSmith API. For BYOC on AWS, see BYOC onboarding.
BYOC on GCP is in beta. Inputs and behavior can change between releases.
For what LangSmith deploys in your project and the access it gets, see BYOC architecture on GCP.

Before you start

You need the following:
  • BYOC enabled on your organization: Create an organization in LangSmith at smith.langchain.com, or reuse an existing one, and send its organization ID to the LangChain team to enable BYOC.
  • An organization admin: Creating a data plane requires the organization admin role, and an API key for that user.
  • A GCP project for the data planes: Use a project that holds only LangSmith resources. Most of the provisioner’s permissions apply only to resources whose names start with langsmith-, but some cover the whole project. If the project also holds other resources, set byo_iam = true in Step 2. The project must not already have a managed_by tag key, and must hold only one copy of the Terraform module. For details, see What LangChain can and cannot access.
  • Permissions in that project: Permission to create service accounts, grant project IAM roles, enable APIs, and create tags. The tags need Tag Administrator (roles/resourcemanager.tagAdmin) on the project.
  • Terraform: Terraform 1.11.0 or later, with Google provider 6.0 or later, before 9.0.
  • A GCP region: BYOC on GCP can run in any GCP region. If the region you need is not enabled yet, contact the LangChain team to add it.
  • Resource location policies: If your GCP organization restricts resource locations, allow the data plane region and us-central1. The data plane creates its Private Service Connect endpoint to LangSmith in us-central1.

Set up a data plane

Step 1. Get the external ID

Navigate to Settings > Data Planes in LangSmith and use the copy button next to the Data Planes header to copy the external ID. Do not make up your own value.

Step 2. Run the Terraform module

Apply the langsmith-byoc-service-account Terraform module in your project. The module:
  • Enables the APIs that data planes use. Set enable_apis = false if you manage the project’s APIs elsewhere.
  • Creates the provisioner service account langsmith-byoc-provisioner, with its description set to your external ID.
  • Grants it custom roles with only the permissions that provisioning and teardown use. Most of them apply only to resources whose names start with langsmith-.
  • Creates the tag managed_by: langsmith in the project, and grants the LangSmith control plane service account roles/container.admin only on GKE clusters with that tag. LangSmith tags the data plane GKE clusters and Cloud SQL instances it creates, and the Postgres setup account’s Cloud SQL permissions apply only to tagged instances.
  • Lets the LangSmith control plane service account, byoc-crossplane@langchain-prod.iam.gserviceaccount.com, impersonate it through the Service Account Token Creator role. The module trusts no other LangSmith identity.
LangSmith requires release v0.17.90 or later of the module, which lets the provisioner create the Private Google Access routes. With an earlier release, the data plane still becomes ready, but without Private Google Access: Google API traffic resolves to public addresses and follows your VPC’s routes. If you applied an earlier release, re-apply the module at v0.17.90 or later. To create the data plane service accounts and their project roles yourself, set byo_iam = true before you create data planes in the project. The provisioner then cannot create service accounts or change the project IAM policy. Set it if the project holds resources that are not LangSmith’s. Create the data plane with byoiam_enabled set to true. For more information, see Bring your own IAM.

Step 3. Create the data plane

LangSmith automatically adds your project to the Private Service Connect accept list during provisioning. You do not need to send your project number to LangChain or wait for manual approval before creating the data plane. Create the data plane with the LangSmith API, using an organization admin’s API key:
The request takes the following fields: The API returns 202 with the data plane’s id, api_url, and status. Before it accepts the request, LangSmith checks that it can impersonate the provisioner, and that the provisioner is in the project and carries your external ID. If a check fails, the response names the problem. See Troubleshoot create errors.

Step 4. Wait until active

LangSmith provisions the infrastructure in your project. The data plane status moves from requested to provisioning to active. Track it in Settings > Data Planes, or with GET /orgs/current/data-planes/<id>.
Provisioning can take up to 3 hours. After 3 hours, the status changes to provisioning_failed. If that happens, contact the LangChain team.
After the data plane is active, a workspace named dp-<data_plane_name> is available in it, and you can create more workspaces. See the Create workspaces step in BYOC onboarding.

Use your data plane

Find the data plane URL

The data plane URL is the api_url of the data plane: https://<first 8 characters of the data plane ID>.gcp.langchain-byoc.com. You can also find it in Settings > Data Planes. To point applications and API clients at the data plane, see BYOC usage.

Choose a public or internal endpoint

You pick the endpoint type when you create the data plane:
  • Public: Users reach the data plane from the internet.
  • Internal (default): The ingress is on an internal load balancer, and the hostname resolves only inside the data plane VPC. Connect your network to that VPC, for example with VPC peering or Cloud VPN, and make the hostname resolve from your network. See Connect your network.
Outbound traffic from the data plane leaves through Cloud NAT with a static IP address, so you can allowlist the data plane. For the destinations the data plane needs, see Outbound traffic.

Change data plane settings

On GCP, you can change the maintenance window. Blob TTL, Fleet OIDC, and network firewall settings are not available. The maintenance window is two hours in UTC, on whole hours, for example sun:07:00-sun:09:00. It applies to Cloud SQL and Memorystore, whose windows last one hour, so LangSmith uses only the start. When it is unset, Google picks the window.
GKE nodes upgrade automatically on the GKE REGULAR release channel.

Troubleshoot create errors

The create request returns these error codes: A request that fails field validation, such as a region that is not enabled, a /18 vpc_cidr that overlaps the GKE pod range, or an mtu_bytes out of range, returns 400 with the field and the reason.

Delete a data plane

Do not destroy the Terraform module before you delete the data plane in LangSmith. LangSmith needs the provisioner to delete the data plane resources.
To delete a data plane:
  1. Delete the data plane with DELETE /orgs/current/data-planes/<id>. You can delete it while it is active, provisioning, or provisioning_failed. LangSmith deletes the resources it created in the project, except the data: the Cloud Storage bucket stays with its objects, and the Cloud SQL backups outlive the instance. See What teardown keeps.
  2. Wait until the data plane is gone from Settings > Data Planes.
  3. If no other data planes use the project, run terraform destroy.

What teardown keeps

Teardown keeps the data plane’s data in your project:
  • Cloud Storage bucket: The bucket and its objects stay. Its labels include the data plane ID.
  • Final Cloud SQL backup: Cloud SQL takes a final backup when it deletes the instance, and keeps it for 365 days.
  • Automated Cloud SQL backups: The instance’s automated backups stay, and expire one a day.
LangSmith does not delete them later, and neither does terraform destroy. Delete them yourself when you no longer need them.

Get help

When something does not work, contact LangChain support with:
  • Your organization ID and data plane name.
  • What you did, and what happened.
  • Error messages, screenshots, and timestamps.
  • For provisioning problems: your GCP project ID, project number, and region.

See also