Agent Improvement API
Auto-improve runs that iterate on an agent flow toward a target score.
Start auto-improve process
Runs the selected evals (or all of the agent when `testCaseIds` is omitted), analyzes results and iteratively improves the agent flow until `targetScore` is reached or `maxIterations` runs are done. When a process is already running, answers 200 with its id instead of starting another one.
List auto-improve runs
Returns the runs newest first, at most `limit` of them (default 20). When `applicationId` is given, read access to the application is checked first.
Get auto-improve run
Returns the run together with the test runs of its iterations. Use it to poll the progress of a process started via `POST /api/v1/agents/{agentId}/auto-improve/`. Answers `400` when the run exists but belongs to a different agent.
Delete auto-improve run
Permanently removes the run record. It does not stop a running process, use `POST /api/v1/agents/{agentId}/auto-improve/stop/` for that. When `applicationId` is given, write access to it is checked.
Stop auto-improve process
Marks the run identified by `processId` as `STOPPED` so the background process terminates gracefully at its next checkpoint instead of starting another iteration. Answers `404` when the process has already finished or been stopped. When `applicationId` is given, write access to it is checked.
Stop running auto-improve process of agent (deprecated method)
Deprecated spelling of `POST /api/v1/agents/{agentId}/auto-improve/stop/`: stopping is an action, not a resource deletion, so POST is the canonical method. Behaves identically.