Get Agent
Updated at:
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
GET /agents/{agent_id}
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
version | No | int | Version number to retrieve; returns the latest version if not specified |
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 example
{
"id": "agent_xxx",
"type": "agent",
"version": 1,
"name": "data-analyst",
"description": "Data analysis assistant",
"model": {"id": "qwen3.7-max"},
"system": "You are a data analysis expert who uses pandas to process CSV files.",
"tools": [],
"mcp_servers": [],
"skills": [],
"multiagent": {
"type": "coordinator",
"agents": [
{"type": "self"},
{"type": "agent", "id": "agent_researcher", "version": 3}
]
},
"metadata": {"team": "data"},
"created_at": "2026-05-28T16:23:11.456+08:00",
"updated_at": "2026-05-28T16:23:11.456+08:00",
"archived_at": null,
"workspace_id": "ws_xxx",
"request_id": "req_xxx"
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Agent ID, format: agent_<ULID> |
type | string | Always agent |
version | int | Current version number, auto-incremented on each update; locked when a session is created |
name / description / system | string | Agent name, description, and system prompt |
model / tools / mcp_servers / skills / multiagent / metadata | object / array | Model, toolkits, MCP references, skills, multi-agent collaboration, and business metadata; structure same as at creation |
archived_at | string | null | Archive timestamp; null if not archived |
created_at / updated_at | string | Creation / last update time, ISO 8601 |
workspace_id | string | Workspace ID |
request_id | string | Unique identifier for this request |
Is this page helpful?