Rerun call executions

Reruns call executions within a test execution.

POST https://api.futureagi.com/simulate/test-executions/{test_execution_id}/rerun-calls/

Authentication

X-Api-Key API Key Required

Your Future AGI API key used to authenticate requests. You can find and manage your API keys in the Dashboard under Settings.

X-Secret-Key Secret Key Required

Your Future AGI secret key, used alongside the API key for request authentication. This is generated when you create an API key in the Dashboard.

Path parameters

test_execution_id UUID Required

The test execution ID. Must be in a terminal state (completed, failed, or cancelled).

Request body

rerunType string Required

The type of rerun to perform. Use eval_only to re-evaluate existing call data without re-executing the actual calls — this is useful when you have updated your evaluation configurations and want to see updated scores without the cost of re-running calls. Use call_and_eval to fully re-execute the calls and then evaluate the new results — this produces fresh conversations and is useful when you have modified the agent under test. Note that text agents only support eval_only reruns; attempting call_and_eval on a text agent will return a 400 error.

callExecutionIds array of strings Optional

An array of call execution UUIDs to rerun. Required when selectAll is false or not provided. Each ID must correspond to a valid call execution within the specified test execution. If a provided ID does not exist or does not belong to the test execution, it will appear in the failedReruns array of the response.

selectAll boolean Optional

When set to true, all call executions within the test execution will be rerun, and the callExecutionIds field is ignored. Defaults to false. You must provide either selectAll: true or a non-empty callExecutionIds array — the request will fail with a 400 error if neither is specified.

Response

200 OK
message string

A human-readable confirmation message indicating that the rerun has been initiated. The actual rerun processing happens asynchronously after this response is returned.

testExecutionId string

The UUID of the test execution that the rerun was initiated for, echoed back for confirmation and reference.

rerunType string

The type of rerun that was requested, either eval_only or call_and_eval. Echoed back from the request for confirmation.

totalProcessed integer

The total number of call executions that were processed by the rerun request. This includes both successful and failed reruns.

successfulReruns array

An array of call execution UUIDs that were successfully queued for rerun. These calls will be re-executed or re-evaluated asynchronously.

failedReruns array

An array of objects describing call executions that could not be rerun. Each object contains a callExecutionId (the UUID of the failed call) and an error (a human-readable description of why the rerun failed, such as the call being in an incompatible state).

successCount integer

The number of call executions that were successfully queued for rerun. Equal to the length of the successfulReruns array.

failureCount integer

The number of call executions that failed to be queued for rerun. Equal to the length of the failedReruns array.

Errors

400 Bad Request Optional

The rerun request could not be processed. This error occurs when: the rerunType field is missing or contains an invalid value; neither callExecutionIds nor selectAll was provided; the test execution is still in an active state (pending, running, or cancelling) and cannot accept reruns; or a call_and_eval rerun was requested for a text agent, which only supports eval_only reruns. Check the error message in the response body for specific details on which validation failed.

401 Unauthorized Optional

The request could not be authenticated. Verify that both X-Api-Key and X-Secret-Key headers are present and contain valid, non-expired credentials. Ensure the API key has access to the workspace that owns this test execution.

404 Not Found Optional

Test execution not found.

500 Internal Server Error Optional

Unexpected server error.

GET /
Authentication
REQUEST
 
RESPONSE