D:\app-config\livekit-outbound-caller-agent>pyt...
# ask-ai
l
D:\app-config\livekit-outbound-caller-agent>python agent.py start Traceback (most recent call last): File "D:\app-config\livekit-outbound-caller-agent\agent.py", line 17, in <module> from livekit.agents.pipeline import VoicePipelineAgent ModuleNotFoundError: No module named 'livekit.agents.pipeline'
t
Thanks for reaching out, Computer. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm sorry you're encountering the error
ModuleNotFoundError: No module named 'livekit.agents.pipeline'
. This happens because the
VoicePipelineAgent
and the
pipeline
module have been deprecated in LiveKit Agents 1.0. These parts are no longer included in the public API, so trying to import directly from
livekit.agents.pipeline
will unfortunately not work, even if
livekit-agents
is installed correctly. But don’t worry! To fix this, you’ll want to update your code to use
AgentSession
, which takes the place of
VoicePipelineAgent
. Here’s a simple way to do that: 1. Update Import Statements:
from livekit.agents import AgentSession
2. Replace Initialization: Swap out
VoicePipelineAgent
for
AgentSession
. For example:
Copy code
agent = AgentSession(
    ctx=job_ctx,
    opts=AgentOpts(
        voice=VoiceConfig(),
        model=ModelSettings()
    )
)
3. Use Pipeline Nodes: Instead of callbacks like
before_llm_cb
, please use nodes such as
llm_node()
or
tts_node()
. 4. Verify Installation: Make sure your
livekit-agents
package is up to date by running:
pip install --upgrade livekit-agents
If you’d like more detailed guidance, the Agents v0.x migration guide and the Voice AI quickstart are excellent resources. If you run into any other questions or need a hand with this, please don’t hesitate to reach out—I’m here to help! Sources: Pipeline nodes and hooks | LiveKit docs | python-agent-example-app/requirements.txt | LiveKit Docs | Agents v0.x migration guide - Python | LiveKit docs