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}

Path parameters

agent_idstringRequired

Agent ID, format agent_<ULID>

Query parameters

versionstringOptional

Version 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

idstring

Agent ID, format: agent_<ULID>

typestring

Always agent

versionint

Current version number, auto-incremented on each update; locked when a session is created

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 | null

Archive timestamp; null if not archived

created_atstring

Creation time (ISO 8601)

updated_atstring

Last update time (ISO 8601)

workspace_idstring

Workspace ID

request_idstring

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