Skip to main content
The greeting is what the agent says at the start of the conversation, spoken aloud. It lives on the agent, set when you create or update it, or inline over the WebSocket via session.update. If omitted, the agent waits silently for the user to speak first.

Set a greeting

Pass greeting as a top-level field alongside the required name, system_prompt, and voice:
curl -X POST https://agents.assemblyai.com/v1/agents \
  -H "Authorization: $ASSEMBLYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Assistant",
    "system_prompt": "You are a friendly support agent. Keep replies under two sentences.",
    "voice": { "voice_id": "ivy" },
    "greeting": "Hey, this is Riley from Acme support. What'\''s going on?"
  }'
FieldTypeRequiredNotes
greetingstring | nullNoSpoken on connect; sent straight to TTS. Omit to listen first.
The greeting is sent straight to the TTS engine. It is not run through the LLM first. Whatever string you put here is exactly what the user hears, word for word.
This has two consequences:
  • Don’t write a meta-greeting like “Greet the user warmly and ask how you can help”. The TTS will literally speak that sentence. Write the exact words you want spoken.
  • The system prompt’s tone/persona rules do not get applied to the greeting. Match the tone yourself.
Omit greeting entirely to have the agent listen first — for an inbound call where the caller speaks first, or when an out-of-band channel (like an IVR menu) already handled the greeting.

Change the greeting

On a stored agent, change the greeting by updating the agent:
curl -X PUT https://agents.assemblyai.com/v1/agents/$AGENT_ID \
  -H "Authorization: $ASSEMBLYAI_API_KEY" -H "Content-Type: application/json" \
  -d '{ "greeting": "Thanks for calling Acme. What can I do for you?" }'
When you configure an agent inline via session.update, the greeting is immutable after session.ready. Set it on your first session.update; trying to change it mid-session returns immutable_field. This caveat applies only to the inline path, not to updating a stored agent.