Helium Logo
POST/api/v1/public/threads/{thread_id}/agent/stop

Stop Agent

Stop a running task. This endpoint allows you to cancel an agent execution that is currently in progress.

Request

curl -X POST \
"https://api.he2.ai/api/v1/public/threads/thread_456/agent/stop?project_id=proj_123" \
-H "X-API-Key: he-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Path Parameters

ParameterTypeDescription
thread_idstring (required)The thread ID of the running task

Query Parameters

ParameterTypeDescription
project_idstring (required)Project ID

Response

{
"success": true,
"agent_run_id": "run_123",
"status": "stopped"
}

Note: Once a task is stopped, it cannot be resumed. You'll need to create a new task if you want to continue.