Skip to main content

A powerful framework for building realtime voice AI agents

Project description

LiveKit Agents for Python

Realtime framework for production-grade multimodal and voice AI agents.

See https://docs.livekit.io/agents/ for quickstarts, documentation, and examples.

from dotenv import load_dotenv

from livekit import agents
from livekit.agents import AgentSession, Agent, RoomInputOptions
from livekit.plugins import openai

load_dotenv()

async def entrypoint(ctx: agents.JobContext):
    await ctx.connect()

    session = AgentSession(
        llm=openai.realtime.RealtimeModel(
            voice="coral"
        )
    )

    await session.start(
        room=ctx.room,
        agent=Agent(instructions="You are a helpful voice AI assistant.")
    )

    await session.generate_reply(
        instructions="Greet the user and offer your assistance."
    )


if __name__ == "__main__":
    agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))

Project details


Release history Release notifications | RSS feed

This version

1.4.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_agents-1.4.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_agents-1.4.1-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file livekit_agents-1.4.1.tar.gz.

File metadata

  • Download URL: livekit_agents-1.4.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for livekit_agents-1.4.1.tar.gz
Algorithm Hash digest
SHA256 e9cbfa5bff05784725c73f6cb425e73725cc60e17c2242d4dda197b4f3523a13
MD5 4c38bfea32beb23eb964635dac27d026
BLAKE2b-256 b44b0484a8ccef97f490a1737d3bdd826e2da1daf4f1d3bff478f1dbadfde663

See more details on using hashes here.

File details

Details for the file livekit_agents-1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_agents-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 781646da39e1ded6af814c434055f16e313b4b7b701281bdb179f18e6512e2b1
MD5 6e273eba41bb26e8b5a8d761652dd26b
BLAKE2b-256 3d0cb6fbe84177c80dec9ee7ff8c49f94ff7d374f7a7004ab2e5f478c6df3a5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page