GetAgent
Retrieves the details of an agent.
Operation description
Operation description
This operation retrieves the detailed configuration information of a specified agent by its name, including model configurations, system prompts, and tool lists. You must provide the exact agent name as a request parameter.
To query a custom agent, you can first call ListCustomAgents to obtain the agent name. ListAgents returns the agents available for a session. However, you may not be able to retrieve the configurations of system agents through this operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetAgent |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the agent to retrieve. |
my-agent |
| AgentVersion |
integer |
No |
If this parameter is omitted, the current definition is retrieved. If a published version is specified, the corresponding snapshot and the fixed versions of official skills and suite artifacts are retrieved. If the current unpublished version is specified, the draft is returned, and fixed artifact versions are not returned. This parameter is different from the POP system parameter Version. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response elements. |
||
| Agent |
object |
The details of the created agent. |
|
| AgentVersion |
integer |
The definition version read in this request. When updating the current definition, use this value as the ExpectedVersion for UpdateAgent to prevent overwriting new versions submitted by other callers. The version read from a historical snapshot does not represent the current version. |
2 |
| CallableAgents |
array<object> |
The list of callable sub-agents. |
|
|
object |
|||
| DisplayName |
string |
The display name of the sub-agent. |
Sub-agent |
| Name |
string |
The name of the sub-agent. |
sub-agent |
| Source |
string |
The source of the sub-agent. |
custom |
| Version |
integer |
The version number of the sub-agent. |
1 |
| CreatorId |
string |
The ID of the creator. |
123456 |
| Description |
string |
The description. |
Data analytics assistant |
| DisplayName |
string |
The display name. |
My assistant |
| ExpertSuites |
array<object> |
The expert suites bound to the agent definition, including a fixed integer revision number or a version selection policy. Official resources continue to use PackageVersion to indicate the artifact version. |
|
|
object |
|||
| Description |
string |
If the suite is deleted, the published snapshot is missing, or the caller does not have permission to view it, the suite summary is not returned, and only the ID and version number are retained. |
Data analytics expert capability collection |
| DisplayName |
string |
The display name of the bound version. |
Data analytics expert suite |
| Name |
string |
The suite name of the bound version. |
analysis-suite |
| PackageVersion |
string |
The fixed official artifact version returned when explicitly querying a published version of the agent. This is not returned when querying a draft or a custom suite. |
0.1.0.202610211408 |
| SemanticVersion |
string |
An optional suite summary field that is not returned by current new DataAgent applications. If this field is absent, it does not indicate version 0. This field cannot be used as Version for UpdateAgent and must be omitted when writing back references. For the fixed version of official artifacts, read PackageVersion. |
1.2.0 |
| Source |
string |
OFFICIAL indicates an official catalog resource. Omitted or DB indicates a personal or enterprise resource. |
OFFICIAL |
| SuiteId |
string |
The ID of the expert suite. |
suite_example |
| Version |
integer |
Returned only when a personal or enterprise suite explicitly specifies a fixed integer version in the reference. This is not returned for official suites. An unreturned value is not 0. If the SDK initializes the default integer to 0, it must be omitted when writing back. For official items, only Source and SuiteId are written back, and Version, VersionSelector, SemanticVersion, or PackageVersion are not passed. |
3 |
| VersionSelector |
string |
Returned only for personal or enterprise resources to indicate the saved version selection policy, which is mutually exclusive with the fixed integer Version. This does not represent the specific revision actually loaded in the session. This is not returned for official resources. |
^1.2.3 |
| GmtCreateTime |
integer |
The creation timestamp, in milliseconds. |
1780555634000 |
| GmtModifiedTime |
integer |
The last modification timestamp, in milliseconds. |
1780555634000 |
| Metadata |
object |
The extended metadata. |
{} |
| Model |
object |
The model configuration. |
|
| Config |
object |
The additional configuration for the model. |
{} |
| MaxTokens |
integer |
The maximum number of output tokens per request. |
8192 |
| ModelName |
string |
The name of the model. |
qwen3-max |
| Stream |
boolean |
Specifies whether streaming output is enabled. |
true |
| Temperature |
number |
The sampling temperature. |
1 |
| TopP |
number |
The top-P value for nucleus sampling. |
1 |
| ModifierId |
string |
The ID of the last modifier. |
123456 |
| Name |
string |
The agent name. |
my-agent |
| RequiredRuntime |
array |
The environment dependencies required for execution. |
|
|
string |
Empty. |
inproc-lightweight |
|
| Skills |
array<object> |
The list of skills. |
|
|
object |
The details of the skill associated with the agent. |
||
| Name |
string |
The name of the skill. |
my-skill |
| PackageVersion |
string |
The fixed official artifact version returned when querying a published snapshot with a specified AgentVersion. This is not returned when querying a draft or a custom skill. |
0.6.0.202608201110 |
| SkillId |
string |
The ID of the official skill. |
dataworks-semantic |
| Source |
string |
OFFICIAL indicates an official catalog resource. Omitted or DB indicates an original personal or enterprise resource. |
OFFICIAL |
| Version |
integer |
The version number of the skill. |
1 |
| VersionSelector |
string |
Returned only for personal or enterprise resources to indicate the saved version selection policy, which is mutually exclusive with the fixed integer Version. This does not represent the specific revision actually loaded in the session. This is not returned for official resources. |
^1.2.3 |
| SystemPrompt |
string |
The system prompt. |
You are a data analytics assistant. |
| Tools |
array<object> |
The list of tools. |
|
|
object |
|||
| BuiltinName |
string |
The name of the built-in tool. Valid when Kind is |
builtin_sql |
| Kind |
string |
The tool type. |
builtin |
| McpItems |
array |
The selected MCP tool items. Valid when Kind is |
|
|
string |
The tool name. The default is all. |
search_table |
|
| McpServerName |
string |
The name of the associated MCP server. Valid when Kind is |
server-name |
| Visibility |
string |
The visibility level. |
TENANT |
| VisibilityScope |
object |
The visibility scope. |
|
| ProjectIds |
array |
The list of visible project IDs. |
|
|
string |
The project ID. |
proj_001 |
|
| UserIds |
array |
The list of visible user IDs. |
|
|
string |
The user ID. |
123456 |
|
| RequestId |
string |
The request ID. |
824F80BA-1778-5D8A-BAFF-668A4D9C4CC7 |
Examples
Success response
JSON format
{
"Agent": {
"AgentVersion": 2,
"CallableAgents": [
{
"DisplayName": "Sub-agent",
"Name": "sub-agent",
"Source": "custom",
"Version": 1
}
],
"CreatorId": "123456",
"Description": "Data analytics assistant",
"DisplayName": "My assistant",
"ExpertSuites": [
{
"Description": "Data analytics expert capability collection",
"DisplayName": "Data analytics expert suite",
"Name": "analysis-suite",
"PackageVersion": "0.1.0.202610211408",
"SemanticVersion": "1.2.0",
"Source": "OFFICIAL",
"SuiteId": "suite_example",
"Version": 3,
"VersionSelector": "^1.2.3"
}
],
"GmtCreateTime": 1780555634000,
"GmtModifiedTime": 1780555634000,
"Metadata": {},
"Model": {
"Config": {},
"MaxTokens": 8192,
"ModelName": "qwen3-max",
"Stream": true,
"Temperature": 1,
"TopP": 1
},
"ModifierId": "123456",
"Name": "my-agent",
"RequiredRuntime": [
"inproc-lightweight"
],
"Skills": [
{
"Name": "my-skill",
"PackageVersion": "0.6.0.202608201110",
"SkillId": "dataworks-semantic",
"Source": "OFFICIAL",
"Version": 1,
"VersionSelector": "^1.2.3"
}
],
"SystemPrompt": "You are a data analytics assistant.",
"Tools": [
{
"BuiltinName": "builtin_sql",
"Kind": "builtin",
"McpItems": [
"search_table"
],
"McpServerName": "server-name"
}
],
"Visibility": "TENANT",
"VisibilityScope": {
"ProjectIds": [
"proj_001"
],
"UserIds": [
"123456"
]
}
},
"RequestId": "824F80BA-1778-5D8A-BAFF-668A4D9C4CC7"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.