Tool Use in Agentic Systems
A planning failure occurs when an agent's plan does not achieve the goal, violates a constraint such as budget or time, or rests on an error in the agent's reflection about its own completion.
A Fluent Plan Can Still Fail
When people first evaluate an AI agent, they often read its answer and ask whether it sounds good. An agent's plan can be detailed, confident, and well organized, and still fail the person who asked for it. Evaluating planning ability means checking three things: whether the plan actually accomplishes the task, whether it respects the limits the task sets, and whether it uses its tools correctly. This article builds that checklist one piece at a time, and it follows a plan through the agent's run to show where each kind of failure can enter.
Tracing a Plan Through the Agent Loop
A simplified way to picture an agent's run is as a sequence of stages. The agent starts with a task and a tool inventory, which is the set of tools it is allowed to use for that task. It then generates a plan. The plan leads to tool calls, each tool call returns an output, and the agent eventually reflects on whether the work is complete. Each stage can go wrong, and the failures do not all look alike. The diagram below marks where each failure type enters the run. Follow the arrows and notice that the failures branch off at different points and have different consequences for what happens next.
Read the diagram as a map of entry points. A constraint violation enters at the plan itself, because the plan can be sound in its destination and still break a budget or a deadline. A missing tool enters at the tool call stage, because the agent has no tool to call for a step the task requires. A wrong tool output enters after a tool runs, when the tool returns an incorrect result. A reflection error enters at the end, when the agent wrongly concludes that it has succeeded. Goal failure appears when the outcome misses the goal, and it can be discovered only by checking the final result against what was asked.
What do you think happens?
An agent is asked to count the items in a list of 10 entries. It reports that it counted 12, and then it states that the task is complete. Which planning failure best describes this?
Reveal answer
Error in reflection
The agent reports success without having achieved the task. The source describes this as an error in reflection: the agent is convinced it has accomplished the task when it has not. A simple count is enough to expose the problem, because the agent's stated result does not match the actual data.
The counting example shows why the diagram ends with a reflection step. The agent's claim of success is itself an output, and it can be wrong. The count of 12 for a list of 10 is a checkable fact, so a checker can catch it. Because the error sits in the agent's self-assessment, the rest of the run has already been treated as finished. Any downstream steps that rely on the false claim will carry the error forward.
Three Kinds of Planning Failure
The source groups planning failures into three modes. Planning failures can occur because of goal failure or because of a constraint violation, and a third mode, which is easy to miss, comes from errors in the agent's reflection on its own work. The comparison below summarizes what each mode breaks. The distinctions matter because each mode is checked in a different way, and a single pass or fail label would hide which one happened.
Each mode is easy to confuse with the others if you only look at the final text. The subsections below explain each one with a concrete case.
Worked Example: The Hanoi Trip
Checking a trip plan against goal and constraints
An agent is asked to plan a trip to Hanoi within a fixed budget. The agent returns a plan for a two-week trip to Hanoi. Does the plan count as a failure, and if so, which kind?
- 1Check the goal
The plan does address the destination. Hanoi is the right place, so the goal of planning a trip there is met at the level of destination.
- 2Check the constraint
The plan costs far more than the budget allows. The budget is part of the task, so the plan breaks a limit that the task sets.
- 3Classify the failure
The plan is a constraint violation. It is not a goal failure, because the goal of a Hanoi trip is addressed. It still counts as a failure, because the plan violates the budget.
- 4Decide how to test it
A checker that only tests the destination would pass this plan. The budget must be tested with the same care as the destination.
The plan is a failure of the constraint type. Testing the destination alone would have missed it.
Tool Failures Versus Planning Failures
A tool failure happens when the agent picks the correct tool but the tool's output is wrong. The source gives two examples. An image captioner may return a wrong description, or an SQL query generator may return an incorrect query. A second source of trouble appears when the agent produces only high-level plans and a separate translation module converts each planned action into executable commands. In that setup, the translation step can introduce errors even when the plan itself is sound.
A missing tool failure is the second route to trouble. The source gives a clear case: a task that requires retrieving current stock prices from the internet fails if the agent has no internet access. Missing tool failures are harder to notice than wrong outputs, because nothing is returned at all. Detecting them requires knowing which tools a task should use.
| Question to ask | Tool failure | Planning failure |
|---|---|---|
| Where does the fault appear? | In the tool's output or in the translation step | In the plan that chose the tool or the steps it lays out |
| What is the signal? | The correct tool returns a wrong output, or no tool exists for a needed step | The plan misses the goal, breaks a constraint, or the agent misreports completion |
| How is it tested? | Test each tool on its own with its calls and outputs printed | Check the plan against the goal, the constraints, and the reflection claim |
| Example from the source | An SQL query generator returns an incorrect query | A two-week Hanoi trip that breaks the budget |
Telling a tool failure apart from a planning failure
When a tool call returns an error, the diagnostic question is whether the fault lies in the tool execution or in the plan that chose the tool. The source's advice is to test each tool on its own, so that a bad result can be traced. Testing a tool only inside the full agent run makes it hard to tell whether a bad result came from the tool or from the planning. If the pipeline includes a translator, build benchmarks that evaluate the translator separately.
Building a Planning Dataset
Spotting failures by reading a handful of outputs is unreliable. A more systematic method is to build a planning dataset in which each example is a tuple made of a task and a tool inventory. For each task, you ask the agent to generate K plans, and then you compute measurements across all of those plans and tool calls. The diagram shows how the pieces relate, and where the failure labels attach.
The structure separates problems that a single pass or fail label would blur together. An invalid tool, a valid tool with bad parameters, and a valid tool with wrong parameter values are three different failures, and each points to a different fix. Because each plan is a separate sample, the dataset also shows how often the same task fails across different attempts, which a single run cannot reveal. The source lists the measurements this makes possible: plan validity, tool-call validity, and parameter errors.
Scoring three plans for one task
A task asks the agent to summarize three articles. The tool inventory contains a search tool and a summarizer. The agent generates K equals 3 plans. How would you label them?
- 1Plan 1
Searches for the three articles, then summarizes each one with the summarizer. The plan is valid, and every tool call uses an allowed tool with correct parameters. No failure label is attached.
- 2Plan 2
Calls a translation tool that is not in the tool inventory. This is an invalid tool, so the tool-call validity measure records a failure for this call.
- 3Plan 3
Uses the summarizer, but passes the wrong article identifier as a parameter. The tool is valid, but the parameter value is wrong, so it counts as a parameter error.
- 4Compare the labels
Across the three plans, one is clean, one has an invalid tool, and one has a wrong parameter value. The three labels point to different fixes, which a single pass or fail result would not show.
Plan 1 passes, Plan 2 shows an invalid tool, and Plan 3 shows a valid tool with a wrong parameter value.
Measuring Efficiency Against a Baseline
An agent's plan may be valid and use the right tools, yet still be wasteful. Efficiency is a separate question from correctness. The source suggests tracking three quantities: the average number of steps the agent needs to complete a task, the average cost of completing a task, and the time each action takes. Looking at the time per action helps reveal whether a few particular actions dominate the total.
- Average number of steps needed to complete a task
- Average cost of completing a task
- Time taken by each action, to see whether a few actions dominate the total
Raw numbers only mean something against a baseline. The baseline might be another agent or a human operator. A human and an AI work in very different ways, so a result that looks inefficient for a person can be sensible for a machine, and the reverse can also be true. Visiting 100 web pages would be a heavy burden for a human who can open only one page at a time, yet it is trivial for an AI agent that can process many pages at once. Compare like with like, and judge efficiency by what each kind of worker can actually do.
Why Memory Makes Failures Spread
Many of the failures above depend on what the agent is able to keep track of while it works. The source ties this to memory, which it defines as mechanisms that allow a model to retain and utilize information. An agentic system needs memory to store many kinds of material. The source links this to evaluation: because agents keep plans, tool inventories, and tool outputs in memory, a failure in one of those stored items can carry forward into later steps. A wrong tool output that is stored and reused can therefore affect several later decisions, not only the one step where it appeared.
Mistakes When Evaluating Agents
Common mistake Judging a plan by how well it reads
What it looks likeA detailed, confident plan is accepted because it is well organized.
Why it failsFluency says nothing about whether the plan achieves the goal, respects limits, or uses tools correctly.
Do this insteadCheck the outcome, the constraints, and the tool use separately.
Common mistake Testing only the destination of a plan
What it looks likeA Hanoi trip plan is passed because it names the right city, even though it costs far more than the budget.
Why it failsConstraints are part of the task, so a plan can fail on a limit even when its goal is addressed.
Do this insteadTest budget, time, and other constraints with the same care as the goal.
Common mistake Forgetting time as a constraint
What it looks likeA grant proposal delivered after its deadline is scored as a success because it is well written.
Why it failsIn some tasks the value of the result drops as time passes.
Do this insteadAsk whether timing matters for the task before deciding that a result is acceptable.
Common mistake Trusting the agent's claim of completion
What it looks likeAn agent reports a count that does not match a list of 10 items, and the run is marked finished.
Why it failsAn error in reflection means the agent believes it succeeded when it did not.
Do this insteadVerify the claimed result against the underlying facts.
Common mistake Blaming the tool for a planning fault, or the reverse
What it looks likeA bad result is blamed on a search tool when the plan chose the wrong query parameters.
Why it failsA tool failure and a planning failure have different causes and different fixes.
Do this insteadTest each tool on its own with its calls and outputs printed, then review the plan that chose it.
Common mistake Scoring efficiency without a baseline
Practice: Classify and Measure
An agent is asked to book a meeting room for a team of six people at a time before 3 PM, using only a room-booking tool. The agent books a room for four people, reports that the booking is complete, and the room is available after 3 PM. Identify each failure. Which one is a goal failure, which is a constraint violation, and which is an error in reflection? Then explain whether the booking problem is a tool failure or a planning failure.
Hints
- Check the goal first: does the outcome match what the task asked for?
- Check the limits next: a time and a capacity are both constraints in this task.
- Look at the final message: does the agent claim success that the facts do not support?
Design a planning dataset for three tasks, each with a small tool inventory. For each task, list the tuple (task, tool inventory), state K, and name the failure label you would attach to a plan that calls a tool not in the inventory.
Hints
- Each example is one tuple of a task and its tool inventory.
- Failure labels attach to individual plans and tool calls, not to the task as a whole.
Summary of the Evaluation Checklist
- 1A planning failure occurs when the plan does not achieve the goal, violates a constraint such as budget or time, or rests on an error in reflection about completion.
- 2A planning dataset of (task, tool inventory) tuples, with K plans per task, measures plan validity, tool-call validity, and parameter errors across many examples.
- 3Tool failures come from correct tools returning wrong output or from missing tools; each tool should be tested on its own, and planning failures should be checked in the plan itself.
- 4Efficiency is measured by steps, cost, and time per action, and it only means something when compared with a baseline on the same tasks.
At a glance
- A planning failure is goal failure, constraint violation, or an error in reflection, and each one breaks a different thing: the outcome, a limit, or the agent's self-assessment.
- A planning dataset of (task, tool inventory) tuples with K plans per task lets you score plan validity, tool-call validity, and parameter errors across many examples.
- Tool failures come from wrong outputs or missing tools, and each tool should be tested separately from the planning that chose it.
- Efficiency is measured by steps, cost, and time per action, and it becomes meaningful only when compared with a baseline on the same tasks.