Step through an agent's trace
This is the signature object of the site: one complete conversation between a patient and a WhatsApp booking agent for an illustrative Harare dental clinic, shown as the agent sees it — every thought, tool call, tool result, guardrail decision and message, with timestamps and a token meter. It is a scripted, deterministic transcript, not a live model, so it is identical every time and safe to quote.
step 0/23 · in 0 · cached 0 · out 0 · ≈US$0.0000
WhatsApp booking agent — Harare dental clinic (illustrative)8 model calls · 5 tool calls · ≈US$0.025 model cost
- customer 0.00sHi, I need a dental check-up this week, afternoons only if possible. Tinashe.
- thought 0.41sNew inbound message opens a 24-hour service window (free non-template replies). Identify the sender before offering anything. Phone number is on the message metadata; look up the patient record.
- tool_call · lookup_patient 0.43s
{ "phone": "+263 77* *** 412" } - tool_result · lookup_patient → 1 record 0.69s
{ "patient_id": "P-01187", "name": "Tinashe M.", "last_visit": "2026-03-02", "service_history": ["dental_checkup"], "balance_usd": 0 } - thought 1.12sKnown patient, no outstanding balance. Service is dental_checkup (30 min). "This week, afternoons" → search Mon–Fri 12:00–17:00, clinic timezone Africa/Harare. Return at most three options to keep the reply short on a phone screen.
- tool_call · get_availability 1.14s
{ "service": "dental_checkup", "from": "2026-09-14", "to": "2026-09-18", "window": "12:00-17:00", "limit": 3 } - tool_result · get_availability → 3 slots 1.48s
[ { "slot_id": "S-4471", "start": "2026-09-15T14:30+02:00", "practitioner": "Dr N." }, { "slot_id": "S-4482", "start": "2026-09-17T13:00+02:00", "practitioner": "Dr N." }, { "slot_id": "S-4490", "start": "2026-09-18T15:30+02:00", "practitioner": "Dr K." } ] - customer 61.00s2 please
- guardrail 61.39sPolicy check before a write action: (1) booking requires an explicit slot choice — "2" maps unambiguously to S-4482; (2) re-verify the slot is still free at commit time (availability is 60 s old); (3) no payment is required for a check-up, so the payments tool stays disabled for this turn.
- tool_call · create_booking 61.41s
{ "patient_id": "P-01187", "slot_id": "S-4482", "service": "dental_checkup", "channel": "whatsapp", "idempotency_key": "wa-8f31-S-4482" } - tool_result · create_booking → confirmed 61.82s
{ "booking_id": "B-20931", "status": "confirmed", "start": "2026-09-17T13:00+02:00", "cancel_by": "2026-09-16T13:00+02:00" } - thought 62.20sBooking committed. Schedule the reminder as a utility template for 24 h before the appointment — it will fall outside this service window, so it is billed at the Rest-of-Africa utility rate (US$0.004). Then confirm to the patient in plain language.
- tool_call · schedule_template 62.22s
{ "template": "appointment_reminder_v3", "category": "utility", "to": "P-01187", "send_at": "2026-09-16T13:00+02:00", "params": ["Thu 17 Sep, 13:00", "Dr N."] } - tool_result · schedule_template → queued 62.48s
{ "job_id": "J-77120", "estimated_cost_usd": 0.004 } - customer 95.00sGreat. Can you also get me antibiotics before then? My tooth is aching.
- guardrail 95.42sRequest is for medication — outside the agent's scope (scope: scheduling, directions, prices, reminders). Policy: never give clinical advice or arrange prescriptions; acknowledge pain, route to a human, and offer an earlier slot if one exists. Escalation tool is permitted; no other write tools this turn.
- tool_call · create_handoff 95.48s
{ "patient_id": "P-01187", "reason": "clinical_request", "urgency": "same_day", "summary": "Pain reported; asked for antibiotics before Thu appointment. Offered earlier slot S-4471.", "channel": "phone" } - tool_result · create_handoff → ticket 95.72s
{ "ticket_id": "H-3302", "queue": "nurse_callback", "sla_minutes": 60 } - done 96.31sSession idle. Outcome: booking B-20931 confirmed; reminder queued; clinical request escalated to a human within scope. 8 model calls, 6 tool calls, 0 unsafe actions.
Keyboard: Space plays/pauses, → steps. Timestamps are illustrative elapsed times; token counts are estimates for a Sonnet 5-class model with prompt caching at US$2/0.2/10 per million (input / cached / output). Without JavaScript the full transcript is shown above.