Skip to main content
POST /v1/self-improve/runs
Starts a loop that changes the agent prompt, pushes it to the provider, and runs the simulation to score it. At the end, Bluejay saves the best prompt as one new latest version. The previous version stays. The production label does not move.

Confirm the run

  1. Send the request without confirmed. The response has needs_confirmation: true and a preview text. Nothing runs.
  2. Send the same request with confirmed: true. The response has run_id.

Limits

  • The agent must be a Vapi, ElevenLabs, or Retell agent with a provider ID. Other agents return 400.
  • max_iterations is 5 by default and 20 at most.
  • metric_count is 5 by default and 20 at most.
  • One agent can have one active run. A second run returns 409.
Rate limit: 30 requests per minute.

Headers

Request body

Response

A 200 response has no body.

Status codes

Example request

Last modified on October 21, 2026