Skip to main content
Deployment

创建 Deployment

创建一个新的部署,绑定 Agent 与触发方式

POST
/api/v1/agentstudio/deployments
cURL
curl --request POST \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/deployments' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "每日订单汇总",
  "agent": {
    "id": "agent_xxx",
    "version": 12
  },
  "environment_id": "env_xxx",
  "schedule": {
    "type": "cron",
    "expression": "0 9 * * 1-5",
    "timezone": "Asia/Shanghai"
  },
  "initial_events": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "汇总昨日订单数据"
        }
      ]
    }
  ]
}
'
{
  "id": "depl_xxx",
  "type": "deployment",
  "name": "每日订单汇总",
  "status": "active",
  "agent": {
    "id": "agent_xxx",
    "version": 12
  },
  "environment_id": "env_xxx",
  "schedule": {
    "type": "cron",
    "expression": "0 9 * * 1-5",
    "timezone": "Asia/Shanghai",
    "last_run_at": null,
    "next_run_at": "2026-07-28T01:00:00Z"
  },
  "initial_events": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "汇总昨日订单数据"
        }
      ]
    }
  ],
  "resources": [],
  "vault_ids": [],
  "metadata": {},
  "paused_reason": null,
  "archived_at": null,
  "created_at": "2026-07-28T01:00:00Z",
  "updated_at": "2026-07-28T01:00:00Z",
  "request_id": "req_xxx"
}

Authorizations

string
header
required

DashScope API Key

Body

application/json
string
required

Deployment 名称,最长 256 字符

object
required

关联的 Agent

object[]
required

触发时发送给 Agent 的初始事件列表,1-50 项

string

部署用途描述

string

关联的 Environment ID

object

定时触发配置;不传则为手动触发

object[]

挂载文件资源列表

string[]

关联的 Vault ID 列表

object

业务自定义键值对

Response

200-application/json
string

Deployment ID

string

固定值 deployment

string

Deployment 名称

string

部署用途描述

object
string
object
object[]
object[]
string[]
object
enum<string>
active,paused
object | null
string | null
string
string
string
RAG API
Connector API
Memory API
框架集成
  • 框架