Build AI workflows against API scenarios you control.
Use a compatible model you host or choose to draft API scenarios in Studio. Review the fixtures, give your agent’s tools controlled API inputs and compare what each agent version says or does in your own harness.
Check how a support agent handles an unavailable ticket lookup
All tickets / SUP-1842
Billing access requestThe requester needs access to the billing workspace.
- Ticket
- SUP-1842
- Assignment
- Awaiting refresh
Has anyone picked up ticket SUP-1842?
lookup_ticket 503
- Ticket
SUP-1842- HTTP response
- 503 · Unavailable
- Tool result
- Ticket system unavailable
I couldn’t reach the ticket system. I can’t confirm whether someone picked up SUP-1842.
Assignment unconfirmedWhen to use it
An agent's tool result changes the decision it should make.
Start with one consequential tool call where a successful response, a missing record and an unavailable service should lead to different answers or actions.
What to check
- API input
- The ticket lookup returns HTTP 503.
- Tool result
- The wrapper exposes unavailability as a distinct result for the agent.
- Agent check
- The reply says it cannot verify the ticket assignment and makes no unsupported status claim.
How to approach it
Test agent tool calls
4 steps
- Gostly Studio
- Your OpenAI-compatible model
- Your agent and test harness
Define the decision and write the rubric
Choose the prompt, tool and allowed actions. Decide how the agent should handle a known assignment, an unknown ticket and an unavailable service. For tools that write, specify which downstream effects your harness must inspect.
Prepare a small set of reviewed API inputs
Author fixtures directly or use a compatible model endpoint you configure with Studio to draft a synthetic world. Review relationships, export approved fixtures and import them into the intended service. Use the same cases and relevant starting state for both agent versions.
Inspect what reached the agent
Route the tool’s actual HTTP client through Gostly and verify what response it received. Capture the raw HTTP response and the model-visible tool result separately. A wrapper that collapses failures into empty results can make two different API conditions look identical to the agent.
Compare versions and retain the useful cases
Change the prompt or model in your harness, reset session and application state and use the same rubric. Record answers, tool calls and any observed writes. If you separately explore candidate responses with a local response model, retain only inputs you reviewed and approved.
What this gets you
Make an agent comparison your team can inspect
Reviewed API inputs and an explicit rubric let the team compare whether each agent version reports what it knows about a ticket and acknowledges an unavailable service.
What the check tells you
Stable API inputs make runs easier to compare. Model decisions can vary across runs, and your own harness supplies the evaluation. The support conversation is a sample of the intended behavior.
Where Gostly fits
Connect Studio to a compatible model endpoint you already operate or have configured. Optional Studio checks need isolated-runner setup. Local response inference and training require Full. Your team owns agent evaluation, code and delivery. Self-hosting retains configured operational connections.
Put it into practice
- DocsCompare two agent versionsChoose common inputs and retain separate evidence for the application and agent.
- DocsWork through an unavailable order lookupInspect a read-only decoder and follow a 503 through to the tool result and evaluation.
- DocsPrepare reviewed inputs in StudioConfigure a compatible model and review fixtures before exporting them.
More worked examples
Compare sample API conditions with the checks your application can run.
Give agent versions the same API conditions
Authored worked example · synthetic data
Two agent versions handle a delayed order
Both versions receive a synthetic order response showing a delayed shipment. Compare whether they acknowledge the delay, avoid inventing a delivery promise and offer the allowed next step.
| Your action | API condition | Your test checks |
|---|---|---|
| Prepare the tool response | The order API reports a delay with no new delivery estimate | Confirm the request resolves from the intended library entry |
| Run agent version A | The tool receives the reviewed order condition | Save its answer and tool actions in your eval harness |
| Restore the case and run version B | Use the same API input and relevant starting state | Apply the same rubric and task configuration |
| Compare repeated runs | API inputs stay controlled for covered requests | Report model variability separately from API differences |
Controlling API responses does not make a model or agent deterministic. Model sampling, prompts, tool choice and application state can still change the outcome.
Record the tool APIs