归档 Agent
curl --request POST \
--url https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "agent_01911111-1111-7111-8111-111111111111",
"type": "agent",
"name": "support-agent",
"description": null,
"model": {
"id": "glm-5.3",
"effort": "max",
"speed": "standard"
},
"system": null,
"tools": [
{
"type": "agent_toolset_20260601"
}
],
"skills": [],
"mcp_servers": [],
"metadata": {},
"multiagent": null,
"version": 1,
"created_at": "2026-08-31T08:00:00.000Z",
"updated_at": "2026-08-31T08:00:00.000Z",
"archived_at": null
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": {}
},
"request_id": "req_01J..."
}Agent
归档 Agent
归档指定 Agent。该操作仅限所有者且幂等,并会同时归档其仍在运行的 Deployment;归档是 Agent 的终止操作。点击 Try it 按钮可快速试用。
POST
/
agent
/
managed
/
v1
/
agents
/
{agentId}
/
archive
归档 Agent
curl --request POST \
--url https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/managed/v1/agents/{agentId}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "agent_01911111-1111-7111-8111-111111111111",
"type": "agent",
"name": "support-agent",
"description": null,
"model": {
"id": "glm-5.3",
"effort": "max",
"speed": "standard"
},
"system": null,
"tools": [
{
"type": "agent_toolset_20260601"
}
],
"skills": [],
"mcp_servers": [],
"metadata": {},
"multiagent": null,
"version": 1,
"created_at": "2026-08-31T08:00:00.000Z",
"updated_at": "2026-08-31T08:00:00.000Z",
"archived_at": null
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": {}
},
"request_id": "req_01J..."
}Headers
Managed Agents API 协议版本,固定为 2026-05-26。
Available options:
2026-05-26 Example:
"2026-05-26"
必须包含 managed-agents-2026-05-26;可与其他 beta 标识用逗号分隔。
Example:
"managed-agents-2026-05-26"
Path Parameters
agentId 资源标识。
Response
请求成功。
Agent ID。
Example:
"agent_01911111-1111-7111-8111-111111111111"
Available options:
agent 用途说明。
Show child attributes
Show child attributes
系统提示词。
- agent_toolset_20260601
- mcp_toolset
- custom
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
客户端自定义元数据;省略时默认为空对象。最多 16 个键,键名长度不超过 64 字符,值必须是长度不超过 512 字符的字符串。
Show child attributes
Show child attributes
Required range:
x >= 0创建时间。
更新时间。
归档时间;未归档时为 null。
当前暂未支持,默认为 null。
Was this page helpful?