AgentConnect
Agent workspace

Download a workspace file

Return the original bytes of one workspace file as an attachment. Pass sessionId to read a visible session’s working root — its isolated worktree, or the agent’s checkout when the session shares it — and repo (owner/repo) for one of the agent’s authorized additional repositories; omit both for the agent’s primary workspace. Containment, the .git rule and symlink refusal are the workspace read’s. Pass sha256, the digest prefix a shared file’s transcript marker records, to require the bytes still match it (409 WORKSPACE_FILE_CHANGED otherwise). The control plane assembles the file from bounded byte slices it proxies live from the owning daemon and stores none of it; a file over the download ceiling is refused with 413 WORKSPACE_FILE_TOO_LARGE — use the transfer route for those. 409 when the daemon or the agent’s sandbox is too old to serve bytes, 503 when the agent is unplaced or its daemon is offline.

GET
/v1/orgs/{orgId}/agents/{id}/workspace/file/download

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string

查询参数

repo?string
长度1 <= length <= 256
sessionId?string
长度1 <= length
path*string
长度1 <= length <= 4096
sha256?string
匹配^[0-9a-fA-F]{16,64}$

响应主体

application/octet-stream

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/orgs/string/agents/string/workspace/file/download?path=string"
"string"