查询智能体产物版本¶
按产物ID和版本读取当前可访问的文件及来源信息。
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-artifacts/{artifact_id}/versions/{version}
调用前准备¶
BASE_URL 使用产品 API 前缀 https://api.moi.matrixorigin.cn/v5;专有部署填写对应的产品 API 地址。
请求¶
curl --request GET \
"$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts/$ARTIFACT_ID/versions/$ARTIFACT_VERSION" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID"
参数 |
位置 |
类型 |
必填 |
说明 |
|---|---|---|---|---|
|
路径 |
string |
是 |
当前环境工作区ID。 |
|
路径 |
string |
是 |
来自列表的产物ID。 |
|
路径 |
integer |
是 |
来自列表的正整数版本;不使用文件ID替代。 |
当前读取还要求产物状态completed、来源会话active、Agent未归档及可读挂载存在。结果是元数据,不返回文件字节;原来源不可向当前用户展示时,来源字段可为空。
成功响应¶
{
"code": 0,
"data": {
"workspace_id": "workspace-example",
"artifact_id": "artifact-example",
"version": 1,
"artifact_kind": "file",
"status": "completed",
"file_id": "file-example",
"placement_id": 23,
"volume_id": 10,
"file_path": "reports/summary.txt",
"file_name": "summary.txt",
"content_type": "text/plain",
"file_category": "document",
"size": 128,
"md5": "0123456789abcdef0123456789abcdef",
"agent_workspace_id": "workspace-example",
"agent_id": "agent-example",
"agent_name": "资料助手",
"conversation_id": "conversation-example",
"conversation_title": "资料整理",
"task_id": "task-example",
"call_id": "call-example",
"tool_id": "tool-example",
"created_by": "user-example",
"creator_name": "示例用户",
"source_event_id": "event-example",
"source_event_seq": 3,
"generated_at": "2026-11-12T01:00:00Z",
"created_at": "2026-11-12T01:00:00Z",
"updated_at": "2026-11-12T01:00:00Z"
}
}
字段 |
类型 |
说明 |
|---|---|---|
|
integer |
成功为0;批量动作仍需检查逐项结果。 |
|
object |
错误响应¶
错误与结果确认区分整体失败、逐项失败与来源不可见。
最后更新于