云 选项是一种完全托管的模式,LangChain 托管并运营所有 LangSmith 基础设施和服务:
- 完全托管的基础设施:LangChain 处理所有基础设施、更新、扩展和维护。
- 从 GitHub 部署:连接您的代码仓库并点击几下即可部署。
- Automated CI/CD:构建过程由平台自动处理。
- LangSmith UI:完全访问 可观测性, 评估, 部署管理和 Studio.
| **谁管理** | **运行环境** | |
|---|---|---|
| **LangSmith 平台(UI、API、数据存储)** | LangChain | LangChain 云(AWS 和 GCP) |
| **您的 Agent 服务器** | LangChain | LangChain 云(AWS 和 GCP) |
| **CI/CD for your apps** | LangChain | LangChain 云(AWS 和 GCP) |
!云部署:LangChain 托管和管理所有组件,包括 UI、API 和您的 Agent 服务器。
开始使用
要将您的第一个应用部署到云,请参阅 云部署快速入门 或参考 综合设置指南.
云架构和可扩展性
LangSmith 部署在 Google Cloud Platform (GCP) 上,为美国、欧盟和亚太 SaaS 区域提供服务,并为 AWS 托管的美国 SaaS 区域部署在 Amazon Web Services (AWS) 上。该平台设计为高度可扩展。许多客户在 LangSmith 上运行生产工作负载,用于 LLM 应用可观测性、评估和代理部署。
美国 LangSmith 服务(默认 GCP 区域)部署在 GCP 的 us-central1 (爱荷华州)区域。
区域存储
本表中的资源和服务存储在注册URL对应的位置(GCP美国、GCP欧盟、GCP亚太或AWS美国)。云托管的LangSmith使用 Supabase for authentication/authorization and ClickHouse Cloud 作为数据仓库。
| GCP US | GCP EU | GCP APAC | AWS US | |
|---|---|---|---|---|
| URL | https://smith.langchain.com?utm_source=docs&utm_medium=cta&utm_campaign=langsmith-signup&utm_content=langsmith-cloud | https://eu.smith.langchain.com | https://apac.smith.langchain.com | https://aws.smith.langchain.com |
| API URL | https://api.smith.langchain.com | https://eu.api.smith.langchain.com | https://apac.api.smith.langchain.com | https://aws.api.smith.langchain.com |
| 云服务 | GCP us-central1 (Iowa) | GCP europe-west4 (Netherlands) | GCP australia-southeast1 (Sydney) | AWS us-east-2 (Ohio) |
| Supabase | AWS us-east-1 (N. Virginia) | AWS eu-central-1 (Germany) | AWS ap-southeast-2 (Sydney) | AWS us-east-2 (Ohio) |
| ClickHouse Cloud | us-central1 (Iowa) | europe-west4 (Netherlands) | australia-southeast1 (Sydney) | us-east-2 (Ohio) |
| LangSmith部署 | GCP us-central1(爱荷华); *.us.langgraph.app | GCP europe-west4(荷兰); *.eu.langgraph.app | GCP australia-southeast1(悉尼); *.apac.langgraph.app | AWS us-east-2(俄亥俄); *.aws.us.langgraph.app |
请参阅 区域常见问题解答 了解更多。
区域无关存储
此处列出的数据仅存储在美国:
- * Stripe和Metronome的付款和账单信息
GCP服务
以下内容适用于 **美国、欧盟和亚太地区** GCP上的SaaS区域。
LangSmith由以下服务组成,全部部署在Google Kubernetes Engine(GKE)上:
- * LangSmith前端:提供LangSmith UI服务。
- * LangSmith后端:提供LangSmith API服务。
- * LangSmith平台后端:处理身份验证和其他高容量任务。(内部服务)
- * LangSmith Playground:处理将请求转发到各种LLM提供商以实现Playground功能。
- * LangSmith Queue:处理异步任务处理。(内部服务)
LangSmith使用以下GCP存储服务:
- * 用于运行输入和输出的Google Cloud Storage(GCS)。
- * 用于事务工作负载的Google Cloud SQL PostgreSQL。
- * 用于队列和缓存的 Google Cloud Memorystore for Redis。
- * GCP 上的 Clickhouse Cloud 用于追踪数据摄取和分析。我们的服务通过私有端点连接到托管在同一 GCP 区域的 Clickhouse Cloud。
我们使用的一些其他 GCP 服务包括:
- * 用于将流量路由到 LangSmith 服务的 Google Cloud Load Balancer。
- * 用于缓存静态资源的 Google Cloud CDN。
- * 用于安全性和速率限制的 Google Cloud Armor。如需了解更多关于我们执行的速率限制的信息,请参阅 速率限制.
AWS 服务
以下内容适用于 **AWS US** 在 us-east-2 (俄亥俄州)中的 SaaS 区域。相同的逻辑 LangSmith 组件运行在 **Amazon EKS** 而不是 GKE 上。
LangSmith 由以下服务组成,全部部署在 Amazon EKS 上:
- * LangSmith 前端:提供 LangSmith UI 服务。
- * LangSmith 后端:提供 LangSmith API 服务。
- * LangSmith 平台后端:处理身份认证和其他高容量任务。(内部服务)
- * LangSmith Playground:处理将请求转发到各种 LLM 提供商以实现 Playground 功能。
- * LangSmith Queue:处理异步任务的处理。(内部服务)
LangSmith 使用以下 AWS 存储和数据服务:
- * Amazon S3 用于运行输入和输出。
- * 用于事务工作负载的 Amazon RDS for PostgreSQL。
- * 用于队列和缓存的 Amazon ElastiCache for Redis。
- * 通过 AWS PrivateLink 在
us-east-2进行追踪数据摄取和分析,与 区域存储 上表一致。
我们使用的一些其他 AWS 服务包括:
- * Elastic Load Balancing(网络负载均衡器)和 Istio ingress 用于将流量路由到 LangSmith 服务。文档化的 API 速率限制在 Istio ingress 网关处执行。详情请参阅 速率限制.
- * 用于缓存静态资源(包括 Web UI 主机名)的 Amazon CloudFront
aws.smith.langchain.com). - * CloudFront 上的 AWS WAF 用于边缘托管规则组(例如,AWS 托管规则常见保护和 Bot Control)。
IP 地址白名单
### 来自 LangChain SaaS 的出口 离开 LangSmith 服务的所有流量都将通过 NAT 网关路由。所有流量看起来都将源自以下 IP 地址:
| GCP US | GCP EU | GCP APAC | AWS US |
|---|---|---|---|
| 34.59.65.97 | 34.13.192.67 | 34.151.89.217 | 18.188.147.158 |
| 34.67.51.221 | 34.147.105.64 | 34.116.97.4 | 18.219.86.202 |
| 34.46.212.37 | 34.90.22.166 | 34.151.162.199 | 3.21.57.192 |
| 34.132.150.88 | 34.147.36.213 | 34.116.66.129 | |
| 35.188.222.201 | 34.32.137.113 | 35.189.8.125 | |
| 34.58.194.127 | 34.91.238.184 | 35.201.9.237 | |
| 34.59.97.173 | 35.204.101.241 | 35.189.57.29 | |
| 104.198.162.55 | 35.204.48.32 | 34.40.198.11 |
如果连接到您自己的 AzureOpenAI 服务或 Playground 或在线评估可能需要的其他端点,将这些 IP 地址列入白名单可能会有所帮助。
### 接入 LangChain SaaS LangChain 端点映射到以下静态 IP 地址,用于在我们的 **GCP 负载均衡器** (US/EU/APAC) or, for **AWS US**上终止的流量(通过 **网络负载均衡器** in us-east-2 处理 API 和网关主机名):
| GCP US | GCP EU | GCP APAC | AWS US |
|---|---|---|---|
| 34.8.121.39 | 34.95.92.214 | 34.149.149.213 | 3.129.27.169 |
| 34.107.251.234 | 34.13.73.122 | 13.58.107.119 | |
| 16.59.151.49 | |||
| 16.59.98.147 | |||
| 3.134.146.243 | |||
| 3.150.87.246 |
您可能需要将这些 IP 加入允许列表,以允许来自您私有网络的流量访问 LangSmith SaaS 端点(api.smith.langchain.com, smith.langchain.com, beacon.langchain.com, eu.api.smith.langchain.com, eu.smith.langchain.com, eu.beacon.langchain.com, apac.api.smith.langchain.com, apac.smith.langchain.com, apac.beacon.langchain.com, aws.api.smith.langchain.com, aws.smith.langchain.com).
私有连接(仅限企业版)
企业版客户可以使用以下方式连接 LangSmith,而无需将流量暴露在公共互联网上: **AWS PrivateLink** or **GCP Private Service Connect (PSC)**.
AWS PrivateLink
位于 **AWS** 的客户可以通过 AWS PrivateLink连接到 LangSmith,实现从任何 VPC 的私有连接。跨区域连接原生支持。
端点服务名称
| 区域 | 服务名称 |
|---|---|
US (us-east-2) | com.amazonaws.vpce.us-east-2.vpce-svc-054f37092752bff6b |
设置
1. 请求访问权限: 联系您的客户经理或 sales@langchain.dev 并提供您的 AWS 账户 ID。LangChain 会将您的账户添加到端点服务的允许主体列表中。
2. 在您的 AWS 账户中创建接口 VPC 端点 ,并附加一个允许 **TCP 443 入站** 从您的 VPC CIDR(或需要访问 LangSmith 的实例)访问的安全组:
aws ec2 create-vpc-endpoint \
--vpc-id \
--service-name \
--vpc-endpoint-type Interface \
--subnet-ids \
--security-group-ids \
--region
resource "aws_vpc_endpoint" "langsmith" {
vpc_id = ""
service_name = ""
vpc_endpoint_type = "Interface"
subnet_ids = [""]
security_group_ids = [""]
}
3. 等待接受。 LangChain 将接受连接。端点状态将从 pendingAcceptance to available变更。请在接受后等待几分钟,让更改完全传播,然后再测试连接。
配置 DNS
配置 DNS,使 aws.api.smith.langchain.com 在您的 VPC 内解析为您 VPC 端点的私有 DNS 名称。您可以使用任何私有 DNS 解决方案——Route 53 私有托管区域、企业 DNS 解析器或任何可从您的 VPC 访问的 DNS 服务器。
首先,获取您端点的 DNS 名称:
aws ec2 describe-vpc-endpoints \
--vpc-endpoint-ids \
--query 'VpcEndpoints[0].DnsEntries[0].DnsName' \
--output text --region
然后为 aws.api.smith.langchain.com 创建一条 CNAME 记录指向该 DNS 名称。以下是使用 Route 53 的示例:
aws route53 create-hosted-zone \
--name aws.api.smith.langchain.com \
--vpc VPCRegion=,VPCId= \
--caller-reference langsmith-privatelink-$(date +%s) \
--hosted-zone-config PrivateZone=true
aws route53 change-resource-record-sets \
--hosted-zone-id \
--change-batch '{
"Changes": [{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "aws.api.smith.langchain.com",
"Type": "CNAME",
"TTL": 300,
"ResourceRecords": [{"Value": ""}]
}
}]
}'
resource "aws_route53_zone" "langsmith_privatelink" {
name = "aws.api.smith.langchain.com"
vpc {
vpc_id = ""
}
}
resource "aws_route53_record" "langsmith_privatelink" {
zone_id = aws_route53_zone.langsmith_privatelink.zone_id
name = "aws.api.smith.langchain.com"
type = "CNAME"
ttl = 300
records = [aws_vpc_endpoint.langsmith.dns_entry[0]["dns_name"]]
}
验证连接
从您 VPC 中的 EC2 实例或容器:
curl https://aws.api.smith.langchain.com/ok
GCP Private Service Connect
企业客户在 **GCP** 可以通过以下方式连接到 LangSmith 私有服务连接 (PSC),提供私有连接,无需将流量暴露于公共互联网。
服务附件 URI
使用以下服务附件 URI 在您的 VPC 中创建 PSC 端点:
| 区域 | 服务附件 URI |
|---|---|
US (us-central1) | projects/langchain-prod/regions/us-central1/serviceAttachments/gateway-psc-publish |
EU (europe-west4) | projects/langchain-prod/regions/europe-west4/serviceAttachments/gateway-psc-publish |
亚太地区 (australia-southeast1) | projects/langchain-apac-prod/regions/australia-southeast1/serviceAttachments/gateway-psc-publish |
PSC 域名
设置完成后,使用以下域名通过 PSC 连接连接到 LangSmith:
| 区域 | 域名 |
|---|---|
| US | us-central1.p.api.smith.langchain.com |
| EU | europe-west4.p.api.smith.langchain.com |
| 亚太地区 | australia-southeast1.p.api.smith.langchain.com |
设置
请求访问权限: 联系您的客户代表或 sales@langchain.dev 并提供您的 GCP 项目 ID。LangChain 会将您的项目添加到服务附件的允许消费者列表中。
授予访问权限后,使用 gcloud CLI 或 Terraform 创建 PSC 端点并配置 DNS。
创建 PSC 端点
在您的 VPC 中创建指向服务附件的转发规则:
# Create the PSC endpoint
gcloud compute forwarding-rules create langsmith-psc-endpoint \
--region= \
--network= \
--subnet= \
--target-service-attachment=projects/langchain-prod/regions//serviceAttachments/gateway-psc-publish \
--load-balancing-scheme=""
# Get the assigned IP address
gcloud compute forwarding-rules describe langsmith-psc-endpoint \
--region= \
--format="value(IPAddress)"
resource "google_compute_forwarding_rule" "langsmith_psc" {
name = "langsmith-psc-endpoint"
project = ""
region = ""
network = ""
subnetwork = ""
target = "projects/langchain-prod/regions//serviceAttachments/gateway-psc-publish"
load_balancing_scheme = ""
}
配置 DNS
在您的 VPC 中创建私有 DNS 区域,并添加指向 PSC 端点 IP 的 A 记录:
# Create a private DNS zone
gcloud dns managed-zones create langsmith-psc \
--dns-name=".p.api.smith.langchain.com." \
--visibility=private \
--networks=
# Add an A record pointing to the PSC endpoint IP
gcloud dns record-sets create ".p.api.smith.langchain.com." \
--zone=langsmith-psc \
--type=A \
--rrdatas=
resource "google_dns_managed_zone" "langsmith_psc" {
name = "langsmith-psc"
project = ""
dns_name = ".p.api.smith.langchain.com."
visibility = "private"
private_visibility_config {
networks {
network_url = ""
}
}
}
resource "google_dns_record_set" "langsmith_psc" {
name = ".p.api.smith.langchain.com."
project = ""
managed_zone = google_dns_managed_zone.langsmith_psc.name
type = "A"
ttl = 300
rrdatas = [google_compute_forwarding_rule.langsmith_psc.ip_address]
}
验证连接
从 VPC 中的 VM:
curl https://.p.api.smith.langchain.com/ok
API 速率限制
LangSmith 对 API 端点实施速率限制,以确保服务稳定性和公平使用。下表显示了 GCP 美国和 GCP 欧洲地区不同端点的速率限制。GCP 亚太地区和 AWS 美国地区执行类似的服务特定限制;如需获取您组织的具体限制,请联系支持。注意:
- - 速率限制以
count / interval表示,其中 count 是间隔(秒)内允许的请求数。例如,2000 / 10表示每 10 秒 2000 个请求。 - - 当端点列中未指定 HTTP 方法时,速率限制适用于该端点的所有 HTTP 方法。
- - 当列出特定方法(例如
POST,GET)时,速率限制仅适用于该方法。
| Match / Endpoint (method) | Identity key | US prod limit | EU prod limit | Category |
|---|---|---|---|---|
OPTIONS、 /info, */v1/metadata/submit | IP | 2000 / 10 | 2000 / 10 | 高吞吐量 |
/auth | x-api-key | 2000 / 10 | 2000 / 10 | 高吞吐量 |
/auth | x-user-id + IP | 2000 / 10 | 2000 / 10 | 高吞吐量 |
/v1/beacon | IP | 2000 / 10 | 2000 / 10 | 高吞吐量 |
/repos | x-api-key | 100 / 60 | 100 / 60 | 存储库 |
/repos | x-user-id + IP | 100 / 60 | 100 / 60 | 存储库 |
POST /runs/batch | x-api-key | 2000 / 10 | 2000 / 10 | 高吞吐量 |
POST /otel/v1/traces | x-api-key | 2000 / 10 | 2000 / 10 | 运行摄取 |
POST 包含 /charts | x-api-key | 750 / 600 | 750 / 600 | 图表 |
POST 包含 /charts | x-user-id + IP | 750 / 600 | 750 / 600 | 图表 |
POST /runs/multipart | x-api-key | 6000 / 10 | 6000 / 10 | 多部分摄取 |
POST /runs/query | x-api-key | 15 / 10 | 15 / 10 | 运行查询 (API) |
POST /runs/query | x-user-id + IP | 300 / 10 | 300 / 10 | 运行查询(用户) |
/generate | x-api-key | 30 / 3600 | 30 / 3600 | 生成 |
/generate | x-user-id + IP | 30 / 3600 | 30 / 3600 | 生成 |
/commits | x-api-key | 10000 / 60 | 2000 / 60 | 提交 |
/commits | x-user-id + IP | 10000 / 60 | 2000 / 60 | 提交 |
DELETE /sessions or */trigger | x-api-key | 10 / 60 | 10 / 60 | 删除 |
DELETE /sessions or */trigger | x-user-id + IP | 30 / 60 | 30 / 60 | 删除 |
POST /runs (单次运行摄取) | x-api-key | 2000 / 10 | 2000 / 10 | 运行摄取 |
PATCH 包含 /runs | x-api-key | 2000 / 10 | 2000 / 10 | 运行摄取 |
POST /feedback | x-api-key | 2000 / 10 | 2000 / 10 | 高吞吐量 |
GET /runs/{uuid} or /api/v1/runs/{uuid} | x-api-key | 30 / 60 | 30 / 60 | 运行查询 |
GET 包含 /examples | x-api-key | 5000 / 60 | 5000 / 60 | 示例 |
任何带有 x-api-key | x-api-key | 1000 / 10 | 1000 / 10 | 默认 (API 密钥) |
任何带有 x-user-id | x-user-id + IP | 1000 / 10 | 1000 / 10 | 默认 (用户) |
/public/download | IP | 5000 / 60 | 5000 / 60 | 公开下载 |
/runs/stats | x-api-key | 1 / 10 | 20 / 10 | 统计 |
| All other IPs (catch-all) | IP | 100 / 60 | 100 / 60 | 公开 (兜底) |
速率限制类别
- 高吞吐量: 用于身份验证、元数据和反馈等核心操作的大容量端点。
- 仓库: 仓库和提示词管理操作。
- 运行摄取: Individual trace/run ingestion endpoints for observability.
- 图表: 图表生成和可视化端点。
- 多部分摄取: 通过多部分上传进行批量运行摄取,用于大容量追踪。
- 运行查询 (API): 基于 API 密钥的运行查询操作,对复杂查询有更严格的限制。
- 运行查询 (用户): 基于用户的运行查询操作,对交互式使用有更高的限制。
- 生成: AI 驱动的代码和内容生成端点(受限以防止滥用)。
- 提交: 提示词版本控制和提交操作。
- 删除: 会话删除和工作流触发器操作。
- 运行查询: 通过 UUID 检索特定运行。
- 示例: 获取用于少样本提示的数据集示例。
- 默认 (API 密钥): 针对未匹配特定模式的身份验证 API 请求的备用速率限制。
- 默认 (用户): 针对未匹配特定模式的身份验证用户请求的备用速率限制。
- 公开下载: 用于共享资源的大容量公开下载端点。
- 统计: 运行统计和分析端点(区域性限制适用)。
- 公开 (兜底): 针对未认证公开访问的默认速率限制。
有关速率限制和其他服务限制的更多信息,请参阅 管理概述.