lively-coat-10905
11/13/2025, 12:56 PMtall-airline-16756
11/13/2025, 12:57 PMtall-airline-16756
11/13/2025, 12:57 PMModuleNotFoundError: 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:
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