Get Agent
Returns the full configuration of an agent by ID. Returns the latest version by default; use the version parameter to specify a historical version.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
/agents/{agent_id}Path parameters
agent_idstringRequiredAgent ID, format agent_<ULID>
Query parameters
versionstringOptionalVersion number (an integer string greater than or equal to 1) or latest; if omitted, returns the latest version. A positive integer string reads the fixed version snapshot.
Request example
# Default: latest version
curl "$AGENTSTUDIO_URL/agents/agent_xxx" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
# Specific version
curl "$AGENTSTUDIO_URL/agents/agent_xxx?version=3" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
# Default: latest version
agent = client.agents.retrieve("agent_xxx")
# Specific version
agent = client.agents.retrieve("agent_xxx", version=3)
// Default: latest version
Agent agent = client.agents().retrieve("agent_xxx");
// Specific version
Agent agentV2 = client.agents().retrieve("agent_xxx", 2);
Response fields
idstringAgent ID, format: agent_<ULID>
typestringAlways agent
versionintCurrent version number, auto-incremented on each update; locked when a session is created
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_atstring | nullArchive timestamp; null if not archived
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (ISO 8601)
workspace_idstringWorkspace ID
request_idstringUnique identifier for this request
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": {
"type": "coordinator",
"agents": [
{"type": "self"},
{"type": "agent", "id": "agent_researcher", "version": 3}
],
"workflows": {
"type": "enabled",
"inline_agents": {"type": "enabled"},
"predefined_agents": []
},
"reuse_workflows": {
"type": "enabled",
"workflows": [
{"id": "wf_01M7RMD9PRNVEPY2QKW1MA36TE", "version": 1}
]
}
},
"metadata": {},
"version": 1,
"created_at": "2026-05-28T16:23:11.456+08:00",
"updated_at": "2026-05-28T16:30:00.000+08:00",
"archived_at": null,
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}