浏览电脑文件
先调用「创建计算机」,用返回的计算机 ID 替换 cmp_123。
GET
/agent/v1/computers/{computer_id}/files● 支持请求参数
computer_idstring必填path: Computer id (cmp_...), as returned by computers.create or computers.list.
pathstring可选query: 要列出的电脑目录,使用之前列表结果中 path 字段返回的绝对路径。省略则从电脑根目录列出。
返回
200
Praxis 超集:MA 只有会话级临时容器与 memory_stores,没有可长期存续、可浏览的整台电脑。归档后文件仍可读,但不能用于新会话。environment_id 是可空配方引用;电脑在首次使用时启动,sandbox_id 为 SDK 可用的公开 ID。分页包含归档电脑。
错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码
请求示例
curl
# 先调用「创建计算机」,用返回的计算机 ID 替换 cmp_123。
curl "https://api.deepraxis.com/agent/v1/computers/cmp_123/files?path=/home/user/workspace" \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# 先调用「创建计算机」,用返回的计算机 ID 替换 cmp_123。
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/computers/cmp_123/files?path=/home/user/workspace",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
// 先调用「创建计算机」,用返回的计算机 ID 替换 cmp_123。
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/computers/cmp_123/files?path=/home/user/workspace`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());响应示例 200
{
"data": [],
"has_more": false,
"tier": "light"
}响应
HTTP 200
Computer result
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| data | array<object> | Items of this page, in the order requested by the call. |
| data[].path | string | Absolute path of the entry on the computer. |
| data[].name | string | Name of the entry or object. |
| data[].type | string | Kind of entry: a file, a directory or a symbolic link. |
| data[].size | integer | Size in bytes. |
| data[].mime_type | string | MIME type of the file. |
| data[].read_only | boolean | True when the entry cannot be modified through the API. |
| data[].digest | string | null | Content digest of the file; null when not computed. |
| data[].updated_at | string | null | RFC 3339 time at which the object was last modified. |
| has_more | boolean | Whether more items exist beyond this page. |
| tier | string | Machine tier used to read this directory: light is the lightweight computer; heavy is the full computer. |