openapi: 3.0.0 info: title: Agent Sandbox Manager API description: REST API for managing isolated AI agent execution environments (Agent Computers). version: 1.0.0 servers: - url: http://localhost:8080 description: Local development paths: /v1/sandboxes: post: summary: Create an isolated agent sandbox requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateSandboxRequest' responses: '201': description: Sandbox created content: application/json: schema: $ref: '#/components/schemas/CreateSandboxResponse' '429': description: Quota exceeded get: summary: List all sandboxes parameters: - name: status in: query schema: type: string description: Filter by status responses: '200': description: List of sandboxes /v1/sandboxes/{id}: get: summary: Get sandbox details parameters: - name: id in: path required: true schema: type: string responses: '200': description: Sandbox details '404': description: Sandbox not found delete: summary: Delete a sandbox parameters: - name: id in: path required: true schema: type: string responses: '200': description: Sandbox deleted '404': description: Sandbox not found /v1/sandboxes/{id}/exec: post: summary: Execute a command in a sandbox parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExecRequest' responses: '200': description: Command executed content: application/json: schema: $ref: '#/components/schemas/ExecResponse' /v1/sandboxes/{id}/files: post: summary: File operations (upload/download/list) parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FileRequest' responses: '200': description: File operation result /v1/sandboxes/{id}/metrics: get: summary: Get sandbox resource metrics parameters: - name: id in: path required: true schema: type: string responses: '200': description: Sandbox metrics /v1/sandboxes/{id}/stop: post: summary: Stop a sandbox parameters: - name: id in: path required: true schema: type: string responses: '200': description: Sandbox stopping /v1/sandboxes/{id}/start: post: summary: Start a sandbox parameters: - name: id in: path required: true schema: type: string responses: '200': description: Sandbox started /v1/sandboxes/{id}/snapshot: post: summary: Snapshot a sandbox workspace (filesystem-level) parameters: - name: id in: path required: true schema: type: string responses: '200': description: Snapshot created /v1/sandboxes/{id}/clone: post: summary: Clone a sandbox workspace (CoW) parameters: - name: id in: path required: true schema: type: string responses: '200': description: Clone created /v1/capacity: get: summary: Get available platform capacity responses: '200': description: Capacity information /v1/health: get: summary: Health check responses: '200': description: Health status /metrics: get: summary: Prometheus metrics endpoint responses: '200': description: Prometheus metrics components: schemas: CreateSandboxRequest: type: object properties: image: type: string description: OCI image for agent environment default: agent-runtime:latest cpu: type: integer description: Number of vCPUs default: 2 memory: type: string description: Memory limit default: 2Gi workspace_size: type: string description: Workspace storage size default: 10Gi ttl_seconds: type: integer description: Time-to-live in seconds default: 3600 network_policy: type: string enum: [isolated, restricted, open] default: restricted tenant: type: string description: Tenant identifier owner: type: string description: Owner user agent_id: type: string description: Agent identifier labels: type: object additionalProperties: type: string CreateSandboxResponse: type: object properties: sandbox_id: type: string status: type: string created_at: type: string endpoint: type: string labels: type: object ExecRequest: type: object properties: command: type: array items: type: string description: Command and arguments timeout_seconds: type: integer description: Timeout in seconds stream: type: boolean description: Stream output ExecResponse: type: object properties: exit_code: type: integer stdout: type: string stderr: type: string duration_ms: type: integer FileRequest: type: object properties: operation: type: string enum: [upload, download, list] path: type: string content: type: string