查询智能体任务模板详情

查询一个智能体任务模板的完整配置。

GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/agent-task-templates/{template_id}

调用前准备

准备个人访问令牌、工作区 ID 和模板 ID。

请求参数

curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/agent-task-templates/$TEMPLATE_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

路径参数

参数

类型

是否必填

说明

workspace_id

string

目标工作区 ID。

template_id

string

要查询的模板 ID。

成功响应

{
  "code": 0,
  "data": {"id": "template_01", "agent_id": "agent_01", "name": "摘要任务", "message_template": {}}
}

成功时返回 200 和模板配置。

响应字段如下。

字段

类型

说明

code

integer

成功时为 0

字段

类型

说明

id

string

模板 ID。

agent_id

string

关联智能体 ID。

name

string

模板名称。

message_template

object

任务消息模板。

错误响应

{"code": 5, "message": "agent task template not found"}

常见 HTTP 错误

字段

类型

说明

404

5

**常见原因:**模板不存在或当前身份不可读取。**建议操作:**核对模板 ID 和工作区。

后续操作

需要修改配置时,使用 data.id 更新智能体任务模板

最后更新于