创建智能体运行时。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
agentrun:CreateAgentRuntime |
create |
*Agent
|
无 | 无 |
请求语法
POST /2025-09-10/agents/runtimes HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body | CreateAgentRuntimeInput |
是 |
创建代理运行时请求参数 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
| AgentRuntimeResult |
创建、获取代理运行时的结果格式 |
示例
正常返回示例
JSON格式
{
"code": "SUCCESS",
"requestId": "F8A0F5F3-0C3E-4C82-9D4F-5E4B6A7C8D9E",
"data": {
"agentRuntimeId": "ar-1234567890abcdef",
"agentRuntimeName": "my-agent-runtime",
"agentRuntimeArn": "acs:agentrun:cn-hangzhou:1760720386195983:runtimes/7a1b6d39-9f8f-4ce2-b9c9-6db1b0b9e169",
"createdAt": "2025-01-10T10:30:00Z",
"status": "READY",
"statusReason": "Runtime is ready for use",
"lastUpdatedAt": "2025-01-10T11:45:00Z",
"description": "AI agent runtime for customer service automation",
"executionRoleArn": "acs:ram::1760720386195983:role/AgentRunExecutionRole",
"credentialName": "my-credential",
"externalAgentEndpointUrl": "https://external-agent.example.com/api",
"agentRuntimeVersion": "1",
"artifactType": "Code",
"codeConfiguration": {
"zipFile": "UEsDBAoAAAAAANF",
"ossBucketName": "my-agent-code-bucket",
"ossObjectName": "agent-code-v1.0.zip",
"checksum": "1234567890123456789",
"language": "python3.12",
"command": [
""
]
},
"containerConfiguration": {
"image": "registry.cn-hangzhou.aliyuncs.com/my-namespace/agent-runtime:latest",
"imageRegistryType": "ACR",
"acrInstanceId": "cri-xxxxx",
"command": [
"/usr/local/bin/entrypoint.sh"
],
"registryConfig": {
"authConfig": {
"userName": "admin",
"password": "abc***"
},
"certConfig": {
"insecure": false,
"rootCaCertBase64": "cm9vdF9jYV9jZXJ0X2Jhc2U2NA=="
},
"networkConfig": {
"vpcId": "vpc-xxxxxxxxxxxxx",
"vSwitchId": "vsw-xxxxxxxxxxxxx",
"securityGroupId": "sg-xxxxxxxxxxxxx"
}
},
"port": 5000
},
"networkConfiguration": {
"networkMode": "PRIVATE",
"vpcId": "vpc-1234567890abcdef0",
"securityGroupId": "sg-1234567890abcdef0",
"vswitchIds": [
"vsw-sg-1234567890abcdef0"
]
},
"protocolConfiguration": {
"type": "HTTP",
"protocolSettings": [
{
"type": "",
"name": "",
"config": "",
"path": "",
"pathPrefix": "",
"headers": "",
"method": "",
"inputBodyJsonSchema": "",
"outputBodyJsonSchema": "",
"requestContentType": "",
"responseContentType": "",
"A2AAgentCard": "",
"a2aAgentCard": "",
"a2aAgentCardUrl": ""
}
]
},
"cpu": 2,
"memory": 2048,
"diskSize": 0,
"port": 8080,
"sessionConcurrencyLimitPerInstance": 100,
"logConfiguration": {
"project": "agent-runtime-logs",
"logstore": "agent-runtime-logs"
},
"healthCheckConfiguration": {
"httpGetUrl": "/ready",
"initialDelaySeconds": 30,
"periodSeconds": 30,
"timeoutSeconds": 3,
"failureThreshold": 3,
"successThreshold": 1
},
"sessionIdleTimeoutSeconds": 3600,
"enableSessionIsolation": false,
"resourceGroupId": "",
"workspaceId": "ws-1234567890abcdef",
"nasConfig": {
"groupId": 100,
"mountPoints": [
{
"enableTLS": true,
"mountDir": "/home/test",
"serverAddr": "***-uni85.cn-hangzhou.nas.com:/"
}
],
"userId": 100
},
"ossMountConfig": {
"mountPoints": [
{
"bucketName": "my-bucket",
"bucketPath": "/my-dir",
"endpoint": "http://oss-cn-shanghai.aliyuncs.com",
"mountDir": "/mnt/dir",
"readOnly": true
}
]
},
"environmentVariables": {
"key": ""
},
"systemTags": [
""
],
"edition": ""
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?