Skip to main content

2. Customize the Agent YAML

If an agent does not name a model, its runs use the default model of your organization. Pick a model when the job needs more speed, more depth, or a lower cost.

Step 1: Set the model​

Add these fields to agent.yaml:

YAML
model:
name: claude-haiku-5-5
max_tokens: 4096
limits:
model_requests: 20
timeout: 5m
FieldWhat it does
model.nameThe model's full name in the Autoheal model catalog.
model.max_tokensThe longest answer that the model can write in one reply.
model.thinkingHow much the model thinks before it answers: minimal, low, medium, high or xhigh. More thinking makes runs slower and more expensive, and usually better on hard problems.
limits.model_requestsThe maximum number of model calls in one run. The default is 300. The maximum is 1000.
timeoutThe maximum time for one run. The default is 10 minutes. The maximum is 1 hour.

Step 2: Compare two models​

  1. Commit, and run the agent with the pull request URL from the Quick Start.
  2. Change model.name to claude-sonnet-5, and add thinking: low below max_tokens. Commit, and run the agent again with the same URL.
  3. Compare the two reviews. Look at what each model found, and at how long each run took.

Not every model accepts thinking. If a run fails with a message about thinking, remove the field for that model.

Model names​

Write the model's full catalog name, for example claude-haiku-5-5, claude-sonnet-5, claude-opus-5-5 or gpt-5-5. Short names such as sonnet do not exist.

Your organization offers only some models from the catalog. If you write a name that your organization does not offer, Autoheal shows an error that lists the names that you can use. The agent cannot run until you change the name. If your company sends model calls through a gateway, such as Portkey or LiteLLM, ask your admin which names to use.

Model familyGood for
HaikuShort jobs with clear rules: formatting, summaries, a first review of a small diff
SonnetMost agents that call tools and reason about the results
OpusLong jobs with no fixed path: root cause analysis, large code changes

Write instructions that work​

  • Say what a good result is. "Write a verdict: merge, merge with changes, or do not merge" is better than "review the pull request well".
  • Give the steps in order. Numbered steps are easier for a model to follow than a paragraph.
  • Say what the agent must not do. For example: "Do not comment on the pull request and do not push."
  • Keep long examples and team rules out of the instructions. Put them in a skill. The agent loads a skill only when it needs it. See the next chapter.
  • Change one thing at a time. Run the agent on the same pull request after each change, and compare the results.

From the CLI​

BASH
autoheal agents push agents/pr-review -m "Use claude-haiku-5-5"
autoheal run pr-review "https://github.com/autohealai/astronomy-shop-template/pull/1" --follow

See Timeout and limits in the reference.