Crescendo Lab Docs
English
Sign up

Deployments API reference

Platform API v1, Deployments: every operation's path, parameters, request and response fields, scopes, idempotency and errors, from the contract.

Last updated

Generated from the API contract (Agent Lab Platform API 1.0.0-alpha.1). Descriptions are the contract's own words.

What answers each channel entry point. An application deploys itself as an entry's responder, optionally with a deployed configuration: an agent configuration it publishes for the entry, which the platform runs on every event of the entry. Without one, the entry's events are delivered to the application (sdk-event/v1).

The workspace's channel deployments#

GET /v1/workspaces/{workspaceId}/deployments

Every channel entry point of the workspace and what answers it, active and disabled: an application (responder: "application"), or an assistant the console deployed (responder: "agent"). Of a deployed configuration only its agentRef, revision and time are answered. Any member may read it.

ScopesActs asAuthenticationIdempotency-Key
channels:readmemberinstallationToken—

Parameters

NameInTypeRequiredDescription
workspaceIdpathstringyesThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringyesThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
cursorquerystringnoThe nextCursor of the previous page. Opaque.
limitqueryintegernoItems per page. Default: 50.

Responses

StatusBodyDescription
200application/json: DeploymentPageA page of deployments.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Answer a channel entry point with this application#

POST /v1/workspaces/{workspaceId}/deployments

Makes the calling installation's application the responder of one entry point: a Slack workspace (entryKind: "slack", entryRef its team id), one Slack channel ("slack_channel", entryRef teamId/channelId) or a LINE official account ("line", entryRef its destination id), held by a channel connection of this workspace. The acting member must be one who may manage the workspace (MEMBER_NOT_AUTHORIZED). An entry point something already answers is ENTRY_ALREADY_DEPLOYED; one the workspace does not hold is not found.

With agent, the entry gets a deployed configuration as its revision 1: the platform runs every event of the entry with it, for the acting member, and the application's server need not be up. It is checked as POST …/runs checks a run's configuration, for the acting member, and every problem is answered at once (RUN_CONFIGURATION_INVALID); its MCP connections must be organization-shared ones, because its answers reach everyone in the channel. Without agent, the entry's events are delivered to the application as sdk-event/v1 (which needs channels:respond), and it answers them itself or with a run's replyTo.

Send Idempotency-Key: without one, a retried request may answer ENTRY_ALREADY_DEPLOYED.

ScopesActs asAuthenticationIdempotency-Key
deployments:writememberinstallationTokenaccepted

Parameters

NameInTypeRequiredDescription
workspaceIdpathstringyesThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringyesThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
Idempotency-KeyheaderstringnoMakes a creating call safe to retry. The same key and body within 24 hours answer the first answer again; the same key with a different body is 409.

Request body

application/json: DeploymentCreate

FieldTypeRequiredDescription
entryKindstringyesslack, slack_channel or line; values may be added later.
entryRefstringyesThe entry point in the channel's own terms, as createDeployment describes.
agentAgentConfigno—

Responses

StatusBodyDescription
201application/json: DeploymentThe deployment.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
409application/json: ErrorNothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes.
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
422application/json: ErrorRUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Publish a deployed configuration for an entry point#

PUT /v1/workspaces/{workspaceId}/deployments/{deploymentId}/agent

Replaces the deployed configuration of an active entry point this application answers with agent, as its next revision, when the entry still holds expectedRevision (0 for an entry with none yet); otherwise REVISION_CONFLICT and nothing changes. The replacement is atomic: an event is answered by the configuration deployed when it arrived, never by a mix, and a run already started keeps the configuration it started with. The configuration is immutable once deployed; publishing again is another revision. It is checked as createDeployment checks one, for the acting member, who must be one who may manage the workspace; its runs then act for that member. An entry of another application, a disabled one or another workspace's is not found.

ScopesActs asAuthenticationIdempotency-Key
deployments:writememberinstallationToken—

Parameters

NameInTypeRequiredDescription
workspaceIdpathstringyesThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringyesThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
deploymentIdpathstringyesThe deployment, by id.

Request body

application/json: DeployedAgentReplace

FieldTypeRequiredDescription
agentAgentConfigyes—
expectedRevisionintegeryesThe revision this replaces, as the deployment answered it; 0 for the first.

Responses

StatusBodyDescription
200application/json: DeploymentThe deployment with its new revision.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
409application/json: ErrorNothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes.
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
422application/json: ErrorRUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).