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": "Added anti-leak feature, optimized retrieval parameters"
}'
{
  "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 (version number auto-increments), status becomes deployed.
Deploying an Agent requires Knowledge Base - Modify permission.
Supports concurrent publish safety (backed by DB unique index + conflict retry as a fault-tolerance mechanism).

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
string
required

Agent ID.

string

Version description for this deployment.

Response

200-application/json
string

Unique request identifier. Provide this ID when troubleshooting issues.

integer

HTTP status code.

string

Response code. Success on success.

string

Informational message.

enum<string>

Request status: SUCCESS or FAILED.

SUCCESS,FAILED
boolean

Whether the request succeeded.

string

Agent ID.

string

Version number after deployment, e.g. 1, 2.

string

Agent status. deployed after deployment.