openapi: 3.0.0 info: title: agent_runners API description: netlify agent_runners API version: 2.57.0 paths: /agent_runners: get: operationId: listAgentRunners tags: - agentRunner parameters: - name: account_id in: query required: true schema: type: string - name: site_id in: query required: true schema: type: string - name: page required: false in: query schema: type: integer format: int32 - name: per_page required: false in: query schema: type: integer format: int32 - name: state in: query schema: type: string enum: - live - error - name: title in: query schema: type: string - name: branch in: query schema: type: string - name: result_branch in: query schema: type: string - name: from in: query schema: type: integer - name: to in: query schema: type: integer responses: '200': description: OK content: application/json: schema: type: array items: type: object properties: id: type: string site_id: type: string parent_agent_runner_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string branch: type: string result_branch: type: string pr_url: type: string pr_branch: type: string pr_state: type: string pr_number: type: integer pr_is_being_created: type: boolean pr_error: type: string current_task: type: string result_diff: type: string sha: type: string merge_commit_sha: type: string merge_commit_error: type: string merge_commit_is_being_created: type: boolean base_deploy_id: type: string attached_file_keys: type: array items: type: string active_session_created_at: type: string format: dateTime latest_session_deploy_id: type: string latest_session_deploy_url: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false post: operationId: createAgentRunner tags: - agentRunner parameters: - name: site_id in: query required: true schema: type: string - name: deploy_id in: query schema: type: string - name: branch in: query schema: type: string - name: prompt in: query schema: type: string - name: agent in: query schema: type: string - name: model in: query schema: type: string - name: parent_agent_runner_id in: query schema: type: string - name: dev_server_image in: query schema: type: string - name: file_keys in: query style: form explode: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string site_id: type: string parent_agent_runner_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string branch: type: string result_branch: type: string pr_url: type: string pr_branch: type: string pr_state: type: string pr_number: type: integer pr_is_being_created: type: boolean pr_error: type: string current_task: type: string result_diff: type: string sha: type: string merge_commit_sha: type: string merge_commit_error: type: string merge_commit_is_being_created: type: boolean base_deploy_id: type: string attached_file_keys: type: array items: type: string active_session_created_at: type: string format: dateTime latest_session_deploy_id: type: string latest_session_deploy_url: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string '404': description: Not Found '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false /agent_runners/upload_url: post: x-internal: true operationId: createAgentRunnerUploadUrl tags: - agentRunner parameters: - name: account_id in: query required: true schema: type: string - name: filename in: query required: true schema: type: string - name: content_type in: query required: true schema: type: string responses: '200': description: OK '400': description: Bad Request '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false /agent_runners/{agent_runner_id}: get: operationId: getAgentRunner tags: - agentRunner responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string site_id: type: string parent_agent_runner_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string branch: type: string result_branch: type: string pr_url: type: string pr_branch: type: string pr_state: type: string pr_number: type: integer pr_is_being_created: type: boolean pr_error: type: string current_task: type: string result_diff: type: string sha: type: string merge_commit_sha: type: string merge_commit_error: type: string merge_commit_is_being_created: type: boolean base_deploy_id: type: string attached_file_keys: type: array items: type: string active_session_created_at: type: string format: dateTime latest_session_deploy_id: type: string latest_session_deploy_url: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string patch: operationId: updateAgentRunner tags: - agentRunner responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string site_id: type: string parent_agent_runner_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string branch: type: string result_branch: type: string pr_url: type: string pr_branch: type: string pr_state: type: string pr_number: type: integer pr_is_being_created: type: boolean pr_error: type: string current_task: type: string result_diff: type: string sha: type: string merge_commit_sha: type: string merge_commit_error: type: string merge_commit_is_being_created: type: boolean base_deploy_id: type: string attached_file_keys: type: array items: type: string active_session_created_at: type: string format: dateTime latest_session_deploy_id: type: string latest_session_deploy_url: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string delete: operationId: deleteAgentRunner tags: - agentRunner responses: '202': description: Accepted default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string /agent_runners/{agent_runner_id}/archive: post: operationId: archiveAgentRunner tags: - agentRunner responses: '202': description: Accepted '404': description: Not Found '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string /agent_runners/{agent_runner_id}/pull_request: post: x-internal: true operationId: agentRunnerPullRequest tags: - agentRunner responses: '200': description: OK '400': description: Bad Request '409': description: Conflict '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string /agent_runners/{agent_runner_id}/commit: post: x-internal: true operationId: agentRunnerCommitToBranch tags: - agentRunner parameters: - name: target_branch in: query required: true schema: type: string - name: agent_runner_id in: path required: true schema: type: string responses: '200': description: OK '400': description: Bad Request '409': description: Conflict '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false /agent_runners/{agent_runner_id}/sessions: get: operationId: listAgentRunnerSessions tags: - agentRunnerSession parameters: - name: page required: false in: query schema: type: integer format: int32 - name: per_page required: false in: query schema: type: integer format: int32 - name: state in: query schema: type: string enum: - live - error - name: from in: query schema: type: integer - name: to in: query schema: type: integer - name: order_by in: query schema: type: string enum: - asc - desc - name: agent_runner_id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: type: object properties: id: type: string agent_runner_id: type: string dev_server_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string prompt: type: string agent_config: type: object properties: agent: type: string model: type: string result: type: string result_diff: type: string commit_sha: type: string deploy_id: type: string deploy_url: type: string duration: type: integer steps: type: array items: type: object properties: title: type: string message: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string attached_file_keys: type: array items: type: string result_zip_file_name: type: string is_published: type: boolean default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false post: operationId: createAgentRunnerSession tags: - agentRunnerSession parameters: - name: prompt in: query schema: type: string - name: agent in: query schema: type: string - name: model in: query schema: type: string - name: file_keys in: query style: form explode: false schema: type: array items: type: string - name: agent_runner_id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string agent_runner_id: type: string dev_server_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string prompt: type: string agent_config: type: object properties: agent: type: string model: type: string result: type: string result_diff: type: string commit_sha: type: string deploy_id: type: string deploy_url: type: string duration: type: integer steps: type: array items: type: object properties: title: type: string message: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string attached_file_keys: type: array items: type: string result_zip_file_name: type: string is_published: type: boolean '404': description: Not Found '422': description: Unprocessable Entity default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}: get: operationId: getAgentRunnerSession tags: - agentRunnerSession responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string agent_runner_id: type: string dev_server_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string prompt: type: string agent_config: type: object properties: agent: type: string model: type: string result: type: string result_diff: type: string commit_sha: type: string deploy_id: type: string deploy_url: type: string duration: type: integer steps: type: array items: type: object properties: title: type: string message: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string attached_file_keys: type: array items: type: string result_zip_file_name: type: string is_published: type: boolean default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string - name: agent_runner_session_id in: path required: true schema: type: string patch: operationId: updateAgentRunnerSession tags: - agentRunnerSession parameters: - name: is_published in: query schema: type: boolean - name: agent_runner_id in: path required: true schema: type: string - name: agent_runner_session_id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string agent_runner_id: type: string dev_server_id: type: string state: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime done_at: type: string format: dateTime title: type: string prompt: type: string agent_config: type: object properties: agent: type: string model: type: string result: type: string result_diff: type: string commit_sha: type: string deploy_id: type: string deploy_url: type: string duration: type: integer steps: type: array items: type: object properties: title: type: string message: type: string user: type: object properties: id: type: string full_name: type: string email: type: string avatar_url: type: string attached_file_keys: type: array items: type: string result_zip_file_name: type: string is_published: type: boolean default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false delete: operationId: deleteAgentRunnerSession tags: - agentRunnerSession responses: '202': description: Accepted default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: agent_runner_id in: path required: true schema: type: string - name: agent_runner_session_id in: path required: true schema: type: string /sites/{site_id}/agent_runner_hooks: get: x-internal: true operationId: listSiteAgentRunnerHooks tags: - agentRunnerHook responses: '200': description: OK content: application/json: schema: type: array items: type: object properties: id: type: string site_id: type: string title: type: string branch: type: string prompt: type: string agent: type: string url: type: string msg: type: string created_at: type: string format: dateTime default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: site_id in: path required: true schema: type: string post: x-internal: true operationId: createSiteAgentRunnerHook tags: - agentRunnerHook requestBody: $ref: '#/components/requestBodies/createSiteAgentRunnerHookAgentrunnerhook' responses: '201': description: Created content: application/json: schema: type: object properties: id: type: string site_id: type: string title: type: string branch: type: string prompt: type: string agent: type: string url: type: string msg: type: string created_at: type: string format: dateTime secret: type: string default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: site_id in: path required: true schema: type: string /sites/{site_id}/agent_runner_hooks/{id}: get: x-internal: true operationId: getSiteAgentRunnerHook tags: - agentRunnerHook responses: '200': description: OK content: application/json: schema: type: object properties: id: type: string site_id: type: string title: type: string branch: type: string prompt: type: string agent: type: string url: type: string msg: type: string created_at: type: string format: dateTime default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: site_id in: path required: true schema: type: string - name: id in: path required: true schema: type: string put: x-internal: true operationId: updateSiteAgentRunnerHook tags: - agentRunnerHook requestBody: $ref: '#/components/requestBodies/createSiteAgentRunnerHookAgentrunnerhook' responses: '204': description: No content default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: site_id in: path required: true schema: type: string - name: id in: path required: true schema: type: string delete: x-internal: true operationId: deleteSiteAgentRunnerHook tags: - agentRunnerHook responses: '204': description: No content default: description: error content: application/json: schema: type: object required: - message properties: code: type: integer format: int64 message: type: string nullable: false parameters: - name: site_id in: path required: true schema: type: string - name: id in: path required: true schema: type: string components: requestBodies: createSiteAgentRunnerHookAgentrunnerhook: content: application/json: schema: type: object properties: title: type: string branch: type: string prompt: type: string agent: type: string required: true schemas: {} servers: - url: https://api.netlify.com/api/v1