Archive Agent
Soft archive: the agent is retained but no longer appears in list results by default and cannot be used for new sessions. Existing sessions are not affected.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
/agents/{agent_id}/archiveSemantics
Soft archive: the response returns the full Agent object with the archived_at field populated with the archive timestamp. After archiving, the agent no longer appears in list results by default (unless include_archived=true), and cannot be used for new sessions. Existing sessions are not affected.
Path parameters
agent_idstringRequiredAgent ID, format agent_<ULID>
Response fields
idstringAgent ID
typestringAlways agent
versionintCurrent version number (archiving does not change the version)
namestringAgent name
descriptionstringDescription
systemstringSystem prompt
modelobjectModel configuration, including id and other model parameters
model properties
idstringModel ID, e.g. qwen3.7-max
enable_thinkingbooleanWhether to enable thinking mode
max_tokensintegerMaximum generation length
temperaturenumberTemperature that controls randomness
thinking_budgetintegerThinking budget length
toolsarray<object>Toolkit list, grouped by type
tools properties
typestringbuiltin_toolkit or mcp_toolkit
default_configobjectDefault tool config with enabled and permission_policy
configsarray<object>Per-tool config that overrides default_config; supports params
mcp_server_namestringRequired for MCP tools
mcp_serversarray<object>MCP server reference list
mcp_servers properties
typestringofficial or customer
namestringMCP server name
skillsarray<object>Mounted skill list
skills properties
typestringofficial or customer
skill_idstringSkill ID
versionstringMust be a concrete version number
multiagentobjectMulti-agent configuration
multiagent properties
typestringCurrently only coordinator
agentsarray<object>Fleet entries (1-20); each contains type, id, and version
metadataobjectCustom business key-value pairs that do not affect model behavior.
archived_atstringArchive timestamp, ISO 8601; this field is always non-null in the archive endpoint response
created_atstringCreation time
updated_atstringLast update time
workspace_idstringWorkspace ID
request_idstringUnique identifier for this request
Request example
curl -X POST "$AGENTSTUDIO_URL/agents/agent_xxx/archive" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
client.agents.archive("agent_xxx")
client.agents().archive("agent_xxx");
Response example
{
"type": "agent",
"id": "agent_xxx",
"name": "data-analyst",
"model": {
"id": "qwen3.8-max",
"temperature": null,
"max_tokens": null,
"enable_thinking": null,
"thinking_budget": null
},
"system": "You are a data analysis expert.",
"description": "Data analysis assistant",
"tools": [],
"mcp_servers": [],
"skills": [],
"multiagent": null,
"metadata": {},
"version": 2,
"created_at": "2026-05-28T16:23:11.456+08:00",
"updated_at": "2026-05-28T16:35:00.000+08:00",
"archived_at": "2026-05-28T16:35:00.000+08:00",
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}