Skip to main content

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

GET /agents/{agent_id}

Query parameters

ParameterRequiredTypeDescription
versionNointVersion 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"

Response example

{
  "id": "agent_xxx",
  "type": "agent",
  "version": 1,
  "name": "data-analyst",
  "description": "数据分析助手",
  "model": {"id": "qwen3.7-max"},
  "system": "你是数据分析专家,使用 pandas 处理 CSV 文件。",
  "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

FieldTypeDescription
idstringAgent ID, format: agent_<ULID>
typestringAlways agent
versionintCurrent version number, auto-incremented on each update; locked when a session is created
name / description / systemstringAgent name, description, and system prompt
model / tools / mcp_servers / skills / multiagent / metadataobject / arrayModel, toolkits, MCP references, skills, multi-agent collaboration, and business metadata; structure same as at creation
archived_atstring | nullArchive timestamp; null if not archived
created_at / updated_atstringCreation / last update time, ISO 8601
workspace_idstringWorkspace ID
request_idstringUnique identifier for this request
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration