Skip to content

Computers

Create cloud computers, run commands on them, move files, and read usage.

OperationRequest
Get computer usageGET /v1/computer-usage
List computersGET /v1/computers
Create computerPOST /v1/computers
Get computer capabilitiesGET /v1/computers/capabilities
Remove computer named capabilitiesDELETE /v1/computers/capabilities
Get computerGET /v1/computers/{id}
Delete computerDELETE /v1/computers/{id}
Create computer commandPOST /v1/computers/{id}/commands
Get computer commandGET /v1/computers/{id}/commands/{command}
Cancel computer commandPOST /v1/computers/{id}/commands/{command}/cancel
Attach computer commandGET /v1/computers/{id}/commands/{command}/output
Prepare computer credential referencePOST /v1/computers/{id}/credential-references
Get computer credential referenceGET /v1/computers/{id}/credential-references/{reference}
Revoke computer credential referenceDELETE /v1/computers/{id}/credential-references/{reference}
Read a workspace fileGET /v1/computers/{id}/files
Upload a workspace filePUT /v1/computers/{id}/files
Stop computerPOST /v1/computers/{id}/stop
Wake computerPOST /v1/computers/{id}/wake

Get computer usage

GET /v1/computer-usage · getComputerUsage

Read usage for the authenticated account with cloud access. Uses the same account permissions as computer reads. Account owner and payer headers are ignored; job credentials are refused. Accepted requests and observed results are separate events. Missing provider seconds remain unknown. Allocation allowances are operator limits, not customer charges; retail pricing is not enabled.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
afterqueryintegerNo

The previous response's after value. Events remain scoped to this account.

limitqueryintegerNo

Response

200 — Account computer usage result.

Type: AppComputerUsage

FieldTypeRequiredDescription
schemaalways "openagents.computers.usage.v1"Yes
eventsarray of AppComputerUsageEventYes
events[].sequenceintegerYes
events[].computerstringYes
events[].kindone of "accepted", "observed", "meter", "resolution"Yes
events[].sizestringYes
events[].shapeobject or nullYes
events[].shape.vcpusintegerYes
events[].shape.memory_mibintegerYes
events[].shape.min_disk_gibinteger or nullYes
events[].bootinteger or nullYes
events[].phasestringYes
events[].desiredone of "running", "stopped", "deleted"Yes
events[].observed_msintegerYes
events[].provider_secondsinteger or nullYes
events[].measurementone of "unknown", "reported"Yes
events[].runningboolean or nullYes
events[].storageobjectYes
events[].storage.resource_deletedboolean or nullYes
events[].storage.bytesinteger or nullYes
events[].storage.checkpoint_recordsinteger or nullYes
afterintegerYes
allocation_allowanceobjectYes
allocation_allowance.held_cpu_msinteger or nullYes
allocation_allowance.settled_cpu_msintegerYes
allocation_allowance.unknown_allowancesintegerYes
allocation_allowance.unresolved_allowancesintegerYes
customer_chargenullYes
pricingalways "not_enabled"Yes

Errors

StatusMeaningBody
400, 401, 403, 503

Account computer usage result.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computer-usage' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

List computers

GET /v1/computers · listComputers

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
kindqueryone of "cloud"No

Select only cloud computers. Without this, keep the existing list of your own computers and add your cloud computers when available.

limitqueryintegerNo

Cloud page size.

afterquerystringNo

The previous next_cursor; scoped to the same account.

Response

200 — The requested computer result.

Type: AppComputerList

FieldTypeRequiredDescription
computersarray of AppComputer or AppEnrolledComputerYes
next_cursorstring or nullYes

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Create computer

POST /v1/computers · createComputer

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringNo

One logical request key; required in the header or body and reused across retries. Conflicting settings return 409.

Request body

Content type: application/json

Type: AppCreateComputer

FieldTypeRequiredDescription
chatstring or nullNo

An existing chat owned by this account.

sizestring or nullNo

Default: "small".

environmentstring or nullNo
versionstring or nullNo

The saved version number, paired with environment.

idempotency_keystring or nullNo

Required here or in Idempotency-Key; both must match. Keep the key bound to the immutable request after completion or deletion.

placementone of null, "auto", "our-cloud", "fast-sandbox", "enrolled"No

The service uses the kind you choose or refuses the request. You cannot add a computer you already own here yet.

needsAppComputerNeeds or nullNo
egress_profilestring or nullNo

Use an exact name@sha256:HASH value from capabilities. A value that isn't offered is refused.

enrolled_hoststring or nullNo

Reserved. Non-null host selections are currently refused.

Response

200 — The requested computer result.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl -X POST 'https://api.openagents.com/v1/computers' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "size": "small"
}'

In the Rust SDK

Get computer capabilities

GET /v1/computers/capabilities · getComputerCapabilities

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Response

200 — The requested computer result.

Type: AppComputerCapabilities

FieldTypeRequiredDescription
schemaalways "openagents.computers.capabilities.v1"Yes
profilesarray of stringYes
sizesarray of stringYes
limitsobjectYes
limits.max_computersalways 20Yes
placementsarray of AppPlacementCapabilitiesNo
placements[].placementone of "our-cloud", "fast-sandbox"Yes
placements[].offersarray of AppPlacementOfferYes
placements[].offers[].profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
placements[].offers[].sizesarray of stringYes
placements[].offers[].shapesobjectYes
placements[].offers[].memory_suspendbooleanYes
placements[].offers[].command_sessionsbooleanYes
placements[].offers[].credential_proxybooleanNo
placements[].offers[].egress_profilestring or nullNo
placements[].offers[].workspace_file_bytesinteger or nullYes
placements[].offers[].default_environment_availablebooleanYes
default_placementone of null, "our-cloud", "fast-sandbox"No
filesobject or nullNo

Absent or null means protected file transfer is unsupported. Do not infer support from the backend name.

files.max_bytesintegerYes
files.max_path_bytesalways 1024Yes
files.max_concurrent_transfersalways 2Yes
files.timeout_secondsalways 60Yes
files.requires_awakealways trueYes

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers/capabilities' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Remove computer named capabilities

DELETE /v1/computers/capabilities · removeComputerNamedCapabilities

Remove a computer named capabilities from your list. Its files and synced chats stay. Cloud access is not required.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Response

204 — The computer name was removed from your list.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl -X DELETE 'https://api.openagents.com/v1/computers/capabilities' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

Get computer

GET /v1/computers/{id} · getComputer

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Response

200 — The requested computer result.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers/{id}' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Delete computer

DELETE /v1/computers/{id} · deleteComputer

Cloud IDs request deletion (202); names of your own computers are removed from your list (204). Read a cloud computer to check when deletion is finished.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
kindqueryone of "cloud"No

Select cloud deletion explicitly, including when one of your own computers has the same name. Without this, an existing computer name is removed from your list.

Response

200 — The requested computer result.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

204 — The computer name was removed from your list. Its files and synced chats stay.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl -X DELETE 'https://api.openagents.com/v1/computers/{id}' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Create computer command

POST /v1/computers/{id}/commands · createComputerCommand

Account-authenticated Boat commands. Creation queues execution with output capture already configured. Attach reads saved output and never starts or cancels work. Poll from the returned byte offsets; each request checks current authority. No URL tokens. Unknown execution is never replayed. Output expires seven days after creation; each stream retains its first 256 KiB and reports discarded bytes with gaps. Cancellation is intent until an observed exit. Origin, if supplied, must match this deployment.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
Idempotency-KeyheaderstringNo

Required in the header or body; when both are sent they must match.

Request body

Content type: application/json

Type: AppCreateCommand

FieldTypeRequiredDescription
commandstringYes

Shell command. Do not put credentials in command text.

cwdstringNo

Existing directory relative to the computer workspace; traversal and symlink escape refuse. Default: ".".

timeout_secondsintegerNo

Default: 600.

envobjectNo

Non-secret values only. Names: LANG, LC_ALL, TZ, CI, TERM, or OA_PARAM_*; credential fields refuse.

idempotency_keystringNo

Required here or as Idempotency-Key. Reuse across retries.

credential_refstringNo

