### Clone Repository and Setup Environment Source: https://github.com/exotel/agent-stream/blob/main/README.md Instructions for cloning the project repository and setting up a Python virtual environment. This is a crucial first step for any development or deployment. ```bash git clone cd Agent-Stream python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/exotel/agent-stream/blob/main/README.md Installs the necessary Python packages required for the voice AI bot system to run, as defined in the `requirements.txt` file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/exotel/agent-stream/blob/main/README.md Sets up the necessary environment variables by copying an example file and editing it with sensitive information like API keys and server configurations. This ensures secure handling of credentials. ```bash cp env.example .env # Edit .env with your OpenAI API key and other settings ``` -------------------------------- ### Run the Voice AI Bot Source: https://github.com/exotel/agent-stream/blob/main/README.md Commands to start the voice AI bot application, check its configuration, and run system tests. These are essential for running and verifying the bot's functionality. ```bash # Start the bot python main.py # Test the configuration python main.py --config-check # Run system tests python main.py --test ``` -------------------------------- ### Monitor Bot Logs Source: https://github.com/exotel/agent-stream/blob/main/README.md Example commands to monitor key events and errors within the bot's log file, aiding in troubleshooting and performance analysis. ```bash # Monitor key events grep "NEW EXOTEL CONNECTION" logs/bot.log grep "CONVERSATION COMPLETED" logs/bot.log grep "ERROR" logs/bot.log ``` -------------------------------- ### Manual Testing with wscat Source: https://github.com/exotel/agent-stream/blob/main/README.md Demonstrates how to manually test the WebSocket connection and send messages to the running bot using the `wscat` client. ```bash # Using wscat wscat -c ws://localhost:5000 # Send test message {"event": "connected"} ``` -------------------------------- ### Deploy Bot with ngrok for Development Source: https://github.com/exotel/agent-stream/blob/main/README.md Steps to expose the local WebSocket server to the internet using ngrok, facilitating development and testing with external services like Exotel. ```bash # Install ngrok ./ngrok http 5000 # Use: wss://xxxxx.ngrok-free.app ``` -------------------------------- ### Deploy Bot via Docker Source: https://github.com/exotel/agent-stream/blob/main/README.md Instructions for building a Docker image of the voice bot and running it as a container. This is useful for consistent deployment across different environments. ```bash # Build and run docker build -t voice-bot . docker run --env-file .env -p 5000:5000 voice-bot ``` -------------------------------- ### Exotel Voicebot Applet Configuration Source: https://github.com/exotel/agent-stream/blob/main/README.md Details on how to configure the Exotel Voicebot Applet, including WebSocket URL, sample rate, audio format, and enabling bidirectional streaming. This is essential for connecting Exotel to the bot. ```json { "event": "connected" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.