# TEN Framework

> Open-source framework for real-time multimodal conversational voice AI agents

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Python
- Repository: https://github.com/TEN-framework/ten-framework
- Website: https://agent.theten.ai/
- Canonical page: https://ai-tldr.dev/tools/ten-framework/

## In short

TEN Framework is Open-source framework for real-time multimodal conversational voice AI agents. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python. To get started: create your .env file.

## Overview

TEN is an open-source framework for real-time, multimodal conversational AI. It gives you the plumbing to build voice agents that can listen to a person, run the audio through speech-to-text, a language model, and text-to-speech, and reply with low latency over RTC or WebSocket connections.

The framework ships with a set of agent examples you can run and customize, including a multi-purpose voice assistant, a doodle board, real-time speaker diarization, lip-sync avatars, SIP phone calls, and live transcription. It is part of a wider TEN ecosystem that also includes TEN VAD for voice activity detection and TEN Turn Detection for full-duplex dialogue.

Agents are assembled from extensions, so you can swap or add capabilities such as memory, voice activity detection, and turn detection. A visual tool called TMAN Designer lets you wire up and configure the speech-to-text, LLM, and text-to-speech pieces and drop in your API keys without editing code by hand.

## What it does

- Real-time multimodal voice pipeline that connects speech-to-text, an LLM, and text-to-speech with low latency
- Supports both RTC and WebSocket connections for streaming audio between users and agents
- Extension-based design lets you add capabilities like Memory, VAD, and Turn Detection to any agent
- Ready-to-run agent examples: voice assistant, doodler, speaker diarization, lip-sync avatars, SIP call, and transcription
- TMAN Designer, a visual tool for wiring up STT, LLM, and TTS extensions and entering API keys without code
- Docker-based development and release workflow, plus a guide for running agents in GitHub Codespaces

## Getting started

TEN runs its agent examples inside Docker. You will need an Agora App ID and App Certificate, plus API keys for an LLM (such as OpenAI), a speech-to-text provider (Deepgram), and a text-to-speech provider (ElevenLabs). Docker, Docker Compose, and Node.js v18 LTS are required.

1. Create your .env file

   Clone the repository, move into the ai_agents folder, and copy the example environment file. Then fill in your Agora App ID and Certificate along with your Deepgram, OpenAI, and ElevenLabs keys.

```bash
cd ai_agents
cp ./.env.example ./.env
```

2. Start the development containers

   Bring up the agent development containers in the background, then open a shell inside the running dev container.

```bash
docker compose up -d
docker exec -it ten_agent_dev bash
```

3. Build and run an example agent

   Pick one of the default examples, install its dependencies, and start the web server. The agent UI is then available on localhost:3000 and the TMAN Designer on localhost:49483.

```bash
cd agents/examples/voice-assistant
task install
task run
```

4. Customize with TMAN Designer

   Open localhost:49483, right-click the STT, LLM, and TTS extensions, enter your API keys in their properties, and submit the changes to see the updated agent at localhost:3000.

## When to use it

- Building a real-time voice assistant that holds a spoken conversation with low latency
- Adding phone support to a product with a SIP extension that powers calls through TEN
- Running live transcription or speaker diarization on streaming audio
- Creating lip-sync avatars that respond to speech using TEN's avatar examples
- Prototyping conversational agents visually with TMAN Designer before deploying them with Docker
