1. Using the TEN Framework (Coming Soon)
If you build your voice agent with TEN Framework (Token-Enabled Network) or a similar Agora-based agent framework, a Spatialreal plugin will let you plug the avatar into your pipeline without managing the Server SDK or egress config yourself. Coming soon. The plugin is not yet available. Use the Server SDK with Agora egress (section 2) until then.2. Using the Server SDK with Agora Egress
Use the Spatialreal AvatarKit Server SDK with Agora egress to send avatar output to an Agora channel. Your server streams audio to the avatar service and passes Agora egress config; the service publishes audio and animation directly to the channel. In this setup:- Your server sends audio to the avatar service and passes Agora egress config (channel name, token, UID).
- The avatar service streams audio + animation directly into the Agora channel (your server does not relay that data).
- Clients join the channel and use @spatialwalk/avatarkit-rtc to render the avatar.
Configuration
| Field | Description |
|---|---|
channel_name | Agora channel name to join |
token | Agora token for authentication (optional for testing) |
uid | Publisher UID in the channel |
Golang Example
Python Example
Important Notes
When Agora egress is enabled:- The
TransportFrames/transport_framescallback will not be invoked - Audio and animation data are published directly to the specified Agora channel
- Your client must use the @spatialwalk/avatarkit-rtc package to render the avatar (standard video players won’t work). See Agora Client Guide for client setup.
Interrupt
You can interrupt ongoing audio processing (e.g. when the user asks a new question). The interrupt uses the most recent request ID, even afterend=true was sent.
Golang
Summary
| Approach | Best for | Where to go |
|---|---|---|
| TEN Framework + Plugin | Voice agents built on TEN Framework | Coming soon (section 1) |
| Server SDK + Agora egress | Custom backends, any language with a Server SDK (Go, Python, etc.) | This page, section 2 |

