Archive Agent

Updated at:

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.

Path parameters

agent_idstringRequired

Agent ID, format agent_<ULID>

Response fields

idstring

Agent ID

typestring

Always agent

versionint

Current version number (archiving does not change the version)

namestring

Agent name

descriptionstring

Description

systemstring

System prompt

modelobject

Model configuration, including id and other model parameters

model properties

idstring

Model ID, e.g. qwen3.7-max

enable_thinkingboolean

Whether to enable thinking mode

max_tokensinteger

Maximum generation length

temperaturenumber

Temperature that controls randomness

thinking_budgetinteger

Thinking budget length

toolsarray<object>

Toolkit list, grouped by type

tools properties

typestring

builtin_toolkit or mcp_toolkit

default_configobject

Default tool config with enabled and permission_policy

configsarray<object>

Per-tool config that overrides default_config; supports params

mcp_server_namestring

Required for MCP tools

mcp_serversarray<object>

MCP server reference list

mcp_servers properties

typestring

official or customer

namestring

MCP server name

skillsarray<object>

Mounted skill list

skills properties

typestring

official or customer

skill_idstring

Skill ID

versionstring

Must be a concrete version number

multiagentobject

Multi-agent configuration

multiagent properties

typestring

Currently only coordinator

agentsarray<object>

Fleet entries (1-20); each contains type, id, and version

metadataobject

Custom business key-value pairs that do not affect model behavior.

archived_atstring

Archive timestamp, ISO 8601; this field is always non-null in the archive endpoint response

created_atstring

Creation time

updated_atstring

Last update time

workspace_idstring

Workspace ID

request_idstring

Unique 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"
}