Repeatable API conditions for agent evaluations
An agent evaluation is easier to interpret when you know which API condition reached its tool wrapper. Keep the dependency response and its provenance fixed, inspect the actual tool result, then judge the answer and actions against a declared policy.
The model, prompt, tool arguments and starting state still affect the outcome. A controlled API input gives you one condition to inspect while you observe what the agent does.
Define one case before comparing runs.
Choose a task, one API-facing tool and the behavior you will accept. In the guide's order example, ask when order_demo_001 will arrive. Name the permitted answers and actions, the request arguments, and the tool or application interfaces your assertions inspect.
Start a fresh conversation without cached order knowledge. Declare the attempt limit, SDK retry budget and client-owned deadline. Reset client state and any mutable API baseline between cases. If freshness matters, keep the observation time, source version and reference clock with the response. These controls belong in your wrapper and harness.
Keep absence, failure and a valid order distinct.
The existing order-tool guide supplies an authored example for a read-only lookup. Run the valid control first, then evaluate each failure condition separately.
| API condition | Expected handling | Failure to flag |
|---|---|---|
| 200 · correct order ID · pending · no ETA | Preserve pending and the unknown ETA in the validated tool result. Report the state without inventing a delivery date. | Unsupported ETA |
| 503 · service unavailable | Expose unavailable to the agent. Explain that the order cannot be checked; dispatch no order-changing action through the inspected interface. | Unavailability rewritten as absence |
| 200 · a different order ID | Have the wrapper refuse the mismatched resource before an order result reaches the agent. | Cross-resource answer |
The guide's card specifies a test, and its decoder checks selected response fields. Your wrapper must use the result, enforce the declared bounds and expose the tool message. Your harness must run the agent and inspect the application effects.
Check what reached the agent.
Retain the actual request and ID, delivered status and response origin, model-visible wrapper result, agent answer, further tool calls and application action log. An unavailable service that becomes an empty list in the wrapper can lead to a coherent but wrong answer about a missing order. Evaluate that mapping before judging the answer.
A scenario name identifies the intended case. Delivery evidence shows what happened. Keep delivery of the wrong fixture, uncovered requests and missing traces inconclusive, separate from handling passes and failures. A text answer alone cannot establish that no side effect occurred, and an assertion over one inspected interface covers that interface.
Change one thing and retain every outcome.
For a prompt comparison, hold the unavailable case, task, tool contract, starting state, model settings and rubric fixed. Compare the baseline with one declared prompt change. Declare the repetitions before running and save each observation, including failed delivery and incomplete evidence.
Report how often the observed behavior met the rule, how often it failed and how many runs were inconclusive. Keep the reasons alongside those outcomes. A change in model, wrapper, fixture and prompt at once leaves several explanations for a different result. Repeated observations help you judge the chosen comparison while preserving that uncertainty.
Use HTTP when that boundary matters.
A fixed tool result can show how an agent handles an unavailable result. A stubbed transport can exercise the wrapper mapping. Use an HTTP environment when routing, parsing, SDK behavior or a shared dependency response is part of the case.
With Gostly, configure the selected service and route, confirm LEARN readiness and inspect a capture. Choose Build & switch to MOCK, wait for completion, then confirm effective MOCK state and the intended response at your caller. Follow Quick Start for that sequence. Keep the consumer assertion responsible for acceptance.
Review the data you retain and the connections you configure. Captured copies, processed library data and exports have different boundaries; the security overview explains the relevant choices. Carry the accepted case, wrapper observations and rubric forward together.