文档首页/ 智果(AgentArts)智能体平台/ API参考/ API/ 评估/ 三方托管智能体调试与配置/ 获取三方托管智能体配置 - ShowOpsThirdPartyAgent
更新时间:2026-10-16 GMT+08:00
分享

获取三方托管智能体配置 - ShowOpsThirdPartyAgent

功能介绍

该接口用于获取三方托管智能体的配置信息,包含调用参数和调试状态。配置信息在调试接口调用成功后自动保存至数据库。

适用场景:

  • 查看配置:查看三方智能体已保存的调用配置信息。

  • 确认调试状态:确认三方智能体是否已调试通过,评估任务创建时需引用已调试通过的配置。

调用方法

请参见如何调用API。

授权信息

账号根用户具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。

授权项

访问级别

资源类型(*为必须)

条件键

别名

依赖的授权项

agentarts::showOpsThirdPartyAgent

Read

-

-

-

-

URI

GET /v1/ops/third-party-agents/{agent_id}

表1 路径参数

参数

是否必选

参数类型

描述

agent_id

是

String

参数解释:

合成任务的唯一标识符(ID),该参数用于在路径中指定特定的合成任务,以便执行查询、停止或删除等操作。获取方式:可通过创建合成任务接口返回的id获取,或通过查询合成任务列表接口获取。

约束限制:

不涉及。

取值范围:

1~36个字符,通常采用标准UUID格式。

默认取值:

不涉及。

表2 Query参数

参数

是否必选

参数类型

描述

type

是

String

参数解释:

调试对象类型,用于区分三方托管智能体和智能体运行时。

约束限制:

必须为枚举值之一,必填。

取值范围:

  • third_party_agent:三方托管智能体

  • agent_runtime:智能体运行时

默认取值:

不涉及。

请求参数

无

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

agent_id

String

参数解释:

三方智能体ID(来自可观测服务)。

取值范围:

不涉及。

agent_name

String

参数解释:

三方智能体名称(来自可观测服务)。

取值范围:

不涉及。

description

String

参数解释:

三方智能体配置描述,用于说明配置用途。

取值范围:

最大长度500字符。

type

String

参数解释:

调试对象类型,区分三方托管智能体和智能体运行时。

取值范围:

  • third_party_agent:三方托管智能体

  • agent_runtime:智能体运行时

agent_type

String

参数解释:

智能体类型。

取值范围:

  • workflow:工作流

  • agent:智能体

  • multiagents:多智能体

api_config

OpsThirdPartyAgentApiConfig object

参数解释:

三方托管智能体的API访问配置。

取值范围:

不涉及。

auth_config

auth_config object

参数解释:

鉴权配置,API Key脱敏返回(仅显示前4位和后4位,中间用*号替代)。

response_config

OpsThirdPartyAgentResponseConfig object

参数解释:

三方托管智能体的响应配置。

取值范围:

不涉及。

timeout

Integer

参数解释:

单次调用超时时间(秒)。

取值范围:

不涉及。

debug_status

String

参数解释:

调试状态。

取值范围:

  • NOT_DEBUGGED:未配置

  • SUCCESS:调试成功

  • FAILED:调试失败

last_debug_time

String

参数解释:

最近一次调试时间。时间格式为yyyy-MM-ddTHH:mm:ssZ,示例:2024-01-01T12:00:00Z。

取值范围:

不涉及。

last_debug_error

String

参数解释:

最近一次调试失败原因,仅debug_status为FAILED时有值。

取值范围:

不涉及。

create_time

Long

参数解释:

配置创建时间。Unix 时间戳,单位:秒。

取值范围:

不涉及。

source

String

参数解释:

智能体来源。

取值范围:

不涉及。

name

String

参数解释:

智能体名称(可观测服务返回)。

取值范围:

不涉及。

total_token

Long

参数解释:

累计Token消耗。

取值范围:

不涉及。

avg_request_count

Double

参数解释:

平均请求次数。

取值范围:

不涉及。

avg_duration_time

Double

参数解释:

平均响应耗时,单位:毫秒。

取值范围:

不涉及。

avg_fail_count

Double

参数解释:

平均失败次数。

取值范围:

不涉及。

apm_app_id

String

参数解释:

APM 应用ID。

取值范围:

不涉及。

aom_prom_id

String

参数解释:

AOM Prometheus ID。

取值范围:

不涉及。

lts_group_id

String

参数解释:

LTS 日志组ID。

取值范围:

不涉及。

lts_stream_id

String

参数解释:

LTS 日志流ID。

取值范围:

不涉及。

lts_label_name

String

参数解释:

LTS 标签名称。

取值范围:

不涉及。

apm_exporter_endpoint

String

参数解释:

APM Exporter 端点。

取值范围:

不涉及。

aom_exporter_endpoint

String

参数解释:

AOM Exporter 端点。

取值范围:

不涉及。

lts_exporter_endpoint

String

参数解释:

LTS Exporter 端点。

取值范围:

不涉及。

gateway_config

OpsThirdPartyAgentGatewayConfig object

参数解释:

三方托管智能体的网关配置,用于控制沙箱网络访问范围。

取值范围:

不涉及。

表4 OpsThirdPartyAgentApiConfig

参数

参数类型

描述

url

String

参数解释:

三方智能体的API访问地址。

取值范围:

仅支持HTTP/HTTPS协议。由英文字母、数字、特殊字符(:/.-?&=%_)组成的字符串,长度为1~2048个字符。

headers

Array of OpsThirdPartyAgentKeyValuePair objects

参数解释:

请求Header参数列表。

取值范围:

最多支持10个Header。

query_params

Array of OpsThirdPartyAgentKeyValuePair objects

参数解释:

请求Query参数列表。

取值范围:

最多支持10个Query参数。

body

OpsThirdPartyAgentRequestBodyConfig object

参数解释:

三方智能体请求Body配置。

取值范围:

不涉及。

表5 OpsThirdPartyAgentKeyValuePair

参数

参数类型

描述

key

String

参数解释:

参数名。

取值范围:

最大长度100字符。

value

String

参数解释:

参数值,支持使用{{变量名}}占位符。

取值范围:

最大长度2000字符。

description

String

参数解释:

参数描述,用于说明该参数的用途。

取值范围:

最大长度200字符。

表6 OpsThirdPartyAgentRequestBodyConfig

参数

参数类型

描述

content

String

参数解释:

请求Body模板内容,支持使用{{变量名}}占位符,运行时会替换为实际值。

取值范围:

最大长度10000字符。

表7 auth_config

参数

参数类型

描述

type

String

参数解释:

鉴权类型。

取值范围:

枚举值:

  • API_KEY:API Key鉴权

  • NONE:无需鉴权

api_key

String

参数解释:

API Key值,当type为API_KEY时必填。

取值范围:

字符串类型,最大长度500。

api_key_position

String

参数解释:

API Key传递位置,当type为API_KEY时必填。

取值范围:

枚举值:

  • HEADER:放在HTTP请求Header中

  • QUERY:放在HTTP请求Query参数中

api_key_name

String

参数解释:

API Key参数名,当type为API_KEY时必填。

取值范围:

由英文字母、数字、点(.)、连字符(-)及下划线(_)组成的字符串,长度为1~100个字符。

表8 OpsThirdPartyAgentResponseConfig

参数

参数类型

描述

type

String

参数解释:

响应类型。

取值范围:

枚举值:

STREAM(流式输出)、NON_STREAM(非流式输出)。

stream_config

OpsThirdPartyAgentStreamConfig object

参数解释:

流式响应配置,用于解析SSE流式输出。SSE的data字段为JSON字符串,需要通过匹配条件筛选目标数据,再从目标数据中提取Agent输出内容。

取值范围:

不涉及。

non_stream_config

OpsThirdPartyAgentNonStreamConfig object

参数解释:

非流式响应配置,用于从响应体中提取Agent输出。

取值范围:

不涉及。

表9 OpsThirdPartyAgentStreamConfig

参数

参数类型

描述

event_type

String

参数解释:

需要匹配的SSE事件类型,用于识别Agent输出事件。不填则匹配所有事件类型。

取值范围:

最大长度100字符。

match_condition

OpsThirdPartyAgentDataMatchCondition object

参数解释:

数据匹配条件,当data JSON中指定字段的值等于期望值时,视为目标数据,从该数据中提取Agent输出。

output_key

String

参数解释:

目标数据中Agent输出内容的字段路径,支持多级路径(如aa.bb.cc)。仅当match_condition匹配成功时,从该条数据中提取output_key对应的值作为Agent输出。

取值范围:

最大长度200字符。

end_condition

OpsThirdPartyAgentDataMatchCondition object

参数解释:

流结束匹配条件,当data JSON中指定字段的值等于期望值时,标识流式输出结束。

end_event_type

String

参数解释:

标识流式输出结束的SSE事件类型。不填则仅通过end_condition判断流结束。

取值范围:

最大长度100字符。

表10 OpsThirdPartyAgentDataMatchCondition

参数

参数类型

描述

key

String

参数解释:

data JSON字符串中用于匹配筛选的字段路径,支持多级路径(如aa.bb.cc)。

取值范围:

最大长度200字符。

value

String

参数解释:

key对应字段的期望值,当data中该字段值等于value时,视为匹配成功。

取值范围:

最大长度200字符。

表11 OpsThirdPartyAgentNonStreamConfig

参数

参数类型

描述

output_key

String

参数解释:

响应体中Agent输出内容的字段路径,支持多级路径(如data.choices[0].message.content)。

取值范围:

最大长度200字符。

表12 OpsThirdPartyAgentGatewayConfig

参数

参数类型

描述

enable_public_network

Boolean

参数解释:

是否开启公网访问。

取值范围:

  • true:开启公网访问

  • false:不开启公网访问

vpc_id

String

参数解释:

