The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
definitions:
BoxInfoResponse:
properties:
daemonVersion:
type: string
exitCode:
description: |-
ExitCode is how the box's main command ended, present once the runtime
recorded it: its own code when it exited, or 128 + n when a signal ended
it. Stopping a box signals that command, so a stop is recorded here too.
Absence, not 0, is what says "not recorded": 0 is the exit code of every
command that succeeded, so a reader has to tell a missing field from a
zero one.
type: integer
state:
$ref: '#/definitions/enums.BoxState'
type: object
CreateBoxDTO:
properties:
authToken:
type: string
cmd:
items:
type: string
type: array
cpuQuota:
description: CPU allocation in cores (0.125–16), in increments of 0.001; omitted
means 1.
maximum: 16
minimum: 0.125
type: number
entrypoint:
items:
type: string
type: array
env:
additionalProperties:
type: string
type: object
fromVolumeId:
type: string
gpuQuota:
minimum: 0
type: integer
id:
type: string
image:
type: string
memoryQuota:
minimum: 0.125
type: number
metadata:
additionalProperties:
type: string
type: object
nestedVirtualization:
description: Requires explicit authorization on the Runner process; omitted
means off.
type: boolean
organizationId:
description: Nullable for backward compatibility
type: string
osUser:
type: string
otelEndpoint:
type: string
outboundAllowNet:
items:
type: string
type: array
outboundEnabled:
description: |-
Outbound network policy. outboundEnabled is required: a request without
it is rejected rather than started with a guessed policy.
type: boolean
privileged:
type: boolean
regionId:
type: string
registry:
$ref: '#/definitions/RegistryDTO'
runAsUser:
type: string
secrets:
items:
$ref: '#/definitions/dto.SecretDTO'
type: array
skipStart:
type: boolean
storageQuota:
minimum: 1
type: integer
volumes:
items:
$ref: '#/definitions/dto.VolumeDTO'
type: array
workingDir:
type: string
required:
- id
- image
- osUser
- outboundEnabled
type: object
ErrorResponse:
description: Error response
properties:
code:
example: BAD_REQUEST
type: string
message:
example: Bad request
type: string
method:
example: GET
type: string
path:
example: /api/resource
type: string
statusCode:
example: 400
type: integer
timestamp:
example: '2023-01-01T12:00:00Z'
type: string
required:
- message
- path
- statusCode
- timestamp
type: object
IsRecoverableDTO:
properties:
errorReason:
type: string
required:
- errorReason
type: object
IsRecoverableResponse:
properties:
recoverable:
type: boolean
type: object
RecoverBoxDTO:
properties:
cpuQuota:
description: CPU allocation in cores (0.125–16), in increments of 0.001; omitted
means 1.
maximum: 16
minimum: 0.125
type: number
env:
additionalProperties:
type: string
type: object
errorReason:
type: string
fromVolumeId:
type: string
gpuQuota:
minimum: 0
type: integer
memoryQuota:
minimum: 0.125
type: number
osUser:
type: string
outboundAllowNet:
items:
type: string
type: array
outboundEnabled:
description: |-
Outbound network policy. outboundEnabled is required: a request without
it is rejected rather than started with a guessed policy.
type: boolean
privileged:
type: boolean
secrets:
items:
$ref: '#/definitions/dto.SecretDTO'
type: array
storageQuota:
minimum: 1
type: integer
volumes:
items:
$ref: '#/definitions/dto.VolumeDTO'
type: array
required:
- errorReason
- osUser
- outboundEnabled
type: object
RegistryDTO:
properties:
password:
type: string
project:
type: string
url:
type: string
username:
type: string
required:
- url
type: object
RunnerInfoResponseDTO:
properties:
appVersion:
type: string
metrics:
$ref: '#/definitions/RunnerMetrics'
nestedVirtualizationEnabled:
type: boolean
serviceHealth:
items:
$ref: '#/definitions/RunnerServiceInfo'
type: array
supportsPrivileged:
type: boolean
type: object
RunnerMetrics:
properties:
currentAllocatedCpu:
type: number
currentAllocatedDiskGiB:
type: number
currentAllocatedMemoryGiB:
type: number
currentCpuLoadAverage:
type: number
currentCpuUsagePercentage:
type: number
currentDiskUsagePercentage:
type: number
currentMemoryUsagePercentage:
type: number
currentStartedBoxes:
type: integer
type: object
RunnerServiceInfo:
properties:
errorReason:
type: string
healthy:
type: boolean
serviceName:
type: string
required:
- healthy
- serviceName
type: object
StartBoxResponse:
properties:
daemonVersion:
type: string
type: object
StopBoxDTO:
properties:
force:
type: boolean
type: object
UpdateNetworkSettingsDTO:
properties:
networkLimitEgress:
type: boolean
outboundAllowNet:
items:
type: string
type: array
outboundEnabled:
type: boolean
type: object
dto.FilestoreRef:
properties:
instance:
type: string
server:
description: NFS server address resolved by the API
type: string
export:
description: NFS export path on the server
type: string
required:
- instance
- server
- export
type: object
dto.SecretDTO:
properties:
headers:
additionalProperties:
type: string
type: object
hosts:
items:
type: string
type: array
name:
type: string
placeholder:
type: string
value:
type: string
required:
- headers
- name
- value
type: object
dto.VolumeDTO:
properties:
filestore:
$ref: '#/definitions/dto.FilestoreRef'
mountPath:
type: string
subpath:
type: string
volumeId:
type: string
type: object
enums.BoxState:
enum:
- creating
- restoring
- destroyed
- destroying
- started
- stopped
- starting
- stopping
- resizing
- error
- unknown
type: string
x-enum-varnames:
- BoxStateCreating
- BoxStateRestoring
- BoxStateDestroyed
- BoxStateDestroying
- BoxStateStarted
- BoxStateStopped
- BoxStateStarting
- BoxStateStopping
- BoxStateResizing
- BoxStateError
- BoxStateUnknown
info:
contact: {}
description: BoxLite Runner API
title: BoxLite Runner API
version: v0.0.0-dev
paths:
/:
get:
description: Health check
operationId: HealthCheck
produces:
- application/json
responses:
'200':
description: OK
schema:
additionalProperties:
type: string
type: object
summary: Health check
/boxes:
post:
description: Create a box
operationId: Create
parameters:
- description: Create box
in: body
name: box
required: true
schema:
$ref: '#/definitions/CreateBoxDTO'
produces:
- application/json
responses:
'201':
description: Created
schema:
$ref: '#/definitions/StartBoxResponse'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Create a box
tags:
- box
/boxes/{boxId}:
get:
description: Get box info
operationId: Info
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
produces:
- application/json
responses:
'200':
description: Box info
schema:
$ref: '#/definitions/BoxInfoResponse'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Get box info
tags:
- box
/boxes/{boxId}/destroy:
post:
description: Destroy box
operationId: Destroy
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
produces:
- application/json
responses:
'200':
description: Box destroyed
schema:
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Destroy box
tags:
- box
/boxes/{boxId}/is-recoverable:
post:
consumes:
- application/json
description: Check if the box's error reason indicates a recoverable error
operationId: IsRecoverable
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Error reason to check
in: body
name: request
required: true
schema:
$ref: '#/definitions/IsRecoverableDTO'
produces:
- application/json
responses:
'200':
description: OK
schema:
$ref: '#/definitions/IsRecoverableResponse'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
summary: Check if box error is recoverable
tags:
- box
/boxes/{boxId}/network-settings:
post:
description: Update box network settings
operationId: UpdateNetworkSettings
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Update network settings
in: body
name: box
required: true
schema:
$ref: '#/definitions/UpdateNetworkSettingsDTO'
produces:
- application/json
responses:
'200':
description: Network settings updated
schema:
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Update box network settings
tags:
- box
/boxes/{boxId}/recover:
post:
consumes:
- application/json
description: Recover box from error state using specified recovery type
operationId: Recover
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Recovery parameters
in: body
name: recovery
required: true
schema:
$ref: '#/definitions/RecoverBoxDTO'
produces:
- application/json
responses:
'200':
description: Box recovered
schema:
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Recover box from error state
tags:
- box
/boxes/{boxId}/start:
post:
description: Start box
operationId: Start
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Metadata
in: body
name: metadata
schema:
type: object
- description: Auth token
in: query
name: token
type: string
produces:
- application/json
responses:
'200':
description: Box started
schema:
$ref: '#/definitions/StartBoxResponse'
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Start box
tags:
- box
/boxes/{boxId}/stop:
post:
description: Stop box
operationId: Stop
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Stop box
in: body
name: box
schema:
$ref: '#/definitions/StopBoxDTO'
produces:
- application/json
responses:
'200':
description: Box stopped
schema:
type: string
'400':
description: Bad Request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorResponse'
'409':
description: Conflict
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Stop box
tags:
- box
/info:
get:
description: Runner info with system metrics
operationId: RunnerInfo
produces:
- application/json
responses:
'200':
description: OK
schema:
$ref: '#/definitions/RunnerInfoResponseDTO'
summary: Runner info
/v1/boxes/{boxId}/executions/{execId}/attach:
get:
parameters:
- description: Box ID
in: path
name: boxId
required: true
type: string
- description: Execution ID
in: path
name: execId
required: true
type: string
responses:
'101':
description: Switching Protocols
'404':
description: execution not found
schema:
additionalProperties:
type: string
type: object
'409':
description: already attached
schema:
additionalProperties:
type: string
type: object
summary: Attach to an execution via WebSocket
tags:
- boxlite
security:
- Bearer: []
securityDefinitions:
Bearer:
description: Type "Bearer" followed by a space and an API token.
in: header
name: Authorization
type: apiKey
swagger: '2.0'