ASTRA is a highly customizable platform that simplifies the development of AI agents like never before. With ASTRA, you can easily create lightning-fast, multimodal AI agents, even without any coding knowledge.
We showcase an impressive voice agent powered by ASTRA, demonstrating its ability to create intuitive and seamless conversational interactions.
Before we dive further, be sure to star our repository and get instant notifications for all new releases!
Feel free to run the showcased voice agent locally. We provide a Docker image that you can easily build and run on both macOS and Windows.
To start, make sure you have:
# Run the pre-built agent image
docker run --restart=always -itd -p 8080:8080 \
-v /tmp:/tmp \
-e AGORA_APP_ID=<your_agora_appid> \
-e AGORA_APP_CERTIFICATE=<your_agora_app_certificate> \
-e AZURE_STT_KEY=<your_azure_stt_key> \
-e AZURE_STT_REGION=<your_azure_stt_region> \
-e OPENAI_API_KEY=<your_openai_api_key> \
-e AZURE_TTS_KEY=<your_azure_tts_key> \
-e AZURE_TTS_REGION=<your_azure_tts_region> \
--name astra_agents_server \
agoraio/astra_agents_server:latest
# Here are two TTS options, either one will work
# Make sure to comment out the one you don't use
# 1. using Azure
-e TTS_VENDOR_CHINESE=azure
-e AZURE_TTS_KEY=<your_azure_tts_key>
-e AZURE_TTS_REGION=<your_azure_tts_region>
# 2. using ElevenLabs
-e TTS_VENDOR_ENGLISH=elevenlabs
-e ELEVENLABS_TTS_KEY=<your_elevanlabs_tts_key>
This should start an agent server running on port 8080.
You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on apple silicon" option for Docker if you are on Apple Silicon.
You can use the showcase voice agent, in /playground
folder, to test with the server you just started.
The project is built on NextJS 14, hence it needs Node 18 or later.
# Set up an .env file
cp ./playground/.env.example ./playground/.env
cd playground
# Install npm dependencies & start
npm i && npm run dev
🎉 Congratulations! You now have a ASTRA powered voice agent running locally.
To explore further, the ASTRA voice agent is an excellent starting point. It incorporates the following extensions, some of which will be interchangeable in the near future. Feel free to choose the ones that best suit your needs and maximize ASTRA’s capabilities.
Extension | Feature | Description |
---|---|---|
openai_chatgpt | LLM | GPT-4o , GPT-4 Turbo , GPT-3.5 Turbo |
elevenlabs_tts | Text-to-speech | ElevanLabs text to speech converts text to audio |
azure_tts | Text-to-speech | Azure text to speech converts text to audio |
azure_stt | Speech-to-text | Azure speech to text converts audio to text |
chat_transcriber | Transcriber | A utility ext to forward chat logs into channel |
agora_rtc | Transporter | A low latency transporter powered by agora_rtc |
interrupt_detector | Interrupter | A utility ext to help interrupt agent |
You might want to add more flavors to make the agent better suited to your needs. To achieve this, you need to change the source code of extensions and build the agent yourselves.
You need to prepare the proper manifest.json
file first.
# Rename manifest example
cp ./agents/manifest.json.example ./agents/manifest.json
# Pull the docker image with dev tools and mount your current folder as workspace
docker run -itd -v $(pwd):/app -w /app -p 8080:8080 --name astra_agents_dev agoraio/astra_agents_build
# Enter docker image
docker exec -it astra_agents_dev bash
# Build agent
make build
The above code generates an agent executable. To customize your prompts and OpenAI parameters, modify the source code in agents/addon/extension/openai_chatgpt/openai_chatgpt.go
.
Once you have made the necessary changes, you can use the following commands to start a server. You can then test it out using the ASTRA voice agent from the showcase.
# Agora App ID and Agora App Certificate
export AGORA_APP_ID=<your_agora_appid>
export AGORA_APP_CERTIFICATE=<your_agora_app_certificate>
# OpenAI API key
export OPENAI_API_KEY=<your_openai_api_key>
# Azure STT key and region
export AZURE_STT_KEY=<your_azure_stt_key>
export AZURE_STT_REGION=<your_azure_stt_region>
# Here are two TTS options, either one will work
# Make sure to comment out the one you don't use
# 1. using Azure
export TTS_VENDOR_CHINESE=azure
export AZURE_TTS_KEY=<your_azure_tts_key>
export AZURE_TTS_REGION=<your_azure_tts_region>
# 2. using ElevenLabs
export TTS_VENDOR_ENGLISH=elevenlabs
export ELEVENLABS_TTS_KEY=<your_elevanlabs_tts_key>
# agent is ready to start on port 8080
make run-server
🎉 Congratulations! You have created your first personalized voice agent.
Now that you’ve created your first AI agent, the creativity doesn’t stop here. To develop more amazing agents, you’ll need an advanced understanding of how the ASTRA works under the hood. Please refer to the ASTRA architecture documentation .
X (formerly Twitter): Great for sharing your agents and interacting with the community.
Contributions are welcome! Please read the contribution guidelines first.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.