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
POST /agents/{agent_id}/archive
Semantics
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.
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
The response is an Agent object with the same structure as the Create Agent response. The only difference is that the archived_at field is populated with the archive timestamp (no longer null). Fields:
Response fields
|
Field |
Type |
Description |
|
|
string |
Agent ID |
|
|
string |
Always |
|
|
int |
Current version number (archiving does not change the version) |
|
|
string |
Agent name, description, and system prompt |
|
|
object / array |
Model, toolkits, MCP references, skills, and business metadata |
|
|
string |
Archive timestamp, ISO 8601; this field is always non-null in the archive endpoint response |
|
|
string |
Creation / last update time |
|
|
string |
Workspace ID |
|
|
string |
Unique identifier for this request |