An agent can take a different route and still get the job right. AI agent trajectory evaluation should allow that variation while checking the conditions every acceptable route must satisfy. Otherwise we end up marking the satnav instead of checking where the car went.
A trajectory is the observable sequence of an agent’s actions and tool calls. Comparing it with a reference run is useful. Treating that reference as the only acceptable journey is a product decision, though, not a law of computer science.
Write the destination before the directions
Consider a fictional calendar assistant asked to arrange a 30-minute meeting. The requested attendees, permitted time window and calendar are known. In this example, the user must confirm the exact proposed booking before it is created. These are test assumptions, not claims about a deployed product.
The outcome check should inspect the calendar service: exactly one new event, the right attendees, the right duration and an allowed slot. Other events should remain unchanged. An enthusiastic “all booked!” is a statement to verify. Calendars already contain enough optimistic fiction.
Anthropic’s agent evaluation guide distinguishes the transcript from the resulting environment state. That matters here: reading a successful-looking conversation cannot establish that the meeting exists or that the assistant avoided an unwanted side effect.
Allow alternatives where order does not matter
Our assistant might read the user’s scheduling preferences before checking availability, or check availability before reading those preferences. Assume both reads are authorised and neither depends on the other’s output. Either order can support a valid proposal.
A test requiring one exact sequence would reject one of those routes. That rejection might be useful if the product truly requires the order. If it does not, the test has mistaken an implementation choice for a user requirement.
Google ADK’s evaluation criteria offer EXACT, IN_ORDER and ANY_ORDER tool-trajectory matching. IN_ORDER permits additional calls between required calls. ANY_ORDER removes the ordering requirement and also permits additional calls. Those are different contracts, not three settings on a generosity slider.
LangChain’s AgentEvals similarly offers strict, unordered, subset and superset matching. Read the matching rules, including argument comparison, before choosing a mode. A tool name occurring somewhere in a trace says little about whether it received the correct attendee or calendar identifier.
Keep the constraints that make the route acceptable
Flexibility needs boundaries. Both discovery reads must finish before the assistant proposes a slot based on them. Confirmation must refer to that exact booking. The service must enforce current permission at the write boundary. A permission check ten steps earlier should not quietly qualify as present authority.
This is a partial order: some actions must precede others, while independent actions may swap. Encode those dependencies explicitly. An unordered comparison across the entire workflow could accept confirmation after creation. The meeting exists, but the user has been promoted from decision-maker to audience.
Check arguments and side effects alongside ordering. Confirmation for Tuesday is not confirmation for Wednesday. Two create attempts might produce one event if the service deduplicates them, or two events if it does not. Inspect the committed state and relevant operation records rather than assuming a tool-call count proves either result.
Final state alone also has limits. Creating an unauthorised event and deleting it later can leave a clean calendar. The trace still contains a forbidden action. This is why the broader agent evaluation coverage map separates completion from authority and recovery.

Give the grader something awkward
Before running a model, challenge the evaluator with deliberately constructed examples. One reference trace should pass. A second, equally valid trace with the two independent reads swapped should also pass. A third that creates the event before confirmation should fail, even if its final calendar looks perfect.
Add a fourth with the correct tool order but the wrong attendee argument. Then remove a required piece of evidence from an otherwise plausible run. If no violation is already established, mark the affected check inconclusive. Missing evidence must not hide a proven failure or turn an unverified result into a pass. These are proposed checks, not measured benchmark results.
This exercise tests whether the evaluator measures the contract you intended. For subjective qualities such as the clarity of a scheduling question, use human review or a calibrated LLM judge. Do not ask that judge to infer a database write from conversational confidence.
Keep useful variation, measure waste separately
A valid alternative can still be slow or expensive. Record latency, cost and unnecessary calls separately from outcome and boundary failures. Set any limits for the actual task, with a reason. Fewer steps are not automatically better when the missing step was confirmation.
Freeze the task, constraints, evaluator and environment versions, then repeat trials from a clean starting state. Keep failures and inconclusive runs visible. When a new route appears, ask which requirement it violates before adding it to the rejection pile. Sometimes the agent needs fixing. Sometimes the test is just very attached to its directions.

