Skip to main content
Agent

获取 Agent

获取指定 Agent 的详细信息。

请求头

头部必选说明
AuthorizationBearer <PAT>

路径参数

参数类型必选说明
agent_idstringAgent 唯一标识,格式为 "agent_" 前缀加 UUID

示例请求

curl -X GET "https://api.qoder.com.cn/api/v1/cloud/agents/agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "type": "agent",
  "id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "name": "doc-test-agent",
  "description": "",
  "model": "ultimate",
  "system": "你是文档测试助手",
  "instructions": "你是文档测试助手",
  "tools": [],
  "mcp_servers": [],
  "default_environment": "",
  "version": 1,
  "archived": false,
  "archived_at": null,
  "created_at": "2026-05-18T15:26:39.61669Z",
  "updated_at": "2026-05-18T15:26:39.61669Z"
}

响应字段

字段

类型

说明

type

string

固定值 "agent"

id

string

Agent 唯一标识

name

string

Agent 名称

description

string

Agent 描述

model

string

模型标识

instructions

string

系统提示词

system

string

instructions 的别名(已弃用,建议使用 instructions

tools

array

工具配置列表

mcp_servers

array

MCP 服务器配置

default_environment

string

默认运行环境

version

integer

当前版本号

archived

boolean

是否已归档

archived_at

string|null

归档时间(ISO 8601),未归档时为 null

created_at

string

创建时间(ISO 8601)

updated_at

string

最后更新时间(ISO 8601)

错误码

HTTPtype触发条件
401authentication_errorPAT 无效或过期
403permission_error无权限访问此 Agent
404not_found_error指定 ID 的 Agent 不存在
错误响应示例:
{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "Agent 'agent_nonexistent' was not found."
  }
}

操作指南