how can I have the livekit agent be the first to s...
# ask-ai
h
how can I have the livekit agent be the first to say something at the start of the call
t
Thanks for reaching out, Julian. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
If you'd like the LiveKit agent to kick off the conversation right when the call starts, here are a couple of easy ways to do it: • Using `session.say()`: This lets the agent say a set message right away as the call begins. For example:
Copy code
await session.say("Hello, welcome to the call. How can I assist you today?");
Just make sure you have a TTS plugin set up for this to work smoothly. • Using `session.generate_reply()`: This is great for outbound calls, where the agent can send a friendly greeting or intro message. For example:
Copy code
session.conversation.item.create(
  llm.ChatMessage.create({
    role: llm.ChatRole.ASSISTANT,
    text: "Hello, I'm calling to ask you a question about ice cream. Do you prefer chocolate or vanilla?",
  }),
);
Both ways let you tailor the greeting to fit what you need. If you want a hand setting this up or have any questions, just let me know—I’m here to help! Sources: Company directory phone assistant | LiveKit Docs | Agents telephony integration | LiveKit Docs | Agent speech and audio | LiveKit Docs | packages/sip--make-a-call/README.md