Skip to main content
This page covers the client side of Agora Convo AI Integration for Web, iOS, and Android. The client joins the Agora channel and renders the avatar audio and motion data produced by the server-side Spatius integration and Motion Server.
When using an AvatarKit RTC client, do not create and manage a separate Agora client for avatar playback. The platform RTC package owns the Agora client internally so it can wire audio, motion data, and lifecycle handling correctly.

Install and connect

Install the AvatarKit Web SDK, the Web RTC Adapter, and the Agora Web SDK peer dependency:
Configure your build tool to load the AvatarKit WebAssembly assets. See Toolchain Setup.
Microphone control:
Custom audio publishing for non-microphone sources:
unpublishAudio() does not stop the track. You are responsible for calling track.stop() to release the resource.

Native client access

The Web adapter creates and owns the Agora Web SDK client internally. For advanced Agora features, access that owned client through getNativeClient() instead of creating a second client for avatar playback:
Use the provider method when you still have the typed AgoraProvider. Use the AvatarPlayer method when your app plumbing only has the player instance. The value is null until the provider has an Agora client to return.

Connection config

Channel notes

  • The user’s microphone audio is published into the Agora channel. Convo AI handles the voice agent pipeline, while the Spatius avatar provider or TEN extension handles avatar output on the server side.
  • The TEN extension uses params.agora_uid as the avatar publisher UID. Do not reuse that UID for Web, iOS, or Android clients.
  • Generate Agora RTC tokens on your backend and pass them to clients. Do not ship an Agora App Certificate in client code.
  • No Spatius Session Token is needed on this RTC path. The client renders with externally supplied audio and motion data.

Events

The AvatarPlayer event surface is shared across platforms.
When a stalled event fires, the avatar automatically transitions to idle animation. Consider calling reconnect() to recover.

Next steps

Convo AI Agent

Configure Spatius in the managed Convo AI start-agent request.

TEN Extension

Configure spatius_avatar_python in a direct TEN Framework graph.

RTC Adapter reference

Review the Web AvatarPlayer provider model.