Skip to main content

Deploy Agent

Publish the beta draft as a new version

POST
/api/v1/indices/rag/app/deploy
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/app/deploy" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "aid-8f3a1b2c4d5e6f70",
    "agent_version_desc": "新增防泄漏功能,优化检索参数"
}'
{
  "request_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "status_code": 200,
  "code": "Success",
  "message": "",
  "status": "SUCCESS",
  "success": true,
  "data": {
    "agent_id": "aid-8f3a1b2c4d5e6f70",
    "agent_version": "2",
    "agent_status": "deployed"
  }
}
Publish the beta draft as a new version (with auto-incremented version number), changing its status to deployed.
Deploying an Agent requires the “Knowledge Base - Modify” permission.
Concurrent deployment is supported safely (underlying conflict resolution uses a database unique index plus retry-on-conflict as a fault-tolerance mechanism).

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面 获取。

Body

application/json
string
required

Agent ID。

string

本次发布的版本描述。

Response

200-application/json
string

请求唯一标识,排查问题时请提供此 ID。

integer

HTTP 状态码。

string

响应码,成功时为 Success。

string

提示信息。

enum<string>

请求状态:SUCCESS 或 FAILED。

SUCCESS,FAILED
boolean

请求是否成功。

string

Agent ID。

string

发布后的版本号,如 1、2。

string

Agent 状态,发布后为 deployed。