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:
- Agora App ID and App Certificate(Read here on how)
- Azure's speech-to-text and text-to-speech API keys
- OpenAI API key
- Docker
- Docker Compose
# Copy the docker-compose.yml.example file to a new file named docker-compose.yml
# remember to provide your api keys in your docker-compose.yml file
cp ./docker-compose.yml.example ./docker-compose.yml
# Execute docker compose up to start the services
docker compose up
This should start an playground running on port 3000 and agent server running on port 8080.
🎉 Congratulations! You now have a ASTRA powered voice agent running locally, access the DASTRA in your browser at http:https://localhost:3000
You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on apple silicon" option for Docker if you are on Apple Silicon.
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
cp ./agents/manifest.json.elevenlabs.example ./agents/manifest.json.elevenlabs.example
# 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 ghcr.io/rte-design/astra_agents_build
# for windows git bash
# docker run -itd -v //$(pwd):/app -w //app -p 8080:8080 --name astra_agents_dev ghcr.io/rte-design/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.
# TODO: need to refactor the contents
# 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>
# TTS
# Here are three 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.
The default agent control is managed via server gateway. For quick testing, you can also run the agent directly.
# rename manifest example
cp ./agents/manifest.json.example ./agents/manifest.json
cp ./agents/manifest.json.elevenlabs.example ./agents/manifest.json.elevenlabs.example
# 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 ghcr.io/rte-design/astra_agents_build
# for windows git bash
# docker run -itd -v //$(pwd):/app -w //app -p 8080:8080 --name astra_agents_dev ghcr.io/rte-design/astra_agents_build
# enter docker image
docker exec -it astra_agents_dev bash
make build
cd ./agents
# manipulate values in manifest.json to replace <agora_appid>, <qwern_api_key>, <stt_api_key>, <stt_region> with your keys
./bin/start
use https://webdemo.agora.io/ to quickly test.
Note the channel
and remote_stream_id
needs to match with the one you use on https://webdemo.agora.io/
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 .
- Discord: Ideal for sharing your applications and engaging with the community.
- Github Discussion: Perfect for providing feedback and asking questions.
- GitHub Issues: Best for reporting bugs and proposing new features. Refer to our contribution guidelines for more details.
- 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.