Skip to main content

livekit-akapulu

LiveKit Agents plugin for an Akapulu Labs talking avatar. Maintained by Akapulu Labs.

AvatarSession sits on your LiveKit Agents voice session. It sends assistant audio to the Akapulu Labs worker. The worker joins the LiveKit room for that call and publishes the avatar video and audio. Your voice agent itself does not publish the face.

Requires livekit-agents 1.8 or newer.

Install

uv add livekit-akapulu

Try in Agent Console

A minimal worker lives in examples/console_agent. Copy .env.example, run python agent.py dev, then open Launch Console in your LiveKit Cloud project. Details: examples/console_agent/README.md.

Use

Plugin path (voice agent already in a LiveKit room)

from livekit_akapulu import AvatarSession

avatar = AvatarSession(show_ai_label=True)
await avatar.start(agent_session, ctx.room)
await avatar.wait_until_call_ready()

AvatarSession.start mints the Avatar participant JWT (publish_on_behalf of your agent), POST /api/live-sessions/ with transport=livekit, opens the worker sockets, and forwards assistant PCM. Set AKAPULU_API_URL, AKAPULU_API_KEY, AKAPULU_AVATAR_ID, LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET.

Connect helper (create room + session from your server)

create_akapulu_livekit_call runs on your server before the agent starts. It reads LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and AKAPULU_API_KEY. A missing or blank value raises. It creates a LiveKit room, mints the browser and voice-agent tokens, mints the Avatar token for Akapulu Labs, and POST /api/live-sessions/. It returns the LiveKit URL, room name, agent token, browser token, and session_id. The Avatar token is sent to Akapulu Labs and is not returned.

from livekit_akapulu import AvatarSession, create_akapulu_livekit_call

livekit_url, room_name, agent_token, browser_token, session_id = (
    await create_akapulu_livekit_call(
        avatar_id=avatar_id,
        show_ai_label=True,
        session=session,
    )
)
avatar = AvatarSession(conversation_session_id=session_id)

Hosted / landing path

When Django already created the conversation session and Avatar token, pass that id:

avatar = AvatarSession(conversation_session_id=session_id)
await avatar.start(agent_session, room)

Status and speaking topics

While the worker boots, the plugin republishes loading status on LiveKit data topic akapulu.avatar.status (same fields as Pipecat RTVI type: status: call_is_ready, completion_percent, latest_update_text). Bot speaking edges go on akapulu.avatar.speaking. Keep the loading UI up until call_is_ready is true. wait_until_call_ready() waits until this session has decoded enough Avatar video frames.

Wire format

Same as pipecat-akapulu:

  • ingest audio: A + uint32 sequence + 24 kHz s16 PCM
  • speaking: {"type":"speaking","who":"bot"|"user","state":"started"|"stopped"|"interrupted"}
  • worker {"type":"idle"} after the last live speech PCM is published

Metadata

Release files for livekit-akapulu 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-akapulu 0.1.1
File Size Uploaded Provenance Actions
livekit_akapulu-0.1.1.tar.gz 15.9 kB Without provenance Details for livekit_akapulu-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-akapulu 0.1.1
File Interpreter ABI Platform Actions
livekit_akapulu-0.1.1-py3-none-any.whl Python 3 none any Details for livekit_akapulu-0.1.1-py3-none-any.whl

Total release size: 29.8 kB

Release files / livekit_akapulu-0.1.1.tar.gz

Download URL livekit_akapulu-0.1.1.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ee52e7d56af4763cdaf0186bdf0e810de99957b6b940451390bb14debcfaae3c
BLAKE2b-256 checksum
How to use checksums
3f94fb3ce1ee6f149f0021bf49ca29c0a201a87218a9d128806e524e7f47d841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / livekit_akapulu-0.1.1-py3-none-any.whl

Download URL livekit_akapulu-0.1.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e684e497a7aafc4c664d21b83c720c6a703a7b17b47b75e4626a547430db6a81
BLAKE2b-256 checksum
How to use checksums
6a6ba4dc667c31fdf97da86d4dbf2e14df945930bdcda18a3b6ae1abc047ea0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for livekit-akapulu 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page