Skip to main content

Overview

Attempts represent individual executions of tasks by AI agents. Each task can have multiple attempts with different agents or configurations. Base URL: http://localhost:8887/api/attempts

List Attempts

Get all attempts with filtering.

Query Parameters

Status Values

  • created - Queued, not started
  • running - Currently executing
  • completed - Finished successfully
  • failed - Execution failed
  • cancelled - Cancelled by user

Get Attempt

Retrieve detailed attempt information.

Example Response


Create Attempt

Start a new attempt for a task.

Request Body


Start Attempt

Begin execution of a created attempt.

Cancel Attempt

Stop a running attempt.

Delete Attempt

Remove an attempt and cleanup worktree.
This permanently deletes the attempt and removes the associated Git worktree.

Get Attempt Logs

Retrieve execution logs for an attempt.

Query Parameters


Get Attempt Diff

Get code changes made by the attempt.

Query Parameters


Merge Attempt

Merge attempt changes into main branch.

Request Body

Merge Strategies

  • ff - Fast-forward merge (default)
  • no-ff - Create merge commit
  • squash - Squash commits into one

Compare Attempts

Compare two attempts side-by-side.

Request Body

Example Response


Get Commit Info

Get commit information for a task attempt.

Example Response


Compare to Head

Compare task attempt branch to HEAD of target branch.

Example Response


Merge Attempt

Merge task attempt into target branch.

Request Body

Parameters

Example Response


Push Branch

Push task attempt branch to remote.

Request Body

Example Response


Create GitHub PR

Create a pull request from task attempt branch.

Request Body

Example Response


Attach Existing PR

Attach an existing GitHub PR to this attempt.

Request Body

Example Response


Open in Editor

Open task attempt worktree in IDE/editor.

Request Body

Supported Editors

  • vscode - Visual Studio Code
  • cursor - Cursor IDE
  • idea - IntelliJ IDEA
  • sublime - Sublime Text

Example Response


Get Branch Status

Get git status of task attempt branch.

Example Response


Change Target Branch

Change the base branch for this attempt.

Request Body

Example Response


Rebase Attempt

Rebase task attempt onto latest base branch.

Request Body

Example Response

Conflict Response:

Abort Conflicts

Abort merge/rebase conflicts and return to clean state.

Example Response


Delete File

Delete a file from task attempt worktree.

Example

Example Response


Start Dev Server

Start development server in task attempt worktree.

Request Body

Example Response


Get Child Tasks

Get tasks created from this attempt (subtasks).

Example Response


Replace Process

Replace the running execution process with a new one.

Request Body

Example Response


SDK Examples

JavaScript/TypeScript

Python


WebSocket Events

Subscribe to real-time attempt updates:

Next Steps

Tasks API

Manage tasks

Processes API

Monitor running processes

MCP Tools

Use from AI agents