
[文档](https://doc.theten.ai)
•
[快速开始](https://doc.theten.ai/getting-started/quickstart)
•
[TEN Framework 仓库](https://github.com/TEN-framework/ten_framework)
TEN Agent 使用场景

即用型扩展

本地环境下的 TEN Agent 开发环境
### 先决条件
| 类别 | 要求 |
|----------|-------------|
| **Keys** | • [App ID](https://console.shengwang.cn) 和 [App Certificate](https://console.shengwang.cn)([注册教程](https://doc.shengwang.cn/doc/console/general/quickstart#%E6%B3%A8%E5%86%8C%E8%B4%A6%E5%8F%B7))
• [OpenAI](https://openai.com/index/openai-api/) API 密钥
• [Deepgram](https://deepgram.com/) ASR(注册即可获得免费额度)
• [FishAudio](https://fish.audio/) TTS(注册即可获得免费额度)|
| **安装要求** | • [Docker](https://www.docker.com/) / [Docker Compose](https://docs.docker.com/compose/)
• [Node.js(LTS) v18](https://nodejs.org/en) |
| **最低系统要求** | • CPU >= 2核
• 内存 >= 4 GB |
### macOS: Apple Silicon 上的 Docker 设置
对于 Apple Silicon Mac,请在 Docker 设置中取消勾选"使用 Rosetta 进行 x86/amd64 模拟"。注意:这可能会导致 ARM 上的构建时间较慢,但部署到 x64 服务器时性能将恢复正常。

#### 设置国内代理
如果在国内,我们强烈建议在 SSH 中把代理打开,下载和安装的依赖的时候会更加丝滑。如果遇到更多问题,请参考 [问题排查](../troubleshooting/troubleshooting-cn.md)。
```bash
# 如果用的代理软件没有增强模式的话, 建议手动把所有代理协议都打开
# export 的有效期为一个 session
export https_proxy=http://127.0.0.1:
export http_proxy=http://127.0.0.1:
export all_proxy=socks5://127.0.0.1:
# Docker
export https_proxy=http://host.docker.internal:
export http_proxy=http://host.docker.internal:
export all_proxy=http://host.docker.internal:
# tman 镜像设置
mkdir -p ~/.tman && echo '{
"registry": {
"default": {
"index": "https://registry-ten.rtcdeveloper.cn/api/ten-cloud-store/v1/packages"
}
}
}' > ~/.tman/config.json
# GO 代理设置
export GOPROXY=https://goproxy.cn,direct
# pip 代理设置, 此设置需要先安装 pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
```
### 后续步骤
#### 1. 创建 `.env` 文件
```bash
cp ./.env.example ./.env
```
#### 2. 在 `.env` 中设置 Agora 应用 ID 和应用证书
```bash
AGORA_APP_ID=
AGORA_APP_CERTIFICATE=
```
#### 3. 启动代理开发容器
```bash
docker compose up -d
```
#### 4. 进入容器
```bash
docker exec -it ten_agent_dev bash
```
#### 5. 构建代理
```bash
task use
```
#### 6. 启动网络服务器
```bash
task run
```
#### 7. 编辑开发环境设置
在 [localhost:3000](http://localhost:3000) 打开开发环境来配置你的代理。
1. 选择图表类型(如语音代理、实时代理)
2. 选择对应模块
3. 选择扩展并配置其 API 密钥设置

部署
一旦你完成了代理的自定义,你就可以通过创建服务的发布 Docker 镜像来部署。
请参考 [部署指南](https://doc.theten.ai/ten-agent/deployment/deploy_agent_service) 有关部署的详细信息。
TEN Agent 架构

保持关注
在我们开始之前,请确保为我们的仓库点星标,以获取所有新版本的即时通知!

加入社区
- [Discord](https://discord.gg/VnPftUzAMJ):分享您的应用程序并与社区互动的理想平台。
- [GitHub 讨论](https://github.com/TEN-framework/ten-agent/discussions):提供反馈和提问的完美场所。
- [GitHub Issues](https://github.com/TEN-framework/ten-agent/issues):报告错误和提出新功能的最佳地点。请参阅我们的[贡献指南](./docs/code-of-conduct/contributing.md)了解更多详情。
- [X](https://img.shields.io/twitter/follow/TenFramework?logo=X&color=%20%23f5f5f5):分享您的代理并与社区互动的绝佳平台。
Star History
[](https://star-history.com/#ten-framework/ten-agent&Date)
Code Contributors
[](https://github.com/TEN-framework/ten-agent/graphs/contributors)
Contribution Guidelines
Contributions are welcome! Please read the [contribution guidelines](./docs/code-of-conduct/contributing.md) first.
License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.