Delete Agent
Deletes a background agent and stops any ongoing work. This action permanently removes the agent and cannot be undone.
Overview
- Purpose: Permanently delete an agent and stop its work. Use this to clean up completed agents or cancel agents that are no longer needed.
- Use Cases: Canceling incorrect or unnecessary work, cleaning up old agents, stopping runaway agents.
- API Method: DELETE /v0/agents/{id}
Required Input Fields
Agent ID: The unique identifier of the agent you want to delete. This is returned when you launch an agent or can be retrieved from the ‘List Agents’ action.
Output
- Success: Boolean indicating whether the deletion was successful (true/false).
- Message: Descriptive message about the deletion result. On success: ‘Agent deleted successfully’. On failure: error details.
Important Considerations
[!CAUTION] Permanent Action: Deleting an agent is irreversible. The agent’s work history and conversation will be lost.
[!IMPORTANT] Work Preservation: Any branches or pull requests created by the agent will remain in your repository even after deletion.
- Status Independence: You can delete agents in any status (RUNNING, FINISHED, ERROR, etc.).
- Immediate Effect: Deletion stops the agent immediately if it’s currently running.
Tips
[!TIP] Review the agent’s work before deleting to ensure you don’t lose important changes
[!TIP] Branches and PRs created by the agent will persist - delete them separately if needed
[!TIP] Use ‘List Agents’ to verify the agent ID before deletion
[!TIP] Consider whether you need to preserve the agent’s conversation history before deleting
[!TIP] Deletion is useful for cleaning up test agents or canceling incorrect work early