Docs Navigation

2. Write a real conversation

Minute 5–10: model a refund bot across three conversational turns — no tool calls, works with any agent.

Imagine you're QA for a refund bot. The PO gives you this story:

"A customer reports a damaged item. The agent classifies the intent, processes the refund, and closes the conversation. Each stage has its own quality bar."

Let's write it in ABS, step by step, across three conversational turns:

session: Damaged item → refund
behaviors:
  # ── Turn 1: intent classification ──
  - actor: user
    action: says
    content: "I received a damaged item, I want my money back. Order #8291."

  - actor: assistant
    action: clarifies
    content: "I understand your order #8291 arrived damaged. I'll help you get a refund."

  # ── Turn 2: resolution ──
  - actor: user
    action: says
    content: "Yes please, how long will it take?"

  - actor: assistant
    action: informs
    content: "Refund of €47.50 approved. Reference: R-5512. You'll receive it in 3-5 days."

  # ── Turn 3: closing ──
  - actor: user
    action: says
    content: "Great, thanks."

  - actor: assistant
    action: confirms
    content: "You're welcome! Is there anything else I can help with?"

Three turns, six steps. Every user message triggers a new response from the agent — that's the key: the runner calls your agent each time it encounters actor: user, and the assistant responses get accumulated into a trace for evaluation.

Important: no tool calls in this example. It works with any agent regardless of whether it exposes internal API calls. If your agent does call tools, you can model those too — see the tools page.

At this point you already have a specification. Your PO can read it and understand the flow. Your dev knows what responses to build for. No code, no tests.


Next: Step-level evaluations →