openapi: 3.1.0 info: title: LangSmith Deployment Control Plane Agent Connections (v2) Agent Connections (v2) Agent Connections (v2) API description: 'The LangSmith Deployment Control Plane API is used to programmatically create and manage Agent Server deployments. For example, the APIs can be orchestrated to create custom CI/CD workflows. ## Host https://api.host.langchain.com ## Authentication To authenticate with the LangSmith Deployment Control Plane API, set the `X-Api-Key` header to a valid [LangSmith API key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key). ## 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`). 1. Call `GET /v2/deployments/{deployment_id}` to retrieve the Deployment. Set `deployment_id` in the URL to the value of Deployment ID (`id`). 1. Poll for revision `status` until `status` is `DEPLOYED` by calling `GET /v2/deployments/{deployment_id}/revisions/{latest_revision_id}`. 1. Call `PATCH /v2/deployments/{deployment_id}` to update the deployment. ' version: 0.1.0 tags: - name: Agent Connections (v2) paths: /v2/auth/agents/{agent_id}/connections: get: tags: - Agent Connections (v2) summary: List Connections operationId: list_connections_v2_auth_agents__agent_id__connections_get security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: agent_id in: path required: true schema: type: string description: Agent ID title: Agent Id description: Agent ID responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentConnectionListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Agent Connections (v2) summary: Create Connection operationId: create_connection_v2_auth_agents__agent_id__connections_post security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: agent_id in: path required: true schema: type: string description: Agent ID title: Agent Id description: Agent ID requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateAgentConnectionRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentConnectionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v2/auth/agents/{agent_id}/connections/{connection_id}: delete: tags: - Agent Connections (v2) summary: Remove Connection operationId: remove_connection_v2_auth_agents__agent_id__connections__connection_id__delete security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: agent_id in: path required: true schema: type: string description: Agent ID title: Agent Id description: Agent ID - name: connection_id in: path required: true schema: type: string description: Connection ID title: Connection Id description: Connection ID responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: CreateAgentConnectionRequest: properties: oauth_token_id: type: string title: Oauth Token Id type: object required: - oauth_token_id title: CreateAgentConnectionRequest HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError AgentConnectionResponse: properties: id: type: string title: Id agent_id: type: string title: Agent Id oauth_token_id: type: string title: Oauth Token Id provider_id: type: string title: Provider Id provider_account_label: anyOf: - type: string - type: 'null' title: Provider Account Label scopes: items: type: string type: array title: Scopes expires_at: anyOf: - type: string format: date-time - type: 'null' title: Expires At created_by: type: string title: Created By created_at: type: string format: date-time title: Created At type: object required: - id - agent_id - oauth_token_id - provider_id - provider_account_label - scopes - expires_at - created_by - created_at title: AgentConnectionResponse AgentConnectionListResponse: properties: data: items: $ref: '#/components/schemas/AgentConnectionResponse' type: array title: Data type: object required: - data title: AgentConnectionListResponse securitySchemes: LangSmith API Key: type: apiKey in: header name: X-Api-Key