AI Glossary / Agents and automation / Intermediate
Greedy agent
Definition
A greedy agent is an agent that, at each decision, picks the action that looks best right now according to its immediate measure, without searching ahead for a better overall sequence of actions.
What it means
Greedy is a technical term, not an insult. A greedy approach takes the locally best move at every step: the nearest delivery address next, the highest-scoring word next, the cheapest supplier this quarter. It is fast, simple and often surprisingly decent.
The weakness is structural. The best immediate move can lead somewhere poor: the nearest address first can leave the rest of the route sprawling across town. Greedy choices are blind to consequences beyond the next step.
Greedy agents are valuable for three reasons. They are cheap to build and run. They are easy to explain, which matters for trust. And they set the baseline: any fancier planning or learning agent must beat the greedy one to justify itself.
Many real systems are quietly greedy. A spam rule, a first-fit scheduling tool and a next-token text generator all pick locally, and their designers add structure around them to cover the cases where local choice fails.
For a business, recognizing greedy behavior in a tool tells you where it will fail: anywhere the good decision requires sacrificing a small win now for a bigger one later.
How it works
The mechanism is a scoring rule applied at each step. The agent evaluates the available actions against an immediate measure, distance, price, probability, and takes the highest scorer without simulating what follows.
Compare a planning agent, which searches ahead through possible action sequences, weighing the total outcome. Search costs computation and time; greedy choice costs almost nothing, which is why it survives in practice.
Hybrid designs use greedy choice inside guardrails: take the locally best action unless it violates a constraint, and flag states where greedy choices have historically backfired for a deeper look.
Evaluation is comparative. The same task is run with the greedy rule and with a look-ahead method, and the difference in total outcome, not per-step choice, shows whether look-ahead is worth its cost.
Three practical examples
- Routing: always visit the nearest stop next. Routes are produced instantly but can be noticeably longer than a planned route.
- Text: choose the most probable next word. Fluent output, but no guarantee the sentence as a whole says anything true.
- Purchasing: always take the lowest quote. Unit price falls while delivery failures and rework quietly raise the real cost.
Think of it this way
Think of walking through a strange city by always turning toward the prettiest storefront. Each turn is defensible, and you can still end up lost, because the prettiest street is not the one toward your hotel.
The analogy's limit: the walker has a goal in mind and could choose to look at a map. A greedy agent has no map by design; if you need one, you must build a different agent.
Worked example
greedy scheduling versus planned scheduling
Suppose a field-service company books each job into the earliest available slot. The rule is greedy: it optimizes each booking separately, and the schedule fills fast.
By month end, travel time is eating the margin, because individually sensible bookings scattered technicians across town. A planning approach batches jobs by area, accepting a slightly later slot for some bookings to save hours of driving.
The company keeps the greedy rule for genuinely urgent jobs, where speed is the point, and moves routine work to area batching. The teaching figures are invented; the split decision is the lesson.
Greedy did not get fired. It got assigned to the cases where its blind spot does not matter.
Illustrative case study
A fictional retailer sets its replenishment system to always reorder from the cheapest supplier. Six months later, stockouts and emergency freight have quietly cost more than the savings on unit price.
The fix is not abandoning the rule but enriching its score: the immediate measure now includes reliability and freight history, so cheapest means cheapest all-in, not cheapest on the quote line.
The invented lesson: when a greedy agent misbehaves, first check what its immediate measure counts. Greedy agents are only as wise as their score.
Common misconceptions and mistakes
- Greedy means stupid. Greedy methods are optimal for some problems and excellent baselines for many others.
- Look-ahead is always better. Planning costs time and compute; where the greedy result is within a whisker of the planned one, greedy wins.
- A greedy agent can be talked out of its choices. Its behavior is its scoring rule; change the score or add a constraint, and the behavior changes.
Business use
Greedy rules are right for high-volume, low-stakes, easily checked decisions: sorting, first-pass routing and simple prioritization.
Where a greedy tool disappoints, ask what its immediate measure is and what it ignores. Often the fix is a better score or one constraint, not a wholesale move to a complex planner.
People also ask
Is a greedy agent a kind of AI?
Yes, a simple one: it maps its percept to the locally best action through a rule, without searching ahead.
When does greedy fail?
When good outcomes need short-term sacrifice, like routing, scheduling and negotiation.
Why keep greedy agents around?
Speed, transparency and their role as the baseline every smarter method must beat.
Check your understanding
A booking rule fills the earliest slot for every job and travel costs soar. Why did the greedy approach fail here, and what change keeps its benefits?
Answer: Each locally earliest booking ignored route consequences; batch routine jobs by area (a planning step) while keeping the greedy rule for urgent jobs where speed matters.
Related terms
Learn next
AI for Business Owners covers how to choose and check practical workflows, including when simple rules beat clever ones: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]
More in Agents and automation
- Cognitive automation - Cognitive automation is automation of work that involves interpreting varied information, such as reading documents, understanding requests or making...
- Evaluator agent - An evaluator agent is an AI component whose job is to judge the output of another AI component: scoring, checking or critiquing it so weak results can be...
- Generative agents (simulacra) - Generative agents, in the research sense, are simulated people powered by language models that remember, reflect and plan inside a simulated world...
- Hybrid agent - A hybrid agent combines two or more decision styles in one agent, typically fast reactive rules for routine situations and slower deliberative reasoning for...
- Intelligent process automation - Intelligent process automation, or IPA, is the combination of traditional process automation with AI techniques, so that a workflow can handle varied...
- Knowledge-based agents - A knowledge-based agent is an agent that keeps an explicit store of facts and rules about its world, called a knowledge base, and reasons over that store to...
Sources
[S1] Russell and Norvig, AIMA glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Great deluge algorithm Next: Greedy algorithms