列出会话产物(扩展)
先调用「创建会话」,用返回的会话 ID 替换示例 ID。
GET
/agent/v1/sessions/{session_id}/artifacts● 支持请求参数
session_idstring必填path: Session id from session creation or listing.
返回
200
仅在 /agent/v1 提供。返回 { data: Artifact[] },按 create_time 升序。每件产物对应 outputs 目录里的一个文件,或回复里指向的一个画布或素材(part 的 kind 为 object,带 object_type、object_id、href;同一对象只有一件产物,再次被指向不加 version),含 id、name、version、parts、source_hrefs、create_time、update_time。同一路径再交付是同一个 id、version 加一。文件在回合结束后数秒才完成采集,所以产物晚于 session.status_idle 出现,请同时订阅 agent.artifact_delivered 事件。会话不存在或不可见返回 404。
错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码
请求示例
curl
# 先调用「创建会话」,用返回的会话 ID 替换示例 ID。
curl https://api.deepraxis.com/agent/v1/sessions/sesn_123/artifacts \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# 先调用「创建会话」,用返回的会话 ID 替换示例 ID。
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
f"{opts['base_url']}/v1/sessions/sesn_123/artifacts",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
// 先调用「创建会话」,用返回的会话 ID 替换示例 ID。
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/sessions/sesn_123/artifacts`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());响应示例 200
{
"data": [
{
"object": "artifact",
"id": "art_9249050b16a742c2986b705dc82370ea",
"session_id": "ags_be76892863b54ea0adc168384f0925c6",
"run_id": "run_78dc5e38-48cd-4a25-8d1d-c3bacf28b526",
"name": "weekly-report.md",
"version": 1,
"parts": [
{
"kind": "file",
"file_id": "file-B30i73NBODdI7TNcnIo55zes",
"filename": "weekly-report.md",
"mime_type": "text/markdown",
"bytes": 1599
}
],
"source_hrefs": [
"/mnt/session/outputs/weekly-report.md"
],
"create_time": "2026-11-14T14:15:01.486Z",
"update_time": "2026-11-14T14:15:01.486Z"
}
]
}响应
HTTP 200
Artifacts this session delivered
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| data | array<object> | Items of this page, in the order requested by the call. |
| data[].object | string | Object type, always artifact. |
| data[].id | string | Artifact id (art_...). Stays the same when the same path is delivered again. |
| data[].session_id | string | Id of the session. |
| data[].run_id | string | null | The run that produced this version; null when it cannot be told. |
| data[].name | string | Path of the file inside the session's outputs directory, such as report.pdf or charts/q3.png. |
| data[].version | integer | 1 on first delivery; each later delivery of the same path with new content adds one. |
| data[].parts | array<object> | The files this artifact holds; the latest version's parts only. |
| data[].source_hrefs | array<string> | Link addresses from the reply text that point at this artifact, verbatim; render a link whose address equals one of these as this artifact. |
| data[].create_time | string | When the artifact was first registered, RFC 3339; set by the service. |
| data[].update_time | string | When the latest version was registered, RFC 3339; equals create_time for version 1. |