Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/avatar_agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ These providers work with pre-configured avatars using unique avatar identifiers
- **[LemonSlice](./lemonslice/)** - [Platform](https://www.lemonslice.com/) | [Integration Guide](https://lemonslice.com/docs/self-managed/livekit-agent-integration)
- **[LiveAvatar](./liveavatar/)** - [Platform](https://www.liveavatar.com/)
- **[Simli](./simli/)** - [Platform](https://app.simli.com/)
- **[Spatius](./spatius/)** - [Platform](https://www.spatius.ai/) | [Integration Guide](https://docs.spatius.ai)
- **[Tavus](./tavus/)** - [Platform](https://www.tavus.io/)
- **[TruGen](./trugen/)** - [Platform](https://app.trugen.ai/)

Expand Down
30 changes: 30 additions & 0 deletions examples/avatar_agents/spatius/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# LiveKit Spatius Avatar Agent

This example demonstrates how to create an animated avatar using
[Spatius](https://www.spatius.ai/).

## Prerequisites

Set up your LiveKit credentials and Spatius avatar credentials:

```bash
export LIVEKIT_URL="wss://your-livekit-host"
export LIVEKIT_API_KEY="your-livekit-api-key"
export LIVEKIT_API_SECRET="your-livekit-api-secret"

export SPATIUS_API_KEY="your-spatius-api-key"
export SPATIUS_APP_ID="your-spatius-app-id"
export SPATIUS_AVATAR_ID="your-spatius-avatar-id"
```

Optional region configuration:

```bash
export SPATIUS_REGION="us-west"
```

## Run

```bash
python examples/avatar_agents/spatius/agent_worker.py dev
```
37 changes: 37 additions & 0 deletions examples/avatar_agents/spatius/agent_worker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from __future__ import annotations

import logging

from dotenv import load_dotenv

from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli
from livekit.plugins import openai, silero, spatius

logger = logging.getLogger("spatius-avatar-example")

load_dotenv()


class Assistant(Agent):
def __init__(self) -> None:
super().__init__(instructions="You are a helpful voice assistant.")


async def entrypoint(ctx: JobContext) -> None:
await ctx.connect()

session = AgentSession(
vad=silero.VAD.load(),
stt=openai.STT(),
llm=openai.LLM(model="gpt-4.1-mini"),
tts=openai.TTS(),
)

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

await session.start(agent=Assistant(), room=ctx.room)


if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
1 change: 1 addition & 0 deletions livekit-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ slng = ["livekit-plugins-slng>=1.5.8"]
soniox = ["livekit-plugins-soniox>=1.5.8"]
speechify = ["livekit-plugins-speechify>=1.5.8"]
speechmatics = ["livekit-plugins-speechmatics>=1.5.8"]
spatius = ["livekit-plugins-spatius>=1.5.8"]
spitch = ["livekit-plugins-spitch>=1.5.8"]
tavus = ["livekit-plugins-tavus>=1.5.8"]
trugen = ["livekit-plugins-trugen>=1.5.8"]
Expand Down
25 changes: 25 additions & 0 deletions livekit-plugins/livekit-plugins-spatius/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# LiveKit Plugins Spatius

Agent Framework plugin for [Spatius](https://www.spatius.ai) avatars.

See the [Spatius documentation](https://docs.spatius.ai) for Spatius account setup and
avatar configuration.

## Installation

```bash
pip install livekit-plugins-spatius
```

## Usage

```python
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. It defaults to the `us-west` Spatius
region and composes the production endpoint URLs automatically.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Spatius avatar plugin for LiveKit Agents."""

from .avatar import AvatarSession, SpatiusException
from .version import __version__

__all__ = [
"AvatarSession",
"SpatiusException",
"__version__",
]

from livekit.agents import Plugin

from .log import logger


class SpatiusPlugin(Plugin):
def __init__(self) -> None:
super().__init__(__name__, __version__, __package__, logger)


Plugin.register_plugin(SpatiusPlugin())
Loading