Overview
The Akool Streaming Avatar SDK provides a generic JavaScript SDK for integrating Agora RTC streaming avatar functionality into any JavaScript application. This TypeScript-supported SDK enables programmatic control of avatar interactions with real-time video streaming capabilities. Key Features:- Easy-to-use API for Agora RTC integration
- TypeScript support with full type definitions
- Multiple bundle formats (ESM, CommonJS, IIFE)
- CDN distribution via unpkg and jsDelivr
- Event-based architecture for handling messages and state changes
- Message management with history and updates
- Network quality monitoring and statistics
- Microphone control for voice interactions
- Chunked message sending for large text
- Automatic rate limiting for message chunks
- Token expiry handling
- Error handling and logging
Package Information
- NPM Package: akool-streaming-avatar-sdk
- GitHub Repository: akool-rinku/akool-streaming-avatar-sdk
- Current Version: 1.0.6
- License: ISC
Prerequisites
- Get your Akool API Token from Akool Authentication API
- Basic knowledge of JavaScript and HTTP Requests
- Modern browser with WebRTC support
Browser Support
The SDK requires a modern browser with WebRTC support, including:- Chrome 56+
- Firefox 44+
- Safari 11+
- Edge 79+
- Opera 43+
Installation
NPM (Node.js/Modern JavaScript)
CDN (Browser)
Quick Start
1. HTML Setup
Create a basic HTML page with a video container:2. Basic Usage with Modern JavaScript/TypeScript
3. Browser Usage (Global/IIFE)
4. Quick Demo Result
After following the setup, you’ll have a working streaming avatar with real-time video and chat capabilities:
Next Steps
- Complete API Reference - Explore all available methods and events
- Best Practices Guide - Learn secure implementation patterns
- Create Live Avatar Session - Backend session creation
- Error Codes Reference - Handle errors effectively