← All topics
Knowledge

Prioritization: decide what to do next

When an agent faces a pile of possible actions, score and order them by urgency, value, dependencies, and cost instead of just grabbing whatever came in first.

What it is

Prioritization is the agent deciding what to do next when it has more than one option on the table. Instead of acting first-in-first-out, it scores each candidate task or action and picks the best one.

  • The input is a list of pending things — tasks, tool calls, sub-goals.
  • The output is an ordered queue, re-ranked as new information arrives.
  • The ranking is explicit, not whatever the loop happened to surface first.

When to use it

Reach for it when the agent has a backlog and the order matters:

  • A long-running agent juggling many open tasks (support tickets, a research to-do list, a build pipeline).
  • Tasks with dependencies — B can't start until A finishes.
  • Scarce budget where you want high-value work first (ties into cost control).
  • Mixed urgency — a deadline item should jump ahead of a nice-to-have.

Skip it when there's one obvious next step, or the queue is short and cheap to just drain in order. Ranking overhead you don't need is wasted tokens.

How it works

Give each candidate a score, then act on the top one.

  • Define the factors that matter: urgency, value, cost, and whether dependencies are satisfied.
  • Score each task — e.g. score = (urgency * value) / cost, with blocked tasks forced to the bottom.
  • Pick the highest, execute it, then re-rank the remainder before the next pick.

Example: the queue holds send_invoice (blocked on approve_invoice) and reply_to_customer (urgent). The agent ranks reply_to_customer first, does it, marks approve_invoice ready, and on the next pass send_invoice rises to the top. Pairs naturally with planning, which produces the tasks you're ranking.

Watch out for

  • Starvation: a low-priority task that never wins gets stuck forever. Add aging — bump a task's score the longer it waits.
  • Gameable scores: if value comes from the model's own estimate, it can inflate everything. Anchor scores to concrete signals and sanity-check with evals.
  • Stale rankings: prioritize once and the order rots as the world changes. Re-rank when new tasks or results land, not just at the start.
  • Ignoring dependencies: picking a high-value but blocked task wastes a turn. Treat unmet dependencies as a hard disqualifier, not a small penalty.

Related patterns

Ask the swarm