Docs
Sign in

Run every failed agent of a crew again.

In one step, retries every failed or stopped agent of the crew that POST /agents/{id}/retry would accept: either all of them are queued (and a crew that had ended is reopened once, with its time limit started again), or nothing changes.

POST/api/v1/crews/{id}/retry-failed

Scopecrews

Agents it leaves are in skipped with the reason, in the same words the agent route refuses with (a managed crew's merge step whose task is already merged, a task a re-plan or steer dropped). Optional guidance has the same meaning and limits as on the agent route and is given to each agent retried. One notice (data.code: agents_retried) says who retried how many; each agent then has its own state event. Answers 409 nothing_to_retry when there is nothing to retry (the crew was canceled, no agent has failed, or none that failed can be retried); CrewView.canRetryFailed says the same in advance. No query parameters.

Path parameters.

idstringrequired

The crew's id.

Headers.

Idempotency-Keystring

Makes a retry safe: the same key with the same request returns the first answer and does nothing else.

Body.

Optional: leave the body out and it is read as {}.

guidancestring

Added guidance for this attempt and every later run of this agent, in the founder's words. 1 to 4000 characters.

Response.

200 OK: a JSON object. The example has placeholder values.

422 validation_failed
The body does not match its schema; each problem is in details.