█

AI/TLDR

Invítame a un café
Invítame un café

LiveKit Agents

Crea agentes de voz IA en tiempo real que pueden ver, oír y hablar

Agent Frameworks & BuildersCódigo abierto
Idioma
Python
Licencia
Apache-2.0
EN BREVE

What is LiveKit Agents?

LiveKit Agents es un framework de código abierto para crear participantes programables en tiempo real que se ejecutan en tus servidores. Lo usas para crear agentes de voz conversacionales y multimodales que pueden ver, oír y entender a un usuario, y luego responder en una conversación natural de ida y vuelta. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python and licensed Apache-2.0.

Resumen

LiveKit Agents es un framework de código abierto para crear participantes programables en tiempo real que se ejecutan en tus servidores. Lo usas para crear agentes de voz conversacionales y multimodales que pueden ver, oír y entender a un usuario, y luego responder en una conversación natural de ida y vuelta.

Un agente se compone de un modelo de voz a texto (STT), un LLM y un modelo de texto a voz (TTS), y puedes combinar proveedores libremente según tu caso de uso. El framework se encarga de la capa de medios en tiempo real a través de la pila WebRTC de LiveKit, así que un agente puede hablar con clientes web y móviles, o incluso atender llamadas telefónicas mediante la integración de telefonía.

También existe una biblioteca equivalente en JavaScript y TypeScript, AgentsJS, para equipos que prefieren construir en ese ecosistema.

Qué hace

  • Integraciones flexibles: un amplio ecosistema de plug-ins te permite combinar proveedores de STT, LLM, TTS y APIs en tiempo real según tu caso de uso.
  • Programación de trabajos y APIs de envío integradas que conectan a los usuarios finales con el proceso de agente adecuado.
  • Integración de telefonía para que tu agente pueda hacer y recibir llamadas telefónicas a través de la pila SIP de LiveKit.
  • Detección semántica de turnos con un modelo transformer que sabe cuándo un usuario ha terminado de hablar, lo que reduce las interrupciones.
  • Soporte nativo de MCP para añadir herramientas de servidores MCP con una sola línea de código.
  • Un framework de pruebas integrado con jueces para comprobar que un agente se comporta como se espera, a pesar de la salida no determinista de los LLM.

Primeros pasos

LiveKit Agents es una biblioteca de Python que se instala desde PyPI. Instala la biblioteca principal junto con los plug-ins de los proveedores que quieras y, después, escribe un punto de entrada que inicie una AgentSession. Necesitarás tener LIVEKIT_URL, LIVEKIT_API_KEY y LIVEKIT_API_SECRET definidos en tu entorno.

Instala la biblioteca con los plug-ins

Instala la biblioteca principal de Agents junto con los plug-ins de los proveedores de modelos más populares con pip.

bashbash
pip install "livekit-agents[openai,silero,deepgram,cartesia,turn-detector]"

Define un agente de voz sencillo

Crea un AgentServer, registra un punto de entrada rtc_session e inicia una AgentSession que combine STT, un LLM y TTS. El agente de abajo saluda al usuario y puede consultar el tiempo meteorológico mediante una herramienta de función.

pythonpython
from livekit.agents import (
    Agent, AgentServer, AgentSession, JobContext,
    RunContext, cli, function_tool, inference,
)
from livekit.plugins import silero


@function_tool
async def lookup_weather(context: RunContext, location: str):
    """Used to look up weather information."""
    return {"weather": "sunny", "temperature": 70}


server = AgentServer()


@server.rtc_session()
async def entrypoint(ctx: JobContext):
    session = AgentSession(
        vad=silero.VAD.load(),
        stt=inference.STT("deepgram/nova-3", language="multi"),
        llm=inference.LLM("openai/gpt-4.1-mini"),
        tts=inference.TTS("cartesia/sonic-3", voice="9626c31c-bec5-4cca-baa8-f8ba9e84c8bc"),
    )
    agent = Agent(
        instructions="You are a friendly voice assistant built by LiveKit.",
        tools=[lookup_weather],
    )
    await session.start(agent=agent, room=ctx.room)
    await session.generate_reply(instructions="greet the user and ask about their day")


if __name__ == "__main__":
    cli.run_app(server)

Configura tus variables de entorno

Define los datos de conexión de LiveKit antes de ejecutar el ejemplo. Estos indican al agente dónde está tu servidor de LiveKit y lo autentican.

bashbash
export LIVEKIT_URL=...
export LIVEKIT_API_KEY=...
export LIVEKIT_API_SECRET=...

Commands and code are distilled from the project's own documentation — always check the repositorio oficial para lo último.

Cuándo usarlo

  • Crea asistentes de voz conversacionales para apps web y móviles que respondan en tiempo real a través de WebRTC.
  • Crea agentes telefónicos que hagan o reciban llamadas mediante la pila de telefonía de LiveKit, para líneas de atención al cliente o llamadas salientes.
  • Diseña experiencias con varios agentes en las que uno transfiera la conversación a otro agente especializado a mitad de sesión.
  • Escribe pruebas automatizadas con jueces integrados para que el comportamiento del agente sea fiable a pesar de las respuestas no deterministas de los LLM.

How LiveKit Agents compares

LiveKit Agents alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.

HerramientaEstrellasQué hace
DeepSeek Harness★ 289kDeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles.
AutoGPT★ 188kOne of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows.
DeerFlow★ 86kByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks.
nanobot★ 50.5kLightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations.
LangGraph★ 45.6kA library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints.
Agno★ 43.3kA fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production.
AgentGPT★ 36.3kAgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser.
LiveKit Agents★ 15.4kCrea agentes de voz IA en tiempo real que pueden ver, oír y hablar