salmon-airplane-11201
09/30/2025, 11:11 AMtall-airline-16756
09/30/2025, 11:12 AMtall-airline-16756
09/30/2025, 11:12 AMChatContext with a system message before initializing the agent. For example:
initial_ctx = llm.ChatContext().append(
role="system",
text="You are a voice assistant created by LiveKit that can both see and hear. Use short and concise responses. Incorporate visual descriptions naturally."
)
This approach lets you shape the AI's behavior, personality, or capabilities exactly how you want them.
If you have any questions or a particular scenario in mind, please feel free to share—I’m here to help!
Sources: Vision Agent Quickstart | LiveKit Docs | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | models/templates/llama-cpp-deepseek-r1.jinja | web/providers/GameProvider.tsxsalmon-airplane-11201
09/30/2025, 11:22 AMtall-airline-16756
09/30/2025, 11:23 AMChatContext of an AI agent, like a VoicePipelineAgent, before you start the agent in the room.
Here’s a friendly example in Python to guide you:
initial_ctx = llm.ChatContext().append(
role="system",
text="You are a voice assistant created by LiveKit. Keep responses short and concise."
)
agent = VoicePipelineAgent(
vad=silero.VAD.load(),
stt=deepgram.STT(),
llm=openai.LLM(),
tts=openai.TTS(),
chat_ctx=initial_ctx # System prompt is set here
)
agent.start(ctx.room, participant)
Just a heads up, room creation and adding participants don’t include settings for system prompts. If anything’s unclear or you’d like a hand with this, please don’t hesitate to ask—I’m here to help!
Sources: VoicePipelineAgent | LiveKit Docs | Recording agent sessions | LiveKit Docs | Vision Agent Quickstart | LiveKit Docs | packages/livekit-server-sdk/src/RoomServiceClient.tssalmon-airplane-11201
09/30/2025, 11:37 AMtall-airline-16756
09/30/2025, 11:38 AMinitial_ctx = llm.ChatContext().append(
role="system",
text="You are a helpful assistant."
)
agent = VoicePipelineAgent(
vad=silero.VAD.load(),
stt=deepgram.STT(),
llm=openai.LLM(),
tts=openai.TTS(voice="en-US-Wavenet-D"), # Set voice dynamically
chat_ctx=initial_ctx # Set system prompt dynamically
)
agent.start(ctx.room, participant)
This way, you have the flexibility to adjust the system prompt and voice based on runtime needs, user preferences, or any other logic your application requires. If you'd like, I’m here to provide more details or walk you through additional examples!
Sources: livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | docs/index.yaml | agent/main.pysalmon-airplane-11201
09/30/2025, 11:43 AMtall-airline-16756
09/30/2025, 11:44 AMmodel = openai.realtime.RealtimeModel(
api_key=config.openai_api_key,
instructions="You are a helpful assistant.", # System prompt
voice="en-US-Wavenet-D", # Voice selection
temperature=0.7,
max_response_output_tokens=100,
modalities=["text", "audio"],
turn_detection=True,
)
These configurations take effect when the agent connects to the room. If you have any questions or want me to walk you through it, just let me know—I'm here to help!
Sources: agent/main.py | examples/voice_agents/dynamic_tool_creation.pysalmon-airplane-11201
09/30/2025, 11:50 AMtall-airline-16756
09/30/2025, 11:51 AMsalmon-airplane-11201
09/30/2025, 12:03 PMtall-airline-16756
09/30/2025, 12:04 PMsalmon-airplane-11201
10/01/2025, 6:56 AM