AgentConnect
Agent workspace

Download a session file

Return the original bytes of one file from a session’s working root — its isolated worktree, or the agent’s checkout when the session shares it — as an attachment. The file must sit under uploads/ (where inbound attachments land), or be named together with sha256, the digest prefix a shared file’s transcript marker records; the bytes must still match that digest (409 WORKSPACE_FILE_CHANGED otherwise). The agent and the session must both be visible to the caller (404 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. 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

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orgId*string
id*string

Query Parameters

sessionId*string
Length1 <= length
path*string
Length1 <= length <= 4096
sha256?string
Match^[0-9a-fA-F]{16,64}$

Response Body

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?sessionId=string&path=string"
"string"