# AgoraRTC SDK (Version 4.x)

English | [简体中文](https://github.com/AgoraIO/agora-rtc-web/blob/main/README-zh_CN.md)

## Getting Started

### Install

Use `npm`, `pnpm` or `yarn`

```bash
# with npm
npm i agora-rtc-sdk-ng
# or with pnpm
pnpm add agora-rtc-sdk-ng
# or with yarn
yarn add agora-rtc-sdk-ng
```

CDN is also provided. The SDK exports a global `AgoraRTC` object.

```html
<!-- default UMD, no AI QoS -->
<script src="https://download.agora.io/sdk/release/AgoraRTC_N-4.24.8.js"></script>
```

To use AI QoS from CDN, load the full UMD instead. AI is already registered; only this one script is needed:

```html
<script src="https://download.agora.io/sdk/release/AgoraRTC_N-4.24.8-full.js"></script>
<script>
  const client = AgoraRTC.createClient({ mode: "live", codec: "vp8", aiClientMode: true });
  await client.join(appId, channel, token, uid);
</script>
```

npm UMD is the same split. Default has no AI QoS; `agora-rtc-sdk-ng/full` is the complete build:

```javascript
import AgoraRTC from "agora-rtc-sdk-ng/full";

const client = AgoraRTC.createClient({ mode: "live", codec: "vp8", aiClientMode: true });
await client.join(appId, channel, token, uid);
```

ESM is unchanged: import the main ESM, then the optional service:

```javascript
import AgoraRTC from "agora-rtc-sdk-ng/esm";
import { AiAudioModeService } from "agora-rtc-sdk-ng/services/ai-audio-mode";

AgoraRTC.use(AiAudioModeService);
const client = AgoraRTC.createClient({ mode: "live", codec: "vp8", aiClientMode: true });
await client.join(appId, channel, token, uid);
```

### Quick start

`React`, `Vue`, `Svelte` quick start demo are provided, please check at [Quick Start Demo](https://github.com/AgoraIO/agora-rtc-web/blob/main/projects).
We also have [More Demos](https://github.com/AgoraIO/API-Examples-Web/tree/main/Demo).

Please follow the documentation at [api-ref.agora.io](https://api-ref.agora.io/en/voice-sdk/web/4.x/index.html).

## Changelogs

Please check the changelogs at [Release Notes](https://docs.agora.io/en/video-calling/overview/release-notes?platform=web).
