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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_spatius-1.8.1.tar.gz.
File metadata
- Download URL: livekit_plugins_spatius-1.8.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d71b74eea79a58861c5893d67d4196d4a3deb2836c23cf4316759aae368b4b9d
|
|
| MD5 |
5acef4728cf7e908377d77568905ab6d
|
|
| BLAKE2b-256 |
3fa796d690fa9177fb29ae162fdd3957eee2c87ff3c0b9c4e85956532f94a779
|
Provenance
The following attestation bundles were made for livekit_plugins_spatius-1.8.1.tar.gz:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_spatius-1.8.1.tar.gz -
Subject digest:
d71b74eea79a58861c5893d67d4196d4a3deb2836c23cf4316759aae368b4b9d - Sigstore transparency entry: 2786201290
- Sigstore integration time:
-
Permalink:
livekit/agents@f9b53c3c22e15a265d454c1e54dbc07ed3a50396 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9b53c3c22e15a265d454c1e54dbc07ed3a50396 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file livekit_plugins_spatius-1.8.1-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_spatius-1.8.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
234d2d0817e43a0aa736c2bfc698b364f6ad64c2ba55c469bab35169099f928e
|
|
| MD5 |
1103a3ca90fdff4ebbf91837ea478c9a
|
|
| BLAKE2b-256 |
f793b562e8e3ff22b19f69575302b41649bcde379497b73b2fc003f76553a8c4
|
Provenance
The following attestation bundles were made for livekit_plugins_spatius-1.8.1-py3-none-any.whl:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_spatius-1.8.1-py3-none-any.whl -
Subject digest:
234d2d0817e43a0aa736c2bfc698b364f6ad64c2ba55c469bab35169099f928e - Sigstore transparency entry: 2786201395
- Sigstore integration time:
-
Permalink:
livekit/agents@f9b53c3c22e15a265d454c1e54dbc07ed3a50396 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9b53c3c22e15a265d454c1e54dbc07ed3a50396 -
Trigger Event:
pull_request
-
Statement type: