> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# roark autoimprove job create

> Start an Autoimprove job

Commission Roark on an objective. It clones the agent into a staging shadow (or uses your designated staging agent), authors a validation suite of simulated callers, measures a baseline, changes the staging configuration, and re-tests until the objective metric passes its target. Production is never touched by the loop; verified changes wait for promotion. Requires an active provider integration (Vapi, Retell, or ElevenLabs) with agent config writes enabled. One live job per agent: starting a second returns a conflict. The job runs asynchronously; poll GET /v1/autoimprove/job/\{jobId} or watch it in the dashboard. When its status is `NEEDS_INPUT`, answer via the answer endpoint; when `AWAITING_PROMOTE`, promote or dismiss.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark autoimprove job create [options]
```

> [!NOTE]
>
> Calls `POST /v1/autoimprove/job`

## Options

**--agent-id** `string` *required*

The production agent to improve. It is never modified until you promote.

**--objective-metric-definition-id** `string` *required*

The metric that defines success: a pass/fail metric, or a threshold variant of a scale metric (for example "PII Handling >= 4"). Roark measures the pass rate of this metric across simulated calls.

**--objective-label** `string` *required*

Human-readable label for the objective, shown everywhere the job appears.

**--target-value** `number`

The pass-rate percentage that counts as fixed. Defaults to 90.

**--staging-agent-id** `string`

An existing agent to stage changes on instead of the default shadow clone. Must be a different agent from agentId, on the same provider.

**--customer-integration-id** `string`

The provider integration whose credentials Roark uses. Omit to use the project's active integration for the agent's provider. The integration must have agent config writes enabled.

**--validation-run-plan-id** `string`

An existing simulation run plan to validate with. Omit to let Roark author its own suite.

**--max-iterations** `integer`

Cap on decision turns. Defaults to 50.

**--max-sim-calls** `integer`

Cap on simulated calls dialed. Defaults to 200.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark autoimprove job create --agent-id <value> --objective-metric-definition-id <value> --objective-label <value>
```

Every command also takes the [global options](/cli-reference/overview.md#global-options) and sets one
of the [exit codes](/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.