Aborts in-flight tool or LLM calls for an execution without canceling the session, so the agent continues. Send step_number to interrupt a single named call; omit the body to interrupt every call currently in flight. The response's outcome reports exactly what happened: "aborted" (something in flight was stopped), "armed" (nothing in flight; armed for the execution's next call, pending=true), "already_armed" (an unexpired arm already existed; the TTL was not extended), "noop_terminal" (the execution is already terminal, possibly on another replica), "in_flight_elsewhere" (the durable step record shows the call in flight but not on this OE replica; nothing was aborted here, and a backstop scoped to the stamped steps stops the call at dispatch if that dispatch completes on this replica — it can never trap a later call), or "noop" (a named step_number matched nothing in flight). Idempotent: repeated requests are safe.
Query parameters
-
Workspace ID that owns the execution, needed to route the interrupt to that workspace's OE
Responses
-
Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence.
-
OK
Additional properties are allowed.
Additional properties are allowed.
-
Bad Request
-
Unauthorized
-
Not Found
Additional properties are allowed.
Additional properties are allowed.
-
Request Entity Too Large
-
Bad Gateway
Additional properties are allowed.
Additional properties are allowed.
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/executions/{execution_id}/interrupt' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"step_number": 42
}'
{
"step_number": 42
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{}
{}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{}
{}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{}
{}