翻篇收录说明
翻篇网页快照

The best open source frameworks for building realtime voice and video AI agents | LiveKit

https://livekit.com/blog/best-open-source-voice-and-video-ai-agent-frameworks

最近抓取:2026-12-05 06:48:40(北京时间)

最近内容变化:2026-12-05 06:48:40(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Compare the leading open source frameworks for production-ready voice and video AI agents: LiveKit Agents and Pipecat, on architecture, adoption, developer experience, and production readiness.

正文摘录

Blog/GuideBuilding a production voice or video AI agent means picking an open source framework to build on. This guide compares the two frameworks that matter most, LiveKit Agents and Pipecat, on architecture, adoption, developer experience, and production readiness, and covers where names like TEN Framework, Dograh, Vision Agents, and Vocode fit in. Why choose an open source framework for your voice and video appsLink to this section The vast majority of businesses that attempt to scale a voice or video agent eventually find that they need to: Give their agents deeply custom tools and/or access to their internal (often private) systems. Systematically tackle and minimize every millisecond of latency they can find to improve their agent's conversational quality and customer experience. Scale to thousands, millions, or even billions of minutes while keeping the system affordable. Comply with a myriad of security, privacy, and compliance requirements from a number of vectors. As a result, most businesses that scale voice and video agents in production either start with or eventually migrate to an open source voice and video framework that can help them continue to build and iterate on their agent quickly, without sacrificing their ability to deliver high-quality customer experiences with low latency, burning down their entire cloud bill in one quarter, or accidentally introducing vulnerabilities, downtime, or privacy concerns. Comparing the top open source frameworks for voice and videoLink to this section For developers and engineering teams building production agents, it generally comes down to two open source frameworks: LiveKit Agents and Pipecat. If you search around, several other names may appear like TEN Framework, Dograh, Vision Agents, and Vocode, and while it's worth knowing why each comes up, it's also worth understanding why none of them ends up on a production shortlist. The two most popular options: LiveKit Agents and PipecatLink to this section LiveKit Agents and Pipecat both give developers (and their coding agents) tools and primitives that make it easier to build and iterate voice and video agents in production. Nearly every voice or video agent runs the same core pipeline: audio in → speech-to-text → language model → text-to-speech → audio out, with turn detection and interruption handling wrapped around it. Both frameworks support this pipeline as well as a single speech-to-speech model in place of the middle three. Two design decisions separate LiveKit Agents from Pipecat. LiveKit Agents knows what it runs on (LiveKit's open source WebRTC and SIP server) and is built as a slightly higher abstraction over the agent. Pipecat won't assume a transport and is built as a slightly lower abstraction over the pipeline. Here's what that looks like in practice: LiveKit Agents runs on LiveKit's open source WebRTC and SIP infrastructure, wires that pipeline for you, and asks you to write the agent. You can swap or wrap any stage with a different speech-to-text provider, a redaction step on the transcript before it reaches the model, any LLM you choose, or a speech-to-speech model, but you work within that shape rather than adding in new stages. You give up transport choice and the ability to add, reorder, or branch stages; but you get a system that's already correct at every stage you didn't touch, with dispatch, scaling, and multi-party sessions handled underneath. It's a higher-level abstraction that aims to solve the undifferentiated problems, leaving builders to focus on programming and controlling the agent. Pipecat asks you to connect in your own transport and assemble that same pipeline yourself, stage-by-stage. And because the pipeline is a list you write rather than a session you configure, it doesn't have to be a conversation. Nothing in it assumes a user speaks and then an agent replies, so continuous translation, an agent that only ever listens, or a stage that reacts to audio without generating any are all ordinary pipelines here, where in an agent-shaped framework you'd be working against the session model. But the defaults stop at the pipeline's edges: turn detection ships tuned, yet every stage you add must correctly pass along the frames it doesn't handle, and the things a media layer would normally handle (scaling, dispatch, multi-party sessions) are yours to build and manage. Ultimately it's a lower-level abstraction that exposes more of the underlying complexity of voice and video agents to builders. An example of the LiveKit framework vs. Pipecat framework in codeLink to this section The quickest way to feel the difference is to build the same agent twice, then add one real-world requirement to each. The examples below are trimmed from each project's current quickstart (September 2026); the shape is what matters, not necessarily the line count. Step 1: a working voice agent PythonTypeScript1from livekit import agents2from livekit.agents import Agent, AgentServer, AgentSession, inference3 4class Assistant(Agent):5 def __init__(self):6 super().__init__(instructions="You are a helpful voice AI assistant.")7 8server = AgentServer()9 10@server.rtc_session(agent_name="my-agent")11async def my_agent(ctx: agents.JobContext):12 session = AgentSession(13 stt=inference.STT(model="deepgram/nova-3", language="multi"),14 llm=inference.LLM(model="google/gemma-4-31b-it"),15 tts=inference.TTS(model="inworld/inworld-tts-2", voice="Ashley"),16 )17 await session.start(room=ctx.room, agent=Assistant())18 await session.generate_reply(instructions="Greet the user and offer your assistance.")19 20if __name__ == "__main__":21 agents.cli.run_app(server) Pipecat, Python: 1import os2from pipecat.audio.vad.silero import SileroVADAnalyzer3from pipecat.frames.frames import LLMRunFrame4from pipecat.pipeline.pipeline import Pipeline5from pipecat.pipeline.runner import PipelineRunner6from pipecat.pipeline.task import PipelineParams, PipelineTask7from pipecat.processors.aggregators.llm_context import LLMContext8from pipecat.processors.aggregators.llm_response_universal import (9 LLMContextAggregatorPair, LLMUserAggregatorParams,10)11from pipecat.runner.types import RunnerArguments12from pipecat.runner.utils import create_transport13from pipecat.services.cartesia.tts import CartesiaTTSService14from pipecat.services.deepgram.stt import DeepgramSTTService15from pipecat.services.openai.llm import OpenAILLMService16from pipecat.transports.base_transport import BaseTransport, TransportParams17from pipecat.transports.daily.transport import DailyParams18 19async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):20 stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))21 llm = OpenAILLMService(22 api_key=os.getenv("OPENAI_API_KEY"),23 settings=OpenAILLMService.Settings(system_instruction="You are a friendly AI assistant."),24 )25 tts = CartesiaTTSService(26 api_key=os.getenv("CARTESIA_API_KEY"),27 settings=CartesiaTTSService.Settings(voice="71a7ad14-091c-4e8e-a314-022ece01c121"),28 )29 30 context = LLMContext()31 user_aggregator, assistant_aggregator = LLMContextAggregatorPair(32 context, user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()),33 )34 35 pipeline = Pipeline([36 transport.input(),37 stt,38 user_aggregator,39 llm,40 tts,41 transport.output(),42 assistant_aggregator,43 ])44 task = PipelineTask(pipeline, params=PipelineParams(enable_metrics=True))45 46 @transport.event_handler("on_client_connected")47 async def on_client_connected(transport, client):48 context.add_message({"role": "developer", "content": "Say hello and briefly introduce yourself."})49 await task.queue_frames([LLMRunFrame()])50 51 @transport.event_handler("on_client_disconnected")52 async def on_client_disconnected(transport, client):53 await task.cancel()54 55 await PipelineRunner(handle_sigint=runner_args.handle_sigint).run(task)56 57async def bot(runner_args: RunnerArguments):58 transport = await create_transport(runner_args, {59 "daily": lambda: DailyParams(audio_in_enabled=True, audio_out_enabled=True),60 "webrtc": lambda: TransportParams(audio_in_enabled=True, audio_out_enabled=True),61 })62 await run_bot(transport, runner_args)63 64if __name__ == "__main__":65 from pipecat.runner.run import main66 main() Both work. The differences are already visible, though: LiveKit's version never mentions a transport (the session knows it's a LiveKit room), never wires the pipeline (the session does), and uses one credential for three model providers (LiveKit Inference). Pipecat's version picks a transport per run, lists seven processors in order (including two halves of the context aggregator that have to sit on opposite sides of the LLM), and carries three provider keys. That's not shown as a criticism; it's shown to display the design and tradeoffs. Pipecat is showing you the pipeline because it wants you to be able to change it. Step 2: a real requirement Now the compliance team asks for one thing: card numbers a caller reads aloud must never reach the language model. Same requirement, both frameworks. LiveKit Agents has a hook that fires when the user's turn ends and before the reply is generated. You edit the message there; the pipeline is untouched. PythonTypeScript1import re2from livekit.agents import Agent, ChatContext, ChatMessage3 4CARD = re.compile(r"\b(?:\d[ -]?){13,19}\b")5 6class Assistant(Agent):7 def __init__(self):8 super().__init__(instructions="You are a helpful voice AI assistant.")9 10 async def on_user_turn_completed(self, turn_ctx: ChatContext, new_message: ChatMessage) -> None:11 new_message.content = [CARD.sub("[card number redacted]", new_message.text_content or "")] Pipecat, Python. There's no hook above the pipeline, so you write a processor and insert it between speech-to-text and the context aggregator. It has to forward every frame it doesn't care about, or the pipeline stalls. 1import re2from pipecat.frames.frames import Frame, TranscriptionFrame3from pipecat.processors.frame_proce