Skip to main content

LiveKit Plugins Spatius

Agent Framework plugin for Spatius avatars.

See the Spatius documentation for Spatius account setup and avatar configuration.

Client-side rendering

Spatius avatars are rendered on the client instead of being sent as conventional server-rendered video. The avatar's LiveKit video track carries motion data in otherwise black frames, so a standard LiveKit video renderer will display a black screen. Your frontend must use the Spatius client SDK and LiveKit adapter to decode the track and render the avatar.

See the client integration guide and the reference frontend for a working implementation.

Installation

pip install livekit-plugins-spatius

Usage

from livekit.plugins import spatius

avatar = spatius.AvatarSession()
await avatar.start(session, room=ctx.room)

The plugin reads SPATIUS_API_KEY, SPATIUS_APP_ID, and SPATIUS_AVATAR_ID from the environment when constructor arguments are omitted.

Warm-up

At session start, the Spatius SDK resolves the ingress region via the bootstrap API (with the default region="auto") and exchanges the API key for a session token — two sequential HTTPS round trips on the room-join critical path. Register the plugin's prewarm function to move that work into process warm-up, before a job is dispatched:

from livekit import agents
from livekit.plugins import spatius


def prewarm(proc: agents.JobProcess):
    spatius.prewarm(proc)


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

The spatius SDK caches the resolved region (5 minutes) and the prefetched session token (until shortly before expiry) process-wide, so AvatarSession.start() in the dispatched job reuses them and goes straight to the ingress WebSocket connect. It also opens throwaway TLS connections to the console and ingress endpoints to prime DNS and the shared TLS session cache. Warm-up is best-effort and never fails process initialization; without it, everything resolves inline as before.

Session-token prefetch assumes the Spatius backend allows a token to back more than one session; opt out with spatius.prewarm(proc, prefetch_session_token=False).

Download files

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

Source Distribution

livekit_plugins_spatius-1.8.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

livekit_plugins_spatius-1.8.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_spatius-1.8.2.tar.gz.

File metadata

  • Download URL: livekit_plugins_spatius-1.8.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for livekit_plugins_spatius-1.8.2.tar.gz
Algorithm Hash digest
SHA256 ee1a2ef69175c3b4b28a1a18fb5cc653653b098be4f5e342b7cb0257b6877316
MD5 3fab841b806673eb39ce5c1fa0dd3191
BLAKE2b-256 142c8a6c869f418c8ed184f91bbebb794ecb033b38fe2da8f9bb51a01a7f7103

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.8.2.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_spatius-1.8.2-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_spatius-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e102eb8e9dea3f6917280c89fbf156a1aa0df0b680689355dd6b213ecdc8999
MD5 3ab439782c5b04c99db4c3cf033bd860
BLAKE2b-256 f76b27d00a2a72ee14b00c380fbfd7bcb915074ff44ab26ad9035de20e6fd68c

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.8.2-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.8.2 This release

2 files

1.8.1

2 files

1.8.0

2 files

1.7.1

2 files

1.7.0

2 files

1.6.10

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.5

2 files

1.6.4

2 files

1.6.0

2 files

1.5.17

2 files

1.5.15

2 files

1.5.8

2 files

1.4.5

2 files

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