Getting Started

In this chapter, let's build the TEN Agent playground together.

Prerequisites

Docker setting on Apple Silicon

Agora App ID and App Certificate (free minutes every month)

For Apple Silicon Macs, uncheck "Use Rosetta for x86/amd64 emulation" in Docker settings. Note: This may result in slower build times on ARM, but performance will be normal when deployed to x64 servers.

Make sure the box is unchecked

Make sure the box is unchecked

Next step

1. Clone down the TEN Agent repository

Terminal
git clone https://github.com/TEN-framework/TEN-Agent.git

2. Prepare config files

Open TEN Agent in your code editor. In the root of the project, use cd command to create `.env` file from example.

Terminal
cp ./.env.example ./.env

3. Setup Agora App ID and App Certificate in .env file

Open the .env file and fill in Agora App ID and App Certificate.These will be used to connect to Agora RTC extension.

.env
AGORA_APP_ID=
AGORA_APP_CERTIFICATE=

4. Start agent builder toolkit containers

In the same directory, run the docker command to compose containers:

Terminal
docker compose up -d

5. Enter container

Use the following command to enter the container:

Bash
docker exec -it ten_agent_dev bash

6. Build the agent

Use the following command to build the agent:

Bash
task use

7. Start the web server

Use the following command to start the web server:

Bash
task run

8. Edit playground settings

Open the playground at localhost:3000 to configure your agent.

  1. Select a graph type (e.g. Voice Agent, Realtime Agent)
  2. Choose a corresponding module
  3. Select an extension and configure its API key settings

Module Example

Table of Contents