VPC ID。可通过虚拟私有云控制台获取,或通过调用查询VPC列表接口获取。

取值范围:

不涉及。

subnet_id

String

参数解释:

子网ID。可通过虚拟私有云控制台获取,或通过调用查询子网列表接口获取。

取值范围:

不涉及。

security_group_ids

Array of strings

参数解释:

安全组ID列表。可通过虚拟私有云控制台获取,或通过调用查询安全组列表接口获取。

取值范围:

不涉及。

状态码:400

表13 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表14 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

状态码:401

表15 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表16 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

状态码:403

表17 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表18 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

状态码:404

表19 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表20 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

状态码:429

表21 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表22 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

状态码:500

表23 响应Body参数

参数

参数类型

描述

error_code

String

参数解释:

系统定义的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对错误的详细描述,包含异常原因或解决建议。

取值范围:

字符长度2-512,任意文本内容。

encoded_authorization_message

String

参数解释:

编码后的授权信息,用于客户端解析权限问题。

取值范围:

Base64编码的字符串。

details

Array of OpsErrorDetail objects

参数解释:

错误详情列表,包含多个子错误的详细信息。

取值范围:

不涉及。

request_id

String

参数解释:

请求的唯一标识符,用于问题排查和链路追踪。

取值范围:

符合通用唯一识别码(UUID)标准的字符串。

表24 OpsErrorDetail

参数

参数类型

描述

error_code

String

参数解释:

子错误的标准化错误代码。

取值范围:

业务异常编码字符串。

error_msg

String

参数解释:

对子错误的详细描述。

取值范围:

任意文本内容。

请求示例

获取三方智能体的配置信息和调试状态。

GET https://api.example.com/v1/ops/third-party-agents/550e8400-e29b-41d4-a716-446655440000?type=third_party_agent

响应示例

状态码:200

{
  "agent_id" : "550e8400-e29b-41d4-a716-446655440000",
  "agent_name" : "测试智能体",
  "description" : "三方托管智能体测试",
  "type" : "third_party_agent",
  "agent_type" : "agent",
  "api_config" : {
    "url" : "https://api.example.com/api/agent/invoke",
    "headers" : [ {
      "key" : "Content-Type",
      "value" : "application/json",
      "description" : "请求内容类型"
    } ],
    "query_params" : [ {
      "key" : "version",
      "value" : "v1",
      "description" : "接口版本"
    } ],
    "body" : {
      "content" : "{\"input\": \"{{input}}\"}"
    }
  },
  "auth_config" : {
    "type" : "API_KEY",
    "api_key" : "******",
    "api_key_position" : "HEADER",
    "api_key_name" : "Authorization"
  },
  "response_config" : {
    "type" : "NON_STREAM",
    "non_stream_config" : {
      "output_key" : "data.content"
    }
  },
  "timeout" : 60,
  "debug_status" : "SUCCESS",
  "last_debug_time" : "2026-01-15T06:53:18Z",
  "last_debug_error" : "",
  "create_time" : 1768555998,
  "source" : "observability",
  "name" : "测试智能体",
  "total_token" : 1000,
  "avg_request_count" : 10,
  "avg_duration_time" : 2.5,
  "avg_fail_count" : 0,
  "apm_app_id" : "",
  "aom_prom_id" : "",
  "lts_group_id" : "",
  "lts_stream_id" : "",
  "lts_label_name" : "",
  "apm_exporter_endpoint" : "",
  "aom_exporter_endpoint" : "",
  "lts_exporter_endpoint" : "",
  "gateway_config" : {
    "enable_public_network" : true
  }
}

状态码:400

{
  "error_code" : "AgentArts.10004001",
  "error_msg" : "file_suffix is required",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.10004001",
    "error_msg" : "file_suffix is required"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码:401

{
  "error_code" : "AgentArts.100004010",
  "error_msg" : "unauthorized",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.100004010",
    "error_msg" : "unauthorized"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码:403

{
  "error_code" : "AgentArts.100004030",
  "error_msg" : "forbidden",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.100004030",
    "error_msg" : "forbidden"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码:404

{
  "error_code" : "AgentArts.10004001",
  "error_msg" : "三方智能体配置不存在",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.10004001",
    "error_msg" : "三方智能体配置不存在"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码:429

{
  "error_code" : "AgentArts.100004290",
  "error_msg" : "请求过于频繁",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.100004290",
    "error_msg" : "请求过于频繁"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码:500

{
  "error_code" : "AgentArts.03500001",
  "error_msg" : "internal error",
  "encoded_authorization_message" : "",
  "details" : [ {
    "error_code" : "AgentArts.03500001",
    "error_msg" : "internal error"
  } ],
  "request_id" : "a3f5e2b1-4c6d-4e8f-9a2b-1c3d5e7f9a2b"
}

状态码

状态码

描述

200

获取成功

400

请求参数错误

401

认证失败

403

鉴权失败

404

三方智能体配置不存在

429

请求过于频繁

500

系统错误

错误码

请参见错误码。

相关文档