TypeError: Agent.__init__() got an unexpected keyw...
# ask-ai
c
TypeError: Agent.__init__() got an unexpected keyword argument 'system_prompt'", "timestamp": "2025-10-08T213437.262070+00:00"}
t
Thanks for reaching out, Hai. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like you're seeing the error
TypeError: Agent.__init__() got an unexpected keyword argument 'system_prompt'
because the
Agent.__init__()
method in LiveKit actually expects the parameter
instructions
instead of
system_prompt
. No worries! To fix this, simply replace
system_prompt
with
instructions
when you initialize your agent. Here's a quick example to guide you:
Copy code
agent = Agent(
    instructions="You are a helpful assistant.",
    stt="assemblyai/universal-streaming",
    llm="openai/gpt-4.1-mini",
    tts="cartesia/sonic-2:6f84f4b8-58a2-430c-8c79-688dad597532",
    vad=silero.VAD.load()
)
If you found
system_prompt
in any sample code or documentation, it might be from another framework or an unofficial example. Please feel free to reach out if you want me to help you with anything else! Sources: livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/avatar.py | complex-agents/role-playing/systems/__init__.py