{ "openapi": "3.0.3", "info": { "title": "sandbox-agent", "description": "Universal API for automatic coding agents in sandboxes. Supports Claude Code, Codex, OpenCode, and Amp.", "contact": { "name": "Rivet Gaming, LLC", "email": "developer@rivet.gg" }, "license": { "name": "Apache-2.0" }, "version": "0.2.1" }, "servers": [ { "url": "http://localhost:2468" } ], "paths": { "/v1/acp": { "get": { "tags": [ "v1" ], "operationId": "get_v1_acp_servers", "responses": { "200": { "description": "Active ACP server instances", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpServerListResponse" } } } } } } }, "/v1/acp/{server_id}": { "get": { "tags": [ "v1" ], "operationId": "get_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "SSE stream of ACP envelopes" }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Unknown ACP server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "406": { "description": "Client does not accept SSE responses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "post": { "tags": [ "v1" ], "operationId": "post_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } }, { "name": "agent", "in": "query", "description": "Agent id required for first POST", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpEnvelope" } } }, "required": true }, "responses": { "200": { "description": "JSON-RPC response envelope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcpEnvelope" } } } }, "202": { "description": "JSON-RPC notification accepted" }, "400": { "description": "Invalid ACP envelope", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "404": { "description": "Unknown ACP server", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "406": { "description": "Client does not accept JSON responses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "409": { "description": "ACP server bound to different agent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "415": { "description": "Unsupported media type", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "504": { "description": "ACP agent process response timeout", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "delete": { "tags": [ "v1" ], "operationId": "delete_v1_acp", "parameters": [ { "name": "server_id", "in": "path", "description": "Client-defined ACP server id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "ACP server closed" } } } }, "/v1/agents": { "get": { "tags": [ "v1" ], "operationId": "get_v1_agents", "parameters": [ { "name": "config", "in": "query", "description": "When true, include version/path/configOptions (slower)", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "no_cache", "in": "query", "description": "When true, bypass version cache", "required": false, "schema": { "type": "boolean", "nullable": true } } ], "responses": { "200": { "description": "List of v1 agents", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/agents/{agent}": { "get": { "tags": [ "v1" ], "operationId": "get_v1_agent", "parameters": [ { "name": "agent", "in": "path", "description": "Agent id", "required": true, "schema": { "type": "string" } }, { "name": "config", "in": "query", "description": "When true, include version/path/configOptions (slower)", "required": false, "schema": { "type": "boolean", "nullable": true } }, { "name": "no_cache", "in": "query", "description": "When true, bypass version cache", "required": false, "schema": { "type": "boolean", "nullable": true } } ], "responses": { "200": { "description": "Agent info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInfo" } } } }, "400": { "description": "Unknown agent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/agents/{agent}/install": { "post": { "tags": [ "v1" ], "operationId": "post_v1_agent_install", "parameters": [ { "name": "agent", "in": "path", "description": "Agent id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInstallRequest" } } }, "required": true }, "responses": { "200": { "description": "Agent install result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentInstallResponse" } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } }, "500": { "description": "Install failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } } }, "/v1/config/mcp": { "get": { "tags": [ "v1" ], "operationId": "get_v1_config_mcp", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "mcpName", "in": "query", "description": "MCP entry name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "MCP entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpServerConfig" } } } }, "404": { "description": "Entry not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "put": { "tags": [ "v1" ], "operationId": "put_v1_config_mcp", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "mcpName", "in": "query", "description": "MCP entry name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpServerConfig" } } }, "required": true }, "responses": { "204": { "description": "Stored" } } }, "delete": { "tags": [ "v1" ], "operationId": "delete_v1_config_mcp", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "mcpName", "in": "query", "description": "MCP entry name", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } }, "/v1/config/skills": { "get": { "tags": [ "v1" ], "operationId": "get_v1_config_skills", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "skillName", "in": "query", "description": "Skill entry name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Skills entry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillsConfig" } } } }, "404": { "description": "Entry not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "put": { "tags": [ "v1" ], "operationId": "put_v1_config_skills", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "skillName", "in": "query", "description": "Skill entry name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillsConfig" } } }, "required": true }, "responses": { "204": { "description": "Stored" } } }, "delete": { "tags": [ "v1" ], "operationId": "delete_v1_config_skills", "parameters": [ { "name": "directory", "in": "query", "description": "Target directory", "required": true, "schema": { "type": "string" } }, { "name": "skillName", "in": "query", "description": "Skill entry name", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } }, "/v1/fs/download-batch": { "get": { "tags": [ "v1" ], "summary": "Download a tar archive of a file or directory.", "description": "Returns `application/x-tar` bytes containing the requested path. If the path is a directory,\nthe archive contains its contents (similar to `tar -C