05demo · agent trace simulator

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.

WhatsApp booking agent — Harare dental clinic (illustrative)8 model calls · 5 tool calls · ≈US$0.025 model cost
  1. customer 0.00s
    Hi, I need a dental check-up this week, afternoons only if possible. Tinashe.
  2. thought 0.41s
    New 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.
  3. tool_call · lookup_patient 0.43s
    { "phone": "+263 77* *** 412" }
  4. 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 }
  5. thought 1.12s
    Known 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.
  6. tool_call · get_availability 1.14s
    { "service": "dental_checkup", "from": "2026-09-14", "to": "2026-09-18", "window": "12:00-17:00", "limit": 3 }
  7. 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." } ]
  8. message → customer 2.05s
    Hi Tinashe, welcome back. I have three afternoon check-up slots this week: 1. Tue 15 Sep, 14:30 (Dr N.) 2. Thu 17 Sep, 13:00 (Dr N.) 3. Fri 18 Sep, 15:30 (Dr K.) Reply with the number you want and I will hold it for you.
  9. customer 61.00s
    2 please
  10. guardrail 61.39s
    Policy 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.
  11. 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" }
  12. 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" }
  13. thought 62.20s
    Booking 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.
  14. 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."] }
  15. tool_result · schedule_template → queued 62.48s
    { "job_id": "J-77120", "estimated_cost_usd": 0.004 }
  16. message → customer 63.10s
    Done — you are booked for a dental check-up on Thu 17 Sep at 13:00 with Dr N. Booking ref B-20931. I will send a reminder the day before. If you need to cancel or move it, reply here before Wed 13:00 and there is no charge.
  17. customer 95.00s
    Great. Can you also get me antibiotics before then? My tooth is aching.
  18. guardrail 95.42s
    Request 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.
  19. message → customer 95.46s
    I am sorry your tooth is aching. I cannot arrange medication or give medical advice — a nurse will call you back within the hour to talk it through. If you would rather come in sooner, Tue 15 Sep at 14:30 is still open; just say so and I will move you.
  20. 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" }
  21. tool_result · create_handoff → ticket 95.72s
    { "ticket_id": "H-3302", "queue": "nurse_callback", "sla_minutes": 60 }
  22. message → customer 96.30s
    The nurse callback is logged (ref H-3302). Nothing else is needed from you now — I will stay on this chat if anything changes.
  23. done 96.31s
    Session 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.