layout | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
In this chapter, we’ll build the Astra agent together. For additional help, check out the YouTube video tutorial at the end.
{% tabs %} {% tab title="API Keys" %}
- Agora App ID and App Certificate(read here on how)
- Azure speech-to-text and text-to-speech API keys
- OpenAI API key {% endtab %}
{% tab title="Installations" %}
- Docker / Docker Compose
- Node.js(LTS) v18 {% endtab %}
{% tab title="Minimum system requirements" %} :tada: CPU >= 2 Core
😄 RAM >= 4 GB {% endtab %} {% endtabs %}
Docker setting on Apple Silicon
{% hint style="info" %} You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option for Docker if you are on Apple Silicon, otherwise the server is not going to work. {% endhint %}
Make sure the box is unchecked
1. Prepare config files
In the root of the project, use cd
command to create `.env` file from example . It will be used to store information for `docker compose` later.
{% code title=">_ Terminal" %}
cp ./.env.example ./.env
{% endcode %}
2. Setup API keys & Environment variables in .env file
Open the .env
file and fill in the keys and regions. This is also where you can choose to use any different extensions:
{% code title=".env" %}
# Agora App ID and App Certificate
AGORA_APP_ID=
# Certificate is only required when enabled within Agora.io account
AGORA_APP_CERTIFICATE=
# Azure STT key and region
AZURE_STT_KEY=
AZURE_STT_REGION=
# Azure TTS key and region
AZURE_TTS_KEY=
AZURE_TTS_REGION=
# OpenAI API key
OPENAI_API_KEY=
{% endcode %}
3. Start agent builder toolkit containers
In the same directory, run the docker
command to compose containers:
{% code title=">_ Terminal" %}
docker compose up
{% endcode %}
4. Build Astra agent
Open up a separate terminal window, build the agent and start the server:
{% code title=">_ Bash" %}
docker exec -it astra_agents_dev bash
make build
{% endcode %}
5. Start the server
Now the server is running at port: 8080.
{% code title=">_ Bash" %}
make run-server
{% endcode %}
You can open https://localhost:3001 in browser to use your graph designer. Simultaneously, open another tab at https://localhost:3000 to see the customized voice agent up and running.
Now you have the power of the Graph Designer at your fingertips to perform the magic of agent customization yourself. 🎉
Graph designer
TEN Graph Designer (beta), a tool that requires zero coding knowledge and makes the experience of creating agentic applications smoother.
Graph Designer
{% tabs %} {% tab title="English" %} {% embed url="https://www.youtube.com/watch?t=1s&v=_AZ3RedzvRg" %} {% endtab %}
{% tab title="中文" %} {% embed url="https://www.youtube.com/watch?v=MbqF4c2Myrw" %} {% endtab %} {% endtabs %}