Skip to main content

First Speaker

The first_turn parameter controls which party opens the conversation in a simulation. This is a simulation configuration that determines who sends the first message, regardless of the underlying channel or connection direction.

Not the same as telephony routing

In telephony, "inbound" and "outbound" describe who initiates the phone connection. That is separate from who speaks first once the call is connected. An inbound call (customer dials in) may still have the agent speak first with a greeting. An outbound call (agent dials out) may wait for the customer to speak. first_turn controls the simulation behavior, not the call routing.

The Two Options

first_turn valueWho opens the conversationTypical use
"driver"The Driver (simulated user/caller) speaks firstMost support and sales flows where the user reaches out with a question or request.
"target"The Target (your agent) speaks firstProactive outreach, welcome messages, or flows where the agent is required to greet the caller.

How to Set It

Voice simulations

result = okareo.run_simulation(
driver=driver,
target=target,
scenario=scenario,
name="Agent Greets First",
first_turn="target",
max_turns=10,
checks=[...],
)

Prompt and custom-endpoint simulations

For Prompt Target and Custom Endpoint multi-turn runs, the same first_turn parameter applies. In the UI, this appears as the First Speaker dropdown.

When It Matters

  • Driver first ("driver"): matches the majority of support and sales flows. Use this by default unless you're specifically testing agent-initiated conversations.
  • Target first ("target"): use when testing welcome messages, proactive outreach, or agent-initiated flows. Checks and scenario expected results should reflect that the first content comes from the agent.

Matching your simulation's first speaker to your production flow avoids subtle ordering effects in checks and metrics. An agent that's designed to greet first may behave differently if the driver speaks first, and vice versa.

Next Steps