> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# optimize

Record and chart your own improvement iterations on your computer. To improve your AI Agent, use the [improvement loop](/adacli/commands/loop). `optimize` does not change the Agent. It keeps a local record of each change you make and its test pass rate, and draws the progress as an HTML chart.

## Commands

| Command           | What it does                                                  |
| ----------------- | ------------------------------------------------------------- |
| `optimize start`  | Starts a new run with a target pass rate.                     |
| `optimize record` | Records one iteration: the change you made and its pass rate. |
| `optimize status` | Shows the progress of a run.                                  |
| `optimize viz`    | Writes an HTML chart of a run.                                |
| `optimize list`   | Lists the runs for the AI Agent.                              |

## Examples

Start a run with a target pass rate of 90%:

```bash
adacli acme optimize start --target 90 --label "Billing questions"
```

Record the first result, then a change that you kept:

```bash
adacli acme optimize record --pass-rate 50 --passed 5 --total 10 --change "baseline"
adacli acme optimize record --pass-rate 80 --change "Added a shared accounts article"
```

Record a change that you rolled back:

```bash
adacli acme optimize record --pass-rate 40 --change "New coaching on refunds" --rolled-back
```

Write the chart to a file:

```bash
adacli acme optimize viz --output billing.html
```

## Details

* `start` needs `--target`. `record` needs `--pass-rate` and `--change`.
* `--target` and `--pass-rate` accept a fraction, such as `0.9`, or a percent, such as `90`.
* `record`, `status`, and `viz` use the active run. To use a different run, add `--run <id>`.
* adacli stores the runs on your computer, in `~/.adacli/optimize/`. Without `--output`, `viz` writes the chart to the same folder.
* Record one change in each iteration. Then a [`testing runs compare`](/adacli/commands/testing) shows the effect of that change.

For every option of a command, run it with `--help`, for example `adacli acme optimize record --help`.

## Related commands

* [`loop`](/adacli/commands/loop): print the improvement loop.
* [`testing`](/adacli/commands/testing): run the test cases that give the pass rate.

---

Have any questions? Contact your Ada team, or email us at [](mailto:help@ada.cx?subject=Help%20Docs%20inquiry).