![Banner de TEN Agent](https://github.com/TEN-framework/docs/blob/main/assets/jpg/banner.jpg?raw=true)
[![Follow on X](https://img.shields.io/twitter/follow/TenFramework?logo=X&color=%20%23f5f5f5)](https://twitter.com/intent/follow?screen_name=TenFramework) [![Discussion posts](https://img.shields.io/github/discussions/TEN-framework/ten-agent?labelColor=%20%23FDB062&color=%20%23f79009)](https://github.com/TEN-framework/ten-agent/discussions/) [![Commits](https://img.shields.io/github/commit-activity/m/TEN-framework/ten-agent?labelColor=%20%237d89b0&color=%20%235d6b98)](https://github.com/TEN-framework/ten-agent/graphs/commit-activity) [![Issues closed](https://img.shields.io/github/issues-search?query=repo%3ATEN-framework%2Ften-agent%20is%3Aclosed&label=issues%20closed&labelColor=green&color=green)](https://github.com/TEN-framework/ten-agent/issues) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/TEN-framework/ten-agent/pulls) [![GitHub license](https://img.shields.io/badge/License-Apache_2.0-blue.svg?labelColor=%20%239b8afb&color=%20%237a5af8)](https://github.com/TEN-framework/ten-agent/blob/main/LICENSE) [![WeChat](https://img.shields.io/badge/WeChat-WeChat_Group-%2307C160?logo=wechat)](https://github.com/TEN-framework/ten-agent/discussions/170) [![Discord](https://dcbadge.vercel.app/api/server/VnPftUzAMJ)](https://discord.gg/VnPftUzAMJ) TEN-framework%2FTEN-Agent | Trendshift [![GitHub watchers](https://img.shields.io/github/watchers/TEN-framework/ten-agent?style=social&label=Watch)](https://GitHub.com/TEN-framework/ten-agent/watchers/?WT.mc_id=academic-105485-koreyst) [![GitHub forks](https://img.shields.io/github/forks/TEN-framework/ten-agent?style=social&label=Fork)](https://GitHub.com/TEN-framework/ten-agent/network/?WT.mc_id=academic-105485-koreyst) [![GitHub stars](https://img.shields.io/github/stars/TEN-framework/ten-agent?style=social&label=Star)](https://GitHub.com/TEN-framework/ten-agent/stargazers/?WT.mc_id=academic-105485-koreyst) README in English 简体中文操作指南 日本語のREADME README in 한국어 README en Español README en Français README in Italiano
[文档](https://doc.theten.ai)   •   [快速开始](https://doc.theten.ai/getting-started/quickstart)   •   [TEN Framework 仓库](https://github.com/TEN-framework/ten_framework)

TEN Agent 使用场景

![使用场景](https://github.com/TEN-framework/docs/blob/main/assets/jpg/usecases.jpg?raw=true)

即用型扩展

![即用型扩展](https://github.com/TEN-framework/docs/blob/main/assets/jpg/extensions.jpg?raw=true)

本地环境下的 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 服务器时性能将恢复正常。 ![Docker 设置](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true)
#### 设置国内代理 如果在国内,我们强烈建议在 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 密钥设置 ![模块示例](https://github.com/TEN-framework/docs/blob/main/assets/gif/module-example.gif?raw=true)

部署

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

TEN Agent 架构

![组件图](https://github.com/TEN-framework/docs/blob/main/assets/jpg/diagram.jpg?raw=true)

保持关注

在我们开始之前,请确保为我们的仓库点星标,以获取所有新版本的即时通知! ![TEN 为我们点星标](https://github.com/TEN-framework/docs/blob/main/assets/gif/star_us_2.gif?raw=true)

加入社区

- [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

[![Star History Chart](https://api.star-history.com/svg?repos=ten-framework/ten-agent&type=Date)](https://star-history.com/#ten-framework/ten-agent&Date)

Code Contributors

[![TEN](https://contrib.rocks/image?repo=TEN-framework/ten-agent)](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.