Skip to main content
First complete Your first voice agent. Keep the same credentials and server command. The basic agent waits for the caller; add a greeting to make it speak when a session starts.

A fixed hello

Keep the quickstart’s dict-based config and add this line after the Agent(...) definition:
Restart the server and start a new session. You should hear the opener before saying anything. A fixed greeting goes straight to speech synthesis and needs no LLM generation.

Let the caller interrupt

Greetings are non-interruptible by default. To let the caller cut the opener short, expand the string into a block:
Start a new session and speak over the greeting. With interruption enabled, the opener can stop. With it disabled, the caller’s committed words can still open a turn, but the reply waits behind the greeting.

Choose when to speak

delay_ms adds a pause before the opener. after_user_silence_secs gives the caller a chance to speak first; if they speak within that window, their words start the conversation instead of the greeting.
The silence window starts after the initial delay. Try one session where you stay quiet and another where you immediately say hello.

Generate the wording

Use instructions when the opener needs generated wording:
This adds an LLM call and its latency and usage. text wins if both fields are supplied. A fixed opener is a useful starting point before adding generation.

Outbound calls

An outbound host can select a separate opener with outbound_greeting:
The host must identify the call as outbound. The config does not place a phone call; see Transports and phone calls. Omitting outbound_greeting inherits greeting; an empty string disables the outbound opener. Set agent.voice_config["greeting"] = "" to disable an inherited greeting. Empty optional objects mean unset. Continue to Using tools.