Mehtagent Docs

Enterprise feature

Optimizers

Mehtagent drafts changes to your skills and Guides from your own tasks, and the Optimizations screen shows whether each change helped.

An optimizer drafts new wording for the instructions your AI follows when your own tasks show the same mistake again and again. Once you accept the draft, Optimizations checks, task by task, whether the new wording helped.

Optimizations: each change, before and after

Every change to a skill or a guide, judged by the tasks before and after it. Three steps.

Optimizations: each change to a skill or Guide, before and after
  1. Each row names the skill or Guide and what changed in it.
  2. Workload medians compare cost, tokens and active minutes before and after.
  3. The signal compares reported use before and after, or says too few tasks.

What an optimizer does

A skill or a Guide is text your AI reads before it starts work. When your own tasks show a problem, an optimizer changes that text and checks whether the change helped, and the AI model stays the same.

Optimizations compares each saved change before and after, including the share of tasks you reported as used. Its signal comes from a Fisher exact test, a standard way to ask whether a difference between two small groups could be chance. The test is corrected for the number of changes compared.

EnterpriseEach saved change to a skill or Guide, with the workload before and after and its signal, from sample data.

The loop, step by step

An optimizer closes a loop between your tasks and the wording your AI reads. Each step below waits for you, and every name in the example is invented.

How an optimizer improves a skill

A skill is a saved set of instructions your AI reads before it works. An optimizer rewrites one when your own tasks show the same mistake again.

Purpleis the new wording the optimizer drafts.

  1. 1Your tasks runExample only

    Each finished task is a row with its time, cost and outcome.

  2. 2The same correction repeats

    Three corrections to one skill soon after it loaded make a pattern.

    The gift amount belongs in the first line

  3. 3The optimizer drafts a smaller change

    Mehtagent sends your AI the skill and your corrections, and gets back a short change with one sentence on why.

  4. 4You accept it

    Nothing changes until you press the Accept button. The skill becomes version 2.

  5. 5Mehtagent compares before and afterExample only

    It compares the same window on each side. Here it counts tokens a task, the units an AI reads and writes.

    Show the four numbers as a table
    ChangeBeforeAfterDifference
    Tokens a task, after a change that helped31,00024,00023% fewer tokens
    Tokens a task, after a change that hurt25,00028,00012% more tokens
  6. 6You keep it or undo it

    A guide you wrote has a Revert button. For a skill, you restore the earlier version.

Then the loop repeats with your next tasks.

What it is made of

PartWhat it does
Task recordsOne row per task, with time, tokens, cost and outcome
CorrectionsFinds likely corrections in your replies, with the files before and after
Nightly skill draftsDrafts an edit to a skill corrected three times soon after it loaded, which you apply with a click
Optimizations screenCompares each change before and after

Each drafted change waits as a proposal until a person accepts it.

How to use it

  1. Open Optimizations from the sidebar's System group.
  2. Set Window to compare 30 days on each side of a change, or all tasks since the change.
  3. Read the signal and the workload medians together. A change that raised cost with no clear difference in use is worth reverting, and Show reverted lists the changes already undone.

Example: a donor-letter skill

In mid-October, Malik at Harbor Lane Food Bank corrects his donor-letters skill three times, because the gift amount belongs in the first line. Every name in this example is invented.

  1. Claude drafts the smallest change. Each correction came within 45 minutes of the skill being used, so the overnight check counts three. Malik has said yes to Claude, so Mehtagent sends Claude Code the skill and the corrections, and gets back a short change with one sentence on why.
  2. He accepts it on the Skills screen. After comparing the old and new wording, he presses Accept and publish on 21 October, making version 2. His skills folder is in git with a GitHub copy, so Mehtagent commits the change and sends it there; a folder not in git keeps it on the Mac only.
  3. Optimizations compares before and after. With Window on 30 days each side, tokens per task fell from about 31,000 to 24,000. He used 6 of 8 marked letters before and 8 of 9 after, and the signal reads "no clear difference".
  4. He could undo it. A skill has no Revert button, so he would restore version 1 from git history or ask his AI to. Only Guides he wrote have one.

Why it works like this