can we set system prompt and character prompt dif...
# ask-ai
s
can we set system prompt and character prompt differently for an agent ??
t
Thanks for reaching out, Rahul. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking whether you can set a system prompt and a separate character prompt for an agent. Yes. LiveKit agents use the
instructions
(system prompt) in the
Agent
constructor as the core behavior/persona. There isn't a separate built-in "character prompt" field, but you can achieve the same effect by one of these approaches: • Parameterize the system prompt with context variables (e.g., name, tone, role) and inject character-specific values at session start. • Update the instructions at runtime with
await agent.update_instructions(...)
to change persona mid-session. • Keep base logic in the system prompt and implement dynamic character behavior via context vars or tools/functions that modify responses. If you want, tell me which language/SDK you're using (Python, JS, or others) and whether you prefer parameterized context vars or runtime updates — I’ll give a short code example. Sources: Building an Automated IVR Menu Caller | LiveKit docs | Introducing the Grok Voice Agent API in partnership with xAI | Context Variables | LiveKit docs