AI Glossary / Agents and automation / Intermediate
Utility-based agent
Definition
A utility-based agent is an AI system that chooses actions by scoring the possible outcomes with a utility function, a numerical measure of how desirable each outcome is, and then picking the action with the best expected score. It differs from a simple goal-based agent, which only asks whether a goal is met. The term comes from classic AI textbooks, and practitioners use it loosely, so check how a vendor means it.
What it means
Most business decisions involve trade-offs. A refund approval balances cost against customer goodwill. A delivery plan balances speed against fuel and driver hours. A goal-based system can say that a parcel arrives or does not. A utility-based system can say that arriving a day late at a lower cost may be better than arriving on time at a high cost.
The utility function is where the business puts its priorities in numbers. It turns several competing aims, such as profit, speed, risk and customer satisfaction, into one score that the agent can compare across options. This makes the trade-offs visible and open to review, but it also means the agent is only as sensible as the numbers it was given.
How it works
The agent first observes the current situation and lists the actions open to it. For each action it estimates the likely outcomes and how probable each one is. Then it applies the utility function to each outcome and weights the scores by their probabilities. The result is an expected utility for every action.
The agent then picks the action with the highest expected utility and carries it out. After the result comes in, it observes again and repeats the cycle. Some systems learn the probabilities from data. Others use rules or forecasts written by people. In many practical systems the utility function is hand-built from business rules and weights, though some are learned from feedback.
The hard part is the function itself. If it leaves out something the business cares about, such as fairness or brand risk, the agent will ignore it. Good practice is to test the function against past decisions, set hard limits that the agent may never cross, and keep a human review step for high-stakes cases.
Three practical examples
- Finance team: A collections tool scores each overdue invoice by the chance of payment, the amount, and the goodwill cost of a reminder. It ranks which customers to contact first and by which channel, so staff time goes where the expected return is highest.
- Retailer: A pricing agent weighs margin, expected sales volume and stock-out risk for each product. It may accept a lower margin on a slow item to free shelf space, because the combined score is higher than holding the price.
- Support desk: A routing agent decides whether to send a ticket to a senior agent, a junior agent or an automated reply. It balances resolution speed, cost per ticket and the risk of an unhappy customer, and picks the route with the best expected score.
Think of it this way
Think of a shopper comparing several routes home, giving each a score that mixes travel time, cost and how pleasant the walk is, then choosing the highest score. The analogy stops working because a person adjusts those preferences by feel, while an agent uses fixed numbers that someone typed in and will follow them even when they are wrong.
Worked example
A small online shop uses an agent to choose a shipping option for one order. The utility function is: utility = 100 times the chance of on-time delivery, minus the shipping cost in dollars. Option A, standard shipping, costs $6 and has a 70 percent chance of arriving on time. Its utility is 100 x 0.70 = 70, minus 6, which gives 64. Option B, express shipping, costs $15 and has a 95 percent chance of arriving on time. Its utility is 100 x 0.95 = 95, minus 15, which gives 80. The agent picks express because 80 is higher than 64. Now suppose the shop changes the weight from 100 to 40 because late delivery matters less for this product. Standard becomes 40 x 0.70 = 28, minus 6, which is 22. Express becomes 40 x 0.95 = 38, minus 15, which is 23. Express still wins, but only just. This shows how a small change in the weights can flip the choice.
Illustrative case study
Fictional case: Harbor Lane Supplies, a regional office products distributor, built a utility-based agent to choose which warehouse fills each order. The utility function rewarded fast delivery and penalized shipping cost. After a month, managers noticed that one warehouse was always chosen and its stock ran thin, while a second warehouse sat idle. The agent was doing exactly what it was told, because the function said nothing about stock balance or staff workload. The team added a penalty for drawing a warehouse below a set stock level and a small bonus for using idle capacity. They also added a hard rule that no warehouse could fill more than a fixed share of daily orders. They reviewed a sample of 50 orders each week against what a human planner would have chosen. Within two months the split between warehouses evened out, and delivery times stayed close to the earlier level.
Common misconceptions and mistakes
A utility-based agent understands what the business values. It only follows the numbers in its utility function, so anything left out of the function is invisible to it.
The highest score always means the best decision. The score is only as good as the estimates and weights behind it, and a poorly built function can rank a bad option first.
Utility-based agents are fully autonomous and need no oversight. They need limits, monitoring and human review for high-stakes choices, because errors in the function repeat at scale.
Any AI that makes a choice is utility-based. Many systems follow fixed rules or simply aim for a single goal, and only those that score and compare trade-offs fit this definition.
Business use
To start, pick one decision with clear trade-offs and measurable outcomes, such as routing, pricing or prioritizing a work queue. Write down what the business cares about, turn each item into a number or a limit, and compare the agent's choices with those of experienced staff before letting it act alone. Begin in advisory mode, where the agent recommends and a person approves.
Measure how often its choices match expert judgment, the business results it produces, and how often people override it. Costs include time to design and tune the function, data to estimate probabilities, and ongoing review as conditions change. The main risks are a function that omits something important, estimates that drift out of date, and over-trust in the score. Keep hard limits in place and record why each decision was made so it can be audited.
People also ask
How is a utility-based agent different from a goal-based agent?
A goal-based agent only checks whether a goal is reached, while a utility-based agent scores how good each outcome is and weighs trade-offs. This lets it prefer a cheaper or safer path when several routes meet the goal.
Who decides what the utility function contains?
People in the business do, usually with analysts or engineers, by turning priorities such as cost, speed and risk into numbers and limits. It should be reviewed regularly, because the agent will pursue whatever the function rewards.
Do utility-based agents use machine learning?
Sometimes. Machine learning is often used to estimate probabilities or outcomes, but the utility function itself is frequently written by hand. Practice varies, so ask which parts are learned.
Check your understanding
In the worked example, what is the utility of standard shipping with a weight of 100?
Answer: It is 100 x 0.70 = 70, minus the $6 cost, which gives 64.
Why did the weight change in the worked example make the choice closer?
Answer: With a weight of 40, standard scored 22 and express scored 23, so late delivery counted for less and the cost gap mattered more.
What went wrong at Harbor Lane Supplies at first?
Answer: The utility function left out stock balance and workload, so the agent kept choosing one warehouse and ignored the other.
Why keep hard limits alongside a utility function?
Answer: A score can be wrong or incomplete, so firm limits stop the agent from taking actions the business will not accept, whatever the score says.
Related terms
- Reinforcement learning
- Human-in-the-loop
- Intelligent agent
- Goal-based agent
- Reflex agent
- Learning agent
- Reward function
- Decision-making under uncertainty
Learn next
Pick one routine decision in your own work and write down the factors involved and how you would weigh them. Then read about goal-based agents and reward functions to see how scoring ideas differ across agent types, and about human in the loop to plan where review belongs.
More in Agents and automation
- Software agent - A software agent is a software system that acts within an environment on behalf of a user or another system, with some degree of autonomy.
- State machine agent - A state machine agent is an agent built as an explicit set of states and transitions: it is always in one known state, such as waiting, collecting details...
- Straight-through processing - Straight-through processing, or STP, is the completion of a defined transaction or business process through connected automated steps without manual...
- Sub-agent - A sub-agent is an agent that works under another agent's direction: it receives a specific subtask, does it with its own tools or skills, and returns the...
- Tool use - Tool use is the ability of an AI model to request that an outside program or service do something on its behalf, such as search a database, run a...
- Workflow engine - A workflow engine is software that coordinates the execution of a defined process.
Sources
Russell and Norvig, Artificial Intelligence: A Modern Approach: https://aima.cs.berkeley.edu/ Poole and Mackworth, Artificial Intelligence: Foundations of Computational Agents: https://artint.info/ Google, Machine Learning Glossary: https://developers.google.com/machine-learning/glossary The sources were consulted for the standard definition of agent types and the role of utility in decision-making, while the examples, analogy, worked example and case are original educational illustrations. Checked 10 Nov 2026.
Previous: Utility Next: Utility function