# TEN-Agent **Repository Path**: rasonyang/TEN-Agent ## Basic Information - **Project Name**: TEN-Agent - **Description**: TEN Agent is the world’s first real-time multimodal agent integrated with the OpenAI Realtime API, RTC, and features weather checks, web search, vision, and RAG capabilities. - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-21 - **Last Updated**: 2024-11-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![TEN Agent banner](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%23155EEF&color=%20%23528bff)](https://github.com/TEN-framework/ten-agent/blob/main/LICENSE) [![Discord TEN Community](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 [Getting Started](https://doc.theten.ai/ten-agent/getting_started)   •   [Create Extensions](https://doc.theten.ai/ten-agent/create_a_hello_world_extension)   •   [TEN Framework Repository](https://github.com/TEN-framework/ten_framework)

🎉 TEN Agent with OpenAI Realtime API and RTC

Try OpenAI Realtime API and RTC at [agent.theten.ai](https://agent.theten.ai). Combining OpenAI Realtime API for ultra-low latency with RTC’s AI noise suppression ensures smooth, high-quality interactions. On top of that, the seamless integration of weather and news tools makes TEN Agent even more versatile. ![TEN Agent with OpenAI Realtime API and RTC](https://github.com/TEN-framework/docs/blob/main/assets/gif/weather-and-news.gif?raw=true)

TEN Agent Features

* **OpenAI Realtime API and RTC integration**: TEN Agent is the world-class multimodal AI agent to integrate the OpenAI Realtime API and RTC. * **High-Performance Real-Time Multimodal Interactions**: Offers high-performance, low-latency solutions for complex audio-visual AI applications. * **Multi-Language and Multi-Platform Support** : Supports extension development in C++, Go, Python, etc. Runs on Windows, Mac, Linux, and mobile devices. * **Edge-Cloud Integration**: Flexibly combines edge and cloud-deployed extensions, balancing privacy, cost, and performance. * **Flexibility Beyond Model Limitations**: Easily build complex AI applications through simple drag-and-drop programming, integrating audio-visual tools, databases, RAG, and more. * **Real-Time Agent State Management**: Manages and adjusts agent behavior in real-time for dynamic responsiveness.

Ready-to-use Extensions

![Ready-to-use Extensions](https://github.com/TEN-framework/docs/blob/main/assets/jpg/extensions.jpg?raw=true)

Stay Tuned

Before we get started, be sure to star our repository and get instant notifications for all new releases! ![TEN star us gif](https://github.com/TEN-framework/docs/blob/main/assets/gif/star_us_2.gif?raw=true)

How to build TEN Agent locally ### Prerequisites #### Keys - Agora [ App ID ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project) and [ App Certificate ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)(certificate only required if enabled in the Agora Console) - [OpenAI](https://openai.com/index/openai-api/) API key - [ Deepgram ](https://deepgram.com/) ASR and [ FishAudio ](https://fish.audio/) TTS #### Installation - [Docker](https://www.docker.com/) / [Docker Compose](https://docs.docker.com/compose/) - [Node.js(LTS) v18](https://nodejs.org/en) #### Minimum system requirements - CPU >= 2 Core - RAM >= 4 GB #### MacOS: Docker setting on Apple Silicon You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option for Docker if you are on Apple Silicon. However, please note that build and connection times will be a little slower due to emulation when running on ARM systems. Once deployed to x64 (e.g. your Linux server) it will be much faster. ![Docker Setting](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true) #### Windows: Configuring Git to handle line endings To avoid problems in `make run-server` later, you can configure Git to properly handle line endings on Windows.([more here](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platform=windows)) ```bash git config --global core.autocrlf true ``` ### Next step #### 1. Modify config files In the root of the project, use `cp` command to create `.env` from the [ .env.example ](https://github.com/TEN-framework/ten-agent/blob/main/.env.example). It will be used to store environment variables for `docker compose` later, and if you change it, you will need to `source .env` again in the container for the changes to take effect. ```bash cp ./.env.example ./.env ``` #### 2. Setup API keys Open the `.env` file and fill in the `keys`. We recommend using [ Deepgram ASR ](https://deepgram.com/) and [ FishAudio TTS ](https://fish.audio/) as they are free to sign up for and offer free credits. Of course, you can also use other services, see the list in [.env.example](https://github.com/TEN-framework/ten-agent/blob/main/.env.example). ```bash # Agora App ID # Agora App Certificate(only required if enabled in the Agora Console) AGORA_APP_ID= AGORA_APP_CERTIFICATE= OPENAI_API_KEY= DEEPGRAM_API_KEY= FISH_AUDIO_TTS_KEY= ``` #### 3. Start agent development containers In the same directory, run the `docker compose up` command to compose containers: ```bash docker compose up ``` Or using the `docker compose up -d` command, start the container in detached mode.([more here](https://doc.theten.ai/ten-agent/setting_up_vscode_for_development_inside_container)) ```bash docker compose up -d ``` #### 4. Enter container and build agent Open up a separate terminal window, enter the container and build the agent: ```bash docker exec -it ten_agent_dev bash make build ``` #### 5. Start the server Once the build is done, `make run-server` on port `8080`: ```bash make run-server ``` ### Finish and verify #### TEN Agent Open up [localhost:3000]( http://localhost:3000 ) in browser to play the TEN Agent. #### TEN Graph Designer Open up another tab go to [localhost:3001]( http://localhost:3001 ), and use Graph Designer to create, connect and edit extensions on canvas. Once you save the graph, you can return to [localhost:3000]( http://localhost:3000 ) and select the corresponding graph to view the changes. ![TEN Graph Designer](https://github.com/TEN-framework/docs/blob/main/assets/gif/hello_world_python.gif?raw=true)

Join Community

- [Discord](https://discord.gg/VnPftUzAMJ): Ideal for sharing your applications and engaging with the community. - [GitHub Discussion](https://github.com/TEN-framework/ten-agent/discussions): Perfect for providing feedback and asking questions. - [GitHub Issues](https://github.com/TEN-framework/ten-agent/issues): Best for reporting bugs and proposing new features. Refer to our [contribution guidelines](./docs/code-of-conduct/contributing.md) for more details. - [X (formerly Twitter)](https://img.shields.io/twitter/follow/TenFramework?logo=X&color=%20%23f5f5f5): Great for sharing your agents and interacting with the community.

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.