Skip to main content
Omni agents can speak a greeting message the instant a call connects — turn 0, before the caller says anything. Store it on an agent profile in the console (or POST /v1/agents) and connect with session_label={agent_id}; the engine loads persona, voice, and greeting from that profile.
Greeting playback is live on Omni Ultra (2026-06-24). The same field works inline in a post-handshake configure frame if you are not using agent profiles.
1

Create or open an agent

In console.pyai.comAgentsNew agent or open an existing profile.
2

Set the greeting message

Under Persona & Voice, fill in Greeting message — e.g.
Hi, thanks for calling Acme Dental. How can I help you today?
Pick a voice on the same tab. Save changes.
3

Test in the browser

Click Test greeting on the same tab. The console opens a short Omni session with your agent profile and plays turn-0 audio in your speakers.
4

Connect from your app

Use the Connect tab URL:
wss://api.pyai.com/v1/omni?session_label=agent_…&format=pcm16&rate=24000
Authorize with your API key (omni:session scope). The greeting plays automatically — you do not send it again in configure unless you want to override per call.
When Record calls is enabled, set a Recording disclosure on the same tab. The engine speaks the consent line before recording starts, then plays your greeting. Required for TCPA-style compliance when capturing audio.

API

Create or update an agent with greeting (and optional voice_id):
curl -X POST "https://api.pyai.com/v1/agents" \
  -H "Authorization: Bearer $PYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Front desk",
    "voice_id": "stock_emma_en_gb",
    "greeting": "Hi, thanks for calling Acme. How can I help?",
    "persona": "You are a warm receptionist.",
    "recordings_enabled": true,
    "consent_line": "This call may be recorded for quality assurance."
  }'
Patch later:
curl -X PATCH "https://api.pyai.com/v1/agents/agent_…" \
  -H "Authorization: Bearer $PYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"greeting": "Thanks for calling — we will be with you shortly."}'
Saving an agent with a greeting triggers a best-effort prerender on the engine (when configured) so repeat calls hit cached audio for lower latency.

Inline configure (no agent profile)

If you connect without session_label, pass greeting in the first configure frame after the WebSocket opens:
{
  "type": "configure",
  "voice_id": "stock_emma_en_gb",
  "greeting": "Hello from PyAI.",
  "persona": "You are a brief demo agent."
}
See Omni protocol for the full configure surface.

Pre-roll alternative (client-side TTS)

Before native greeting shipped, apps synthesized the opening line with Speak and played it locally. That pattern still works but is optional now — prefer the native greeting field for one billing line and simpler wiring. Details: Browser voice agent — Make the agent speak first.

Browser voice agent

Full browser Omni walkthrough.

Twilio phone agent

Greeting on inbound PSTN calls.

Omni protocol

greeting, consent_line, and configure frames.

Post-call extraction

Capture structured data after the greeting call.