Crescendo Lab 文档
简体中文
注册开始用

Conversations API 参考

Platform API v1 的 Conversations:每个操作的路径、参数、请求与回应字段、scope、幂等与错误,直接取自 API 合约。

最后更新

由 API 合约(Agent Lab Platform API 1.0.0-alpha.1)产生。说明文本是合约的英文原文。

Members' conversations, read and kept as the acting member: reading what was said needs the restricted conversations:read, as does searching them, listing what automation started and reading their files; changing where a conversation sits on its member's shelf, and archiving a departed member's file, needs conversations:write.

The conversations people started#

GET /v1/workspaces/{workspaceId}/conversations

The conversations members started, newest activity first, as the acting member's shelf shows them: their own, or every member's for a member who may read any conversation (owners and administrators). Conversations automation started are listed by GET …/conversations/background; evaluation runs' are not listed. archived=true lists what was put away instead; the two lists page separately. conversations:read is restricted: no installation holds it until the platform has reviewed the application.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
cursorquerystring否The nextCursor of the previous page. Opaque.
limitqueryinteger否Items per page. 默认值: 50.
archivedqueryboolean否List the archived conversations instead. 默认值: false.

回应

状态码内容说明
200application/json: ConversationPageA page of conversations.
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).

A conversation and what was said in it#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}

The conversation and every message in it, oldest first. Readable by the member who started it, and by a member who may read any conversation, whose read is recorded in the workspace's audit log with the application beside them; anyone else's is not found, as is one of another workspace. Reading does not mark it read; PATCH with seen: true does. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.

回应

状态码内容说明
200application/json: ConversationDetailThe conversation.
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).

Rename, pin, archive or mark a conversation read#

PATCH /v1/workspaces/{workspaceId}/conversations/{conversationId}

Changes where the conversation sits on its member's shelf; only what is sent changes. Only the member who started it changes it: anyone else's conversation is not found, as is one of another workspace. Pinning is for conversations people started, and archiving one unpins it. The changes are made one at a time in this order: archived: false, pinned, archived: true, title, seen; a refusal (such as PIN_LIMIT_REACHED) leaves the ones before it made, so read the conversation again before retrying.

Scope身分验证方式Idempotency-Key
conversations:writememberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.

请求内容

application/json: ConversationStateChange

字段类型必填说明
titlestring否The member's own name for it; empty clears it back to the generated one.
pinnedboolean否—
archivedboolean否Archiving also unpins it.
seenboolean否The member opened it. Nothing marks a conversation unread. 可用值: true.

回应

状态码内容说明
200application/json: ConversationThe conversation as it is now.
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: ErrorThe change cannot be made as asked: PIN_LIMIT_REACHED, the member has pinned as many conversations as they may (configure: unpin one first); CONVERSATION_ARCHIVED, an archived conversation cannot be pinned without archived: false in the same change (none).
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Find conversations by what was said in them#

GET /v1/workspaces/{workspaceId}/conversations/search

The conversations the acting member may list (their own, or every member's for a member who may read any conversation) whose messages contain every word of query, ignoring case, newest activity first. The newest 200 conversations are searched, and searched says how many were, so an empty items tells "nothing matched" from "nothing to search". A member who may read any conversation searching other members' conversations is recorded in the workspace's audit log with the application beside them (the count, never the term); when that cannot be recorded nothing is answered (503). conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
queryquerystring是The words to find; not blank, at most 200 characters.

回应

状态码内容说明
200application/json: ConversationSearchThe conversations that matched.
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).

The conversations automation started#

GET /v1/workspaces/{workspaceId}/conversations/background

The conversations schedules and triggers started, newest activity first, each with how its run ended and what started it: the acting member's own, or every member's for a member who may read any conversation. Read one with GET …/conversations/{conversationId}. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
cursorquerystring否The nextCursor of the previous page. Opaque.
limitqueryinteger否Items per page. 默认值: 50.

回应

状态码内容说明
200application/json: BackgroundConversationPageA page of background conversations.
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).

How each schedule and trigger has been doing#

GET /v1/workspaces/{workspaceId}/conversations/background/summary

The newest window background conversations the acting member may list, grouped by the schedule or trigger that started them, with how their runs ended. The counts describe that window, not a source's whole history. Conversations naming no source are counted in unattributedCount. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.

回应

状态码内容说明
200application/json: BackgroundConversationSummaryThe summary.
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).

How many background results the member has not opened#

GET /v1/workspaces/{workspaceId}/conversations/background/unseen

How many of the acting member's own newest window background conversations hold a result they have not opened; the member's own for an administrator too. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.

回应

状态码内容说明
200application/json: BackgroundConversationUnseenThe count.
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).

Tools that wait for the member's own credential#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/pending-authorizations

The tools in the conversation that would refuse the member who started it until that member connects their own credential for them. A tool that acts with the workspace's credential is not listed. Readable by the member who started it and by a member who may read any conversation; anyone else's is not found, as is one of another workspace. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.

回应

状态码内容说明
200application/json: PendingAuthorizationListThe tools waiting for a credential.
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).

Every file attached in a conversation#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments

The files members attached in the conversation, without their content, and whether the member who attached them is still a member. For a member who may read any conversation (owners and administrators), whatever conversation it is; anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. The member who attached a file reads it in the conversation's messages. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.

回应

状态码内容说明
200application/json: ConversationAttachmentInventoryThe files.
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).

A file the member attached#

GET /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}

The file as it was attached, base64-encoded, for the member who started the conversation. Anyone else's, including a member who may read any conversation, is not found: they use POST …/export, which is recorded. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.
attachmentIdpathstring是A file attached in the conversation, by id.

回应

状态码内容说明
200application/json: ConversationAttachmentContentThe file.
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).

Export a file attached in any conversation#

POST /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}/export

The file as it was attached, base64-encoded, for a member who may read any conversation (owners and administrators). The export is recorded in the workspace's audit log as the acting member's, with the application beside them, before anything is answered; when it cannot be recorded nothing is answered. Anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. conversations:read is restricted.

Scope身分验证方式Idempotency-Key
conversations:readmemberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.
attachmentIdpathstring是A file attached in the conversation, by id.

回应

状态码内容说明
200application/json: ConversationAttachmentContentThe file.
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).

Archive a file whose uploader has left#

POST /v1/workspaces/{workspaceId}/conversations/{conversationId}/attachments/{attachmentId}/archive

Marks a file archived once the member who attached it is no longer a member of the workspace; the file is kept and can still be exported. Recorded in the workspace's audit log as the acting member's, with the application beside them. Needs a member who may read any conversation and manage the workspace; anyone else is refused (MEMBER_NOT_AUTHORIZED) before the conversation is looked up. A file whose uploader is still a member is not found, as one that does not exist. Archiving an archived file changes nothing.

Scope身分验证方式Idempotency-Key
conversations:writememberinstallationToken—

参数

名称位置类型必填说明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The 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.
conversationIdpathstring是The conversation, by id.
attachmentIdpathstring是A file attached in the conversation, by id.

回应

状态码内容说明
204—Archived.
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).