Skip to content
中文

Get Computer File Content

Call Create computer first and replace cmp_123 with its returned ID.

GET/agent/v1/computers/{computer_id}/files/content● Supported

Request parameters

  • computer_idstringrequired

    path: Computer id (cmp_...), as returned by computers.create or computers.list.

  • pathstringrequired

    query: Absolute path of the file whose content to download, as returned in the path field of computers.files.list.

Returns

200

Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Request

curl
# Call Create computer first and replace cmp_123 with its returned ID.
curl "https://api.deepraxis.com/agent/v1/computers/cmp_123/files/content?path=/home/user/workspace/sample.txt" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" --output sample.txt
Python
# Call Create computer first and replace cmp_123 with its returned 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/computers/cmp_123/files/content?path=/home/user/workspace/sample.txt",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.text)
TypeScript
// Call Create computer first and replace cmp_123 with its returned 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/computers/cmp_123/files/content?path=/home/user/workspace/sample.txt`, {
  headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.text());

Response 200

hello

Response

HTTP 200

Raw file bytes (at most 16 MiB); Content-Type is inferred from the extension. ETag is present only when a digest is available. Larger files require the sandbox connection issued by connect.

application/octet-stream

Name Type Description
$ string (binary)

HTTP 206

Single byte range

application/octet-stream

Name Type Description
$ string (binary)