Let Your Agent Pick the Model: Light Jobs to Fast Models, Hard Ones to the Strongest
DEV Community

Let Your Agent Pick the Model: Light Jobs to Fast Models, Hard Ones to the Strongest

Fixing a typo and designing a whole interface shouldn't cost the same, or take the same wait. But if you have to decide "which model this time?" before every job you hand out, that decision becomes a job of its own.

This post shows one way to handle it in udctl (UnDercontrol): write your model-choice rule once and let Alfred pick and dispatch by it. You skip the judgment call before every dispatch, light jobs stop queuing behind your strongest model, and hard jobs don't land on a model that can't handle them.

We made a 100-second video of this. The dispatches in it come from a real run. This post is the written version. Watch on YouTube

Each model is one command, so you can see what runs

In udctl, each model is its own agent CLI, with the model right in the command. The claude-fable row is:

claude --dangerously-skip-permissions --model fable

claude-haiku is the same command with --model haiku.

It's not just Claude. Codex, Pi: whatever is installed on your machine, you can add, with "New CLI..." at the bottom of the list. Claude Code, Codex, OpenCode, or any terminal-based agent plugs in the same way.

Set the usual split once and stop thinking about it

Each agent has its own default: Opus for the coder, Fable for the designer, Codex for the reviewer. In the agent's edit form, the CLI you pick under "Runs with" is its default.

No more picking a model every time you hand out a job

A default only covers what an agent normally uses. The same coder might fix a typo in a button label today and build a whole form tomorrow, and one model for both is a poor fit. So every job you hand out means picking a model again.

Write that judgment down as a rule, once. Global Instructions in settings go into the prompt of every workspace session: yours, and those of the agents you trigger.

The rule in the video reads: Choosing a model: default to claude-opus; simple jobs use claude-sonnet; tiny, repetitive jobs use claude-haiku; complex jobs that need strong design use claude-fable; for code review, have codex take a look as well.

One sentence, and each job lands on the right model

With the rule written, you can hand the model decision to Alfred too. In the video, the demo account says one sentence to Alfred: "Dispatch the four jobs on the "Checkout page redesign" card." Alfred reads the rule, splits the work into child cards and dispatches it himself.

Here is what that real run produced:

Job on the child card Dispatched to CLI
New layout and interaction draft designer claude-fable
Build the form and its validation coder claude-opus
Fix the typo in the button label coder claude-haiku
Review before merge reviewer claude-opus
Second-opinion review reviewer codex

The last row is a card Alfred added on his own, because the rule says to have codex take a look at code review as well. Each child card got its own session; with Alfred's, that is six.

Every dispatch he sends names one CLI next to the agent mention. And the session starts with exactly that command. Open the designer's session and the Command shows --model fable.

If your Alfred mentions the agent but no CLI, the session starts on that agent's default. Add one line to Alfred's prompt, "When you dispatch, put the CLI that the model-choice rule in Global Instructions calls for next to the agent mention", and his dispatches will carry it from then on.

When you want to choose, it's one switch

Sometimes you want to pick it yourself. When you dispatch, switch the CLI in the dropdown above the input box, say claude-haiku for the coder on a typo fix. It applies to that one message only. The agent's default stays as it is, and the next message goes back to its usual CLI.

Set it up yourself: three steps

  • Add each model as a CLI. One row per model under Agent CLI in settings, with the model in the command.
  • Give each agent a default. "Runs with" in the agent's edit form.
  • Write a model-choice rule in Global Instructions. Say which kind of job gets which CLI, then hand the work to Alfred with one sentence: "Dispatch these."

You don't have to click through these yourself either. Tell your agent the split you want, let it do the setup, and adjust it with the agent in conversation until it fits.

udctl.com

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.