agora

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agora (agora.io)

Agora (agora.io)

Skill version: 1.1.0
Build real-time communication applications using Agora SDKs across Web, iOS, Android, and server-side platforms.
技能版本:1.1.0
使用Agora SDK跨Web、iOS、Android及服务端平台构建实时通信应用。

Core Concepts

核心概念

  • App ID: Project identifier from Agora Console. Required for all SDK calls.
  • App Certificate: A unique key generated by the Agora Console, unique to each project, for use in creating authentication tokens.
  • Token: Time-limited auth key generated server-side from App ID + App Certificate. Never expose App Certificate on client. For testing, disable token authentication in Agora Console and pass
    null
    as the token.
  • Channel: Auto-created when first user joins, destroyed when last leaves. Users in same channel can communicate.
  • UID: Unique user identifier per channel. Pass
    null
    /
    0
    for auto-assignment. Duplicate UIDs cause undefined behavior.
  • App ID:来自Agora控制台的项目标识符。所有SDK调用均需使用。
  • App Certificate:由Agora控制台生成的唯一密钥,每个项目对应一个,用于生成身份验证Token。
  • Token:通过App ID + App Certificate在服务端生成的限时身份验证密钥。切勿在客户端暴露App Certificate。测试时,可在Agora控制台禁用Token身份验证,将
    null
    作为Token传入。
  • 频道:首个用户加入时自动创建,最后一个用户离开时销毁。同一频道内的用户可进行通信。
  • UID:每个频道内的唯一用户标识符。传入
    null
    /
    0
    可自动分配。重复的UID会导致未定义行为。

Products

产品模块

Read the README for the product the user needs. Only load what is needed.
请阅读用户所需产品的README文档,仅加载必要内容。

RTC (Video/Voice SDK)

RTC(音视频SDK)

Real-time audio and video. Users join channels, publish local tracks, subscribe to remote tracks.
references/rtc/README.md — Platforms: Web, React, iOS, Android
提供实时音视频能力。用户可加入频道、发布本地音视频轨道、订阅远端音视频轨道。
references/rtc/README.md — 支持平台:Web、React、iOS、Android

RTM (Signaling / Messaging)

RTM(信令/消息)

Text messaging, signaling, presence, and metadata. Independent from RTC — channel namespaces are separate.
references/rtm/README.md — Platforms: Web
提供文本消息、信令、在线状态及元数据能力。独立于RTC——频道命名空间相互分离。
references/rtm/README.md — 支持平台:Web

Conversational AI (Voice AI Agents)

对话式AI(语音AI Agent)

REST API-driven voice AI agents. Create agents that join RTC channels and converse with users via speech. Front-end clients connect via RTC+RTM.
references/conversational-ai/README.md — REST API, agent config, 6 recipe repos (agent-samples, agent-toolkit, agent-client-toolkit-react, agent-ui-kit, server-custom-llm, server-mcp)
基于REST API的语音AI Agent。可创建加入RTC频道并通过语音与用户对话的Agent。前端客户端通过RTC+RTM连接。
references/conversational-ai/README.md — 包含REST API、Agent配置、6个示例仓库(agent-samples、agent-toolkit、agent-client-toolkit-react、agent-ui-kit、server-custom-llm、server-mcp)

Cloud Recording

云端录制

Server-side recording of RTC channel audio/video. REST API only — no client SDK needed.
references/cloud-recording/README.md
服务端录制RTC频道音视频内容。仅需REST API——无需客户端SDK。
references/cloud-recording/README.md

Server-Side

服务端工具

Token generation and server utilities. Required for production authentication.
references/server/README.md — Token generation for Node.js, Python, Go
Token生成及服务端实用工具。生产环境身份验证必备。
references/server/README.md — 支持Node.js、Python、Go的Token生成

Server Gateway SDK

Server Gateway SDK

Self-hosted Linux SDK for server-side audio/video stream transmission. Use when a server process needs to send or receive media in an Agora RTC channel (call centers, AI audio processing, network testing).
references/server-gateway/README.md — C++, Java, Go, Python
用于服务端音视频流传输的自托管Linux SDK。适用于服务端进程需在Agora RTC频道中发送或接收媒体的场景(如呼叫中心、AI音频处理、网络测试)。
references/server-gateway/README.md — 支持C++、Java、Go、Python

Testing Guidance

测试指南

Mocking patterns and testing requirements for Agora SDK integration code.
references/testing-guidance/SKILL.md
Agora SDK集成代码的模拟模式及测试要求。
references/testing-guidance/SKILL.md

Routing

请求路由规则

Clear, product-specific request: Route directly to the relevant product README. Do not load
intake/SKILL.md
.
Examples of clear requests:
  • "RTC Web video call" →
    references/rtc/web.md
  • "ConvoAI Python" →
    references/conversational-ai/README.md
  • "Generate RTC token in Go" →
    references/server/tokens.md
Vague or multi-product request: Route through
intake/SKILL.md
. Intake handles product identification, combination recommendations, and routing.
明确的、产品特定的请求:直接路由至对应产品的README文档。 请勿加载
intake/SKILL.md
明确请求示例:
  • "RTC Web视频通话" →
    references/rtc/web.md
  • "ConvoAI Python" →
    references/conversational-ai/README.md
  • "使用Go生成RTC Token" →
    references/server/tokens.md
模糊或多产品请求:通过
intake/SKILL.md
进行路由。 该入口文件负责产品识别、组合推荐及路由。

Documentation Lookup

文档查询规则

Check bundled references first (Level 1). If they don't cover the detail needed, fetch
https://docs.agora.io/en/llms.txt
, find the relevant URL, and fetch it (Level 2). See references/doc-fetching.md for the full procedure, fallback URLs, and freeze-forever decision table.
Always fetch Level 2 before answering questions about: TTS/ASR/LLM vendor configs, model names, full request/response schemas, error code listings, or release notes. These change frequently — do not answer from training data or memory.
If MCP is unavailable or Level 2 fetch fails: use the fallback URLs in
doc-fetching.md
to reach the official markdown docs directly. Never fabricate API parameters — always tell the user to verify against official docs if live fetch is unavailable.
If a user explicitly asks about the Agora MCP server, see references/mcp-tools.md.
优先查询内置参考文档(一级文档)。若无法覆盖所需细节, 请获取
https://docs.agora.io/en/llms.txt
,找到相关URL后获取对应内容(二级文档)。 完整流程、备用URL及永久冻结决策表请查看references/doc-fetching.md
以下内容必须先获取二级文档再作答:TTS/ASR/LLM厂商配置、模型名称、完整请求/响应 schema、错误代码列表或发布说明。这些内容更新频繁——请勿根据训练数据或记忆作答。
若MCP不可用或二级文档获取失败:使用
doc-fetching.md
中的备用URL直接访问官方Markdown文档。切勿编造API参数——若无法实时获取文档,请告知用户以官方文档为准。
若用户明确询问Agora MCP服务器,请查看references/mcp-tools.md

Web Framework Notes

Web框架注意事项

Next.js / SSR

Next.js / SSR

Agora SDKs are browser-only. See references/rtc/nextjs.md for the required dynamic import patterns —
next/dynamic
with
ssr: false
does not work in Next.js 14+ Server Components without extra steps.
Agora SDK仅支持浏览器环境。如需了解所需的动态导入模式,请查看**references/rtc/nextjs.md**——在Next.js 14+的Server Components中,不带额外配置的
next/dynamic
(设置
ssr: false
)无法正常工作。