Optional reference prepared by the server for this account, computer, command, and request key. Credential values cannot be sent here. It expires after ten minutes. Credentials stay in memory; a restart can make a waiting command fail.

Response

200 — The command or saved output.

Type: AppCommand

FieldTypeRequiredDescription
idstringYes
computerstringYes
stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
digeststringYes
exit_codeinteger or nullYes
cancel_requestedbooleanYes
created_unixintegerNo
started_unixinteger or nullNo
finished_unixinteger or nullNo
output_expires_unixintegerYes
output_limit_bytesalways 262144Yes
stdout_truncatedbooleanYes
stderr_truncatedbooleanYes
stdout_bytesintegerNo
stderr_bytesintegerNo

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppCommand

FieldTypeRequiredDescription
idstringYes
computerstringYes
stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
digeststringYes
exit_codeinteger or nullYes
cancel_requestedbooleanYes
created_unixintegerNo
started_unixinteger or nullNo
finished_unixinteger or nullNo
output_expires_unixintegerYes
output_limit_bytesalways 262144Yes
stdout_truncatedbooleanYes
stderr_truncatedbooleanYes
stdout_bytesintegerNo
stderr_bytesintegerNo

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 410, 413, 429, 503

The command or saved output.

AppAccountError

Example

curl -X POST 'https://api.openagents.com/v1/computers/{id}/commands' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "command": "sha256sum input.bin",
  "timeout_seconds": 30
}'

In the Rust SDK

Get computer command

GET /v1/computers/{id}/commands/{command} · getComputerCommand

Account-authenticated Boat commands. Creation queues execution with output capture already configured. Attach reads saved output and never starts or cancels work. Poll from the returned byte offsets; each request checks current authority. No URL tokens. Unknown execution is never replayed. Output expires seven days after creation; each stream retains its first 256 KiB and reports discarded bytes with gaps. Cancellation is intent until an observed exit. Origin, if supplied, must match this deployment.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
commandpathstringYes

Response

200 — The command or saved output.

Type: AppCommand

FieldTypeRequiredDescription
idstringYes
computerstringYes
stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
digeststringYes
exit_codeinteger or nullYes
cancel_requestedbooleanYes
created_unixintegerNo
started_unixinteger or nullNo
finished_unixinteger or nullNo
output_expires_unixintegerYes
output_limit_bytesalways 262144Yes
stdout_truncatedbooleanYes
stderr_truncatedbooleanYes
stdout_bytesintegerNo
stderr_bytesintegerNo

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 410, 413, 429, 503

The command or saved output.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers/{id}/commands/{command}' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Cancel computer command

POST /v1/computers/{id}/commands/{command}/cancel · cancelComputerCommand

Account-authenticated Boat commands. Creation queues execution with output capture already configured. Attach reads saved output and never starts or cancels work. Poll from the returned byte offsets; each request checks current authority. No URL tokens. Unknown execution is never replayed. Output expires seven days after creation; each stream retains its first 256 KiB and reports discarded bytes with gaps. Cancellation is intent until an observed exit. Origin, if supplied, must match this deployment.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
commandpathstringYes

Response

200 — The command or saved output.

Type: AppCommand

FieldTypeRequiredDescription
idstringYes
computerstringYes
stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
digeststringYes
exit_codeinteger or nullYes
cancel_requestedbooleanYes
created_unixintegerNo
started_unixinteger or nullNo
finished_unixinteger or nullNo
output_expires_unixintegerYes
output_limit_bytesalways 262144Yes
stdout_truncatedbooleanYes
stderr_truncatedbooleanYes
stdout_bytesintegerNo
stderr_bytesintegerNo

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppCommand

FieldTypeRequiredDescription
idstringYes
computerstringYes
stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
digeststringYes
exit_codeinteger or nullYes
cancel_requestedbooleanYes
created_unixintegerNo
started_unixinteger or nullNo
finished_unixinteger or nullNo
output_expires_unixintegerYes
output_limit_bytesalways 262144Yes
stdout_truncatedbooleanYes
stderr_truncatedbooleanYes
stdout_bytesintegerNo
stderr_bytesintegerNo

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 410, 413, 429, 503

The command or saved output.

AppAccountError

Example

curl -X POST 'https://api.openagents.com/v1/computers/{id}/commands/{command}/cancel' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Attach computer command

GET /v1/computers/{id}/commands/{command}/output · attachComputerCommand

Account-authenticated Boat commands. Creation queues execution with output capture already configured. Attach reads saved output and never starts or cancels work. Poll from the returned byte offsets; each request checks current authority. No URL tokens. Unknown execution is never replayed. Output expires seven days after creation; each stream retains its first 256 KiB and reports discarded bytes with gaps. Cancellation is intent until an observed exit. Origin, if supplied, must match this deployment.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
commandpathstringYes
stdoutqueryintegerNo
stderrqueryintegerNo
max_bytesqueryintegerNo
wait_msqueryintegerNo

Response

200 — The command or saved output.

Type: AppCommandOutput

FieldTypeRequiredDescription
commandAppCommandYes
command.idstringYes
command.computerstringYes
command.stateone of "queued", "dispatching", "running", "succeeded", "failed", "cancelled", "timed_out", "unknown"Yes
command.digeststringYes
command.exit_codeinteger or nullYes
command.cancel_requestedbooleanYes
command.created_unixintegerNo
command.started_unixinteger or nullNo
command.finished_unixinteger or nullNo
command.output_expires_unixintegerYes
command.output_limit_bytesalways 262144Yes
command.stdout_truncatedbooleanYes
command.stderr_truncatedbooleanYes
command.stdout_bytesintegerNo
command.stderr_bytesintegerNo
encodingalways "base64"Yes
stdoutstringYes
stderrstringYes
next_cursorobjectYes
next_cursor.stdoutintegerYes
next_cursor.stderrintegerYes
gapsobjectYes
gaps.stdoutbooleanYes
gaps.stderrbooleanYes
terminalbooleanYes
has_morebooleanYes

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 410, 413, 429, 503

The command or saved output.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers/{id}/commands/{command}/output' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Prepare computer credential reference

POST /v1/computers/{id}/credential-references · prepareComputerCredentialReference

Optional host-side credentials. Requires a supported network profile and an authorized source connection. Credential values and cloud paths never appear in this contract. Prepare all references before sending the command with command_key. Pass oa-ref:REFERENCE_UUID as the client API key or Git HTTPS password. The proxy replaces this non-secret marker only for an authorized matching request.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
Idempotency-KeyheaderstringNo

When supplied, must match idempotency_key in the body.

Request body

Content type: application/json

Type: AppPrepareComputerCredentialReference

FieldTypeRequiredDescription
sourcestring (uuid)Yes

A source connection authorized for this account or workspace. Cloud secret paths are not accepted.

rulestringYes

One destination rule registered for that connection.

command_keystringYes

The exact request key of the command that may use these credentials.

idempotency_keystringYes

Save this key with these exact settings before sending. Retries do not extend the expiry.

ttl_secondsintegerYes

Maximum lifetime. Stop, wake, revocation, command exit, and broker restart also end access.

Response

201 — Done

Type: AppComputerCredentialReference

FieldTypeRequiredDescription
idstring (uuid)Yes
computerstringYes
sourcestring (uuid)Yes
rulestringYes
command_keystringYes
stateone of "prepared", "active", "revoked"Yes
created_unixintegerYes
expires_unixintegerYes
egress_profilestringYes

Errors

StatusMeaningBody
400

Invalid settings

401

Sign in

403

Not allowed

404

Not found

413

Request too large

422

Unsupported

503

Unavailable

Example

curl -X POST 'https://api.openagents.com/v1/computers/{id}/credential-references' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "source": "00000000-0000-0000-0000-000000000001",
  "rule": "messages",
  "command_key": "command-example",
  "idempotency_key": "credential-example",
  "ttl_seconds": 300
}'

In the Rust SDK

Get computer credential reference

GET /v1/computers/{id}/credential-references/{reference} · getComputerCredentialReference

Optional host-side credentials. Requires a supported network profile and an authorized source connection. Credential values and cloud paths never appear in this contract. Prepare all references before sending the command with command_key. Pass oa-ref:REFERENCE_UUID as the client API key or Git HTTPS password. The proxy replaces this non-secret marker only for an authorized matching request.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
referencepathstringYes

Response

200 — Done

Type: AppComputerCredentialReference

FieldTypeRequiredDescription
idstring (uuid)Yes
computerstringYes
sourcestring (uuid)Yes
rulestringYes
command_keystringYes
stateone of "prepared", "active", "revoked"Yes
created_unixintegerYes
expires_unixintegerYes
egress_profilestringYes

Errors

StatusMeaningBody
400

Invalid settings

401

Sign in

403

Not allowed

404

Not found

413

Request too large

422

Unsupported

503

Unavailable

Example

curl 'https://api.openagents.com/v1/computers/{id}/credential-references/{reference}' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Revoke computer credential reference

DELETE /v1/computers/{id}/credential-references/{reference} · revokeComputerCredentialReference

Optional host-side credentials. Requires a supported network profile and an authorized source connection. Credential values and cloud paths never appear in this contract. Prepare all references before sending the command with command_key. Pass oa-ref:REFERENCE_UUID as the client API key or Git HTTPS password. The proxy replaces this non-secret marker only for an authorized matching request.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
referencepathstringYes

Response

204 — Credential access has ended.

Errors

StatusMeaningBody
400

Invalid settings

401

Sign in

403

Not allowed

404

Not found

413

Request too large

422

Unsupported

503

Unavailable

Example

curl -X DELETE 'https://api.openagents.com/v1/computers/{id}/credential-references/{reference}' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Read a workspace file

GET /v1/computers/{id}/files · readComputerFile

Requires an awake computer; never wakes or allocates. Returns a bounded complete read after taking a read lease and checking file size and modification metadata. Files open for writing return409; files that cannot take a lease are unsupported. Concurrent changes can return409. File mode is not altered.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
pathquerystringYes

Relative UTF-8 path beneath the command workspace. No empty or dot components, controls, backslashes, colon, percent signs, symlinks, or mount crossings. Parents must already exist.

Response

200 — Complete binary file; X-Content-SHA256 and ETag identify the returned bytes.

Content type: application/octet-stream

Type: string (binary)

Errors

StatusMeaningBody
400

Invalid path or query.

AppAccountError
401

Sign in again.

AppAccountError
403

Access or path refused.

AppAccountError
404

Computer, file, or parent directory missing.

AppAccountError
409

Computer is not awake, or the file changed during the read.

AppAccountError
411

Upload length required.

AppAccountError
412

Create-only upload conflicts with a different file.

AppAccountError
413

File exceeds 4 MiB.

AppAccountError
415

Choose a regular file.

AppAccountError
422

Upload length or checksum mismatch.

AppAccountError
429

Two transfers are in progress; retry after one second.

AppAccountError
501

Protected files are unsupported on this computer.

AppAccountError
503

Transfer unavailable; a write may have completed, so read and verify before retrying.

AppAccountError

Example

curl 'https://api.openagents.com/v1/computers/{id}/files?path=...' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Upload a workspace file

PUT /v1/computers/{id}/files · writeComputerFile

Requires awake computer, Content-Length, and SHA256. Validates the full body before writing. Publishes a same-directory temporary file by atomic rename; partial or mismatched uploads leave the previous file intact. Missing parents return404. Maximum4MiB, two transfers per instance,60second upload and60second execution bounds. A lost response can leave the result uncertain: read and compare SHA256 before retrying. Files stay on this computer's disk and are not shared artifacts.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes
pathquerystringYes

Relative UTF-8 path beneath the command workspace. No empty or dot components, controls, backslashes, colon, percent signs, symlinks, or mount crossings. Parents must already exist.

overwritequerybooleanNo

False: existing identical bytes succeed; different bytes return412. True: atomically replace; concurrent writers use last completed publication. No content compare-and-swap or idempotency key is offered.

X-Content-SHA256headerstringYes
Content-LengthheaderintegerYes

Exact binary body length, including zero for an empty upload.

Request body

Content type: application/octet-stream

Type: string (binary)

Response

200 — The complete upload was checked and atomically published with mode0600.

Type: AppComputerFileInfo

FieldTypeRequiredDescription
sizeintegerYes
sha256stringYes

Errors

StatusMeaningBody
400

Invalid path or query.

AppAccountError
401

Sign in again.

AppAccountError
403

Access or path refused.

AppAccountError
404

Computer, file, or parent directory missing.

AppAccountError
409

Computer is not awake, or the file changed during the read.

AppAccountError
411

Upload length required.

AppAccountError
412

Create-only upload conflicts with a different file.

AppAccountError
413

File exceeds 4 MiB.

AppAccountError
415

Choose a regular file.

AppAccountError
422

Upload length or checksum mismatch.

AppAccountError
429

Two transfers are in progress; retry after one second.

AppAccountError
501

Protected files are unsupported on this computer.

AppAccountError
503

Transfer unavailable; a write may have completed, so read and verify before retrying.

AppAccountError

Example

curl -X PUT 'https://api.openagents.com/v1/computers/{id}/files?path=...' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN" \
  -H 'X-Content-SHA256: ...' \
  -H 'Content-Length: ...' \
  -H 'Content-Type: application/octet-stream' \
  --data-binary @file

In the Rust SDK

Stop computer

POST /v1/computers/{id}/stop · stopComputer

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Response

200 — The requested computer result.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl -X POST 'https://api.openagents.com/v1/computers/{id}/stop' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK

Wake computer

POST /v1/computers/{id}/wake · wakeComputer

Account-owned cloud computers. Accepts live app sessions/sign-in keys or account-bound API keys with accounts scope. Cloud operations remain restricted to accounts with cloud access. Acceptance is not readiness or completion; poll the computer. Internal owner headers and service tokens are not public credentials.

Sign-in: a bearer credential in the Authorization header.

appBearer: A live app sess_ session or oa_sk_ sign-in key. Account-bound oak_ keys are accepted only where the operation declares them and their scopes permit it. API cookies are ignored.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Response

200 — The requested computer result.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

202 — Accepted intent; poll the same resource until its observed state confirms completion. A response or polling timeout does not cancel work.

Type: AppComputer

FieldTypeRequiredDescription
idstringYes
namestringYes
kindalways "cloud"Yes
chatstring or nullNo
sizestringYes
statestringYes
desiredone of "running", "stopped", "deleted"Yes
onlinebooleanYes
turnsintegerNo
created_unixintegerNo
updated_unixintegerNo
seen_unixnullNo
syncnullNo
last_errorstring or nullNo
capabilitiesAppComputerResourceCapabilities (object or null)No

The bound computer's supported operations. Absent or null means unknown. A known object defaults omitted memory_suspend and command_sessions declarations to false; a Suspend profile alone does not promise memory preservation.

capabilities.profilesarray of one of "core", "suspend", "snapshot", "fork"Yes
capabilities.sizesarray of stringYes
capabilities.shapesobjectYes
capabilities.memory_suspendbooleanYes
capabilities.command_sessionsbooleanYes
capabilities.workspace_file_bytesinteger or nullYes
lifecycle_policyAppComputerLifecyclePolicy (object or null)No

The recorded service policy for this computer. Absent or null means unavailable; clients must not invent timing or memory guarantees.

lifecycle_policy.turn_completeone of "suspend", "delete"Yes
lifecycle_policy.idle_msintegerYes
lifecycle_policy.observed_extension_msintegerYes
lifecycle_policy.absolute_msintegerYes
lifecycle_policy.absolute_scopealways "boot"Yes
lifecycle_policy.uncertain_at_absolute_limitalways "delete"Yes
lifecycle_policy.stopped_retention_msinteger or nullNo

Recorded maximum time to keep a stopped computer, in milliseconds. Zero means delete after the observed stop. Current operator/account limits can shorten this time; absent or null means unavailable.

Errors

StatusMeaningBody
400, 401, 403, 404, 409, 413, 422, 429, 503

The requested computer result.

AppAccountError

Example

curl -X POST 'https://api.openagents.com/v1/computers/{id}/wake' \
  -H "Authorization: Bearer $OPENAGENTS_TOKEN"

In the Rust SDK