conversation option shapes how the agent participates without exposing low-level audio or model controls.1234567891011const session = await LiveVoice.connect({ token, prompt: `Guide the user through an equipment inspection. Record completed checks with the supplied tools.`, conversation: { starts: "assistant", prompt: `Be warm and direct. Let the user finish a sequence before asking about missing details.`, }, tools, });
starts to define the opening rule:123conversation: { starts: "assistant", }
"assistant" lets the agent greet the user and begin the task."user" keeps the agent listening until the user speaks.starts only to decide who goes first.12345678910111213conversation: { starts: "assistant", phases: { initial: "introduction", prompt: `Move phases only when the current phase's goal is complete. Briefly orient the user whenever the phase changes.`, definitions: { introduction: "Explain the process and establish what the user is checking.", inspection: "Collect observations and use tools to record completed checks.", review: "Summarize unresolved items and confirm the final result.", }, }, }
123session.on("phase", ({ phase, previousPhase }) => { showWorkflowStep(phase, previousPhase); });