A complete, portable communication system for AI coding assistants and agents. Enables seamless messaging between tmux panes, text-to-speech output, and agent discovery across your development environment.
- Cross-Agent Messaging: AI CLI TOOLS Send messages between AI CLI Tools in different tmux panes
- Text-to-Speech: Voice output with multiple neural voices
- Agent Discovery: Automatically detect and list active AI agents
- Easy Installation: One-command setup with comprehensive install script
- Flexible Configuration: Environment variables and config files
git clone <your-repo-url>
cd ai-agent-communication./install.shThis will install all required system and Python dependencies automatically.
# Terminal 1: Start TTS Server
python3 tts_server.py
# Terminal 2: Start Agent Discovery
python3 agent_discovery.py# Test voice output
./bin/say "AI Agent Communication System is ready!"
# Discover available agents
./bin/search-agents
# Send a message (if agents are running)
./bin/msg claude "Hello from terminal"ai-agent-communication/
βββ tmux_message.py # Core messaging between tmux panes
βββ tts_server.py # FastAPI TTS server with neural voices
βββ agent_discovery.py # HTTP server for agent detection
βββ bin/
β βββ say # Voice output utility
β βββ search-agents # Agent discovery tool
β βββ msg # Easy messaging interface
βββ voices/ # Voice model storage
βββ config.json # Configuration file
βββ requirements.txt # Python dependencies
βββ install.sh # Installation script
βββ README.md # This file
Send messages between AI agents in tmux panes with automatic metadata.
# Send to specific agent
python3 tmux_message.py claude /home/user/project "Build completed"
# Send to all panes
python3 tmux_message.py --all "System maintenance in 5 minutes"
# Send to specific pane
python3 tmux_message.py --pane %1 "Direct message"
# Execute command in pane
python3 tmux_message.py --command "say 'Alert'" --pane %2FastAPI server providing neural TTS with multiple voice models.
# Start server
python3 tts_server.py
# API Endpoints
GET /speak?text=Hello%20world&voice=amy # Download audio file
GET /play?text=Hello%20world&voice=danny # Play immediately
GET /voices # List available voices
GET / # Health checkHTTP server that detects active AI agents in tmux sessions.
# Start server
python3 agent_discovery.py
# API Endpoints
GET /agents # List all detected agents
GET /health # Health check# Basic usage
./bin/say "System is online"
# With specific voice
./bin/say "Alert detected" kathleen
# Available voices: amy, danny, kathleen, ryan, lessac, libritts./bin/search-agents
# Output:
# π€ claude:
# β’ %1 in /home/user/project
# π€ opencode:
# β’ %3 in /home/user/docs# Send message to agent
./bin/msg claude "Hello from terminal"
./bin/msg opencode "Status check"# TTS Server
TTS_HOST=localhost # Server hostname
TTS_PORT=9003 # Server port
TTS_URL=http://localhost:9003 # Full URL (overrides HOST/PORT)
# Agent Discovery
DISCOVERY_HOST=localhost # Server hostname
DISCOVERY_PORT=9005 # Server port
DISCOVERY_URL=http://localhost:9005 # Full URL (overrides HOST/PORT){
"host": "0.0.0.0",
"port": 9003,
"default_voice": "amy",
"voice_dir": "./voices",
"voice_models": {
"amy": "en_US-amy-medium.onnx",
"danny": "en_US-danny-low.onnx",
"kathleen": "en_US-kathleen-low.onnx",
"ryan": "en_US-ryan-medium.onnx",
"lessac": "en_US-lessac-medium.onnx"
},
"audio_backend": "auto",
"silence_padding": 0.2
}If the install script doesn't work for your system:
# Ubuntu/Debian
sudo apt-get install curl jq tmux python3 python3-pip pulseaudio-utils alsa-utils sox ffmpeg
# Fedora/CentOS
sudo dnf install curl jq tmux python3 python3-pip pulseaudio-utils alsa-utils sox ffmpeg
# Arch Linux
sudo pacman -S curl jq tmux python python-pip pulseaudio alsa-utils sox ffmpeg
# macOS
brew install curl jq tmux python3pip3 install -r requirements.txtmkdir -p voices
# Download voice models from https://huggingface.co/rhasspy/piper-voicesThe system supports multiple neural TTS voices:
- amy: Natural female voice (medium quality) - Default
- danny: Clear male voice (low quality, fast)
- kathleen: Professional female voice (low quality, fast)
- ryan: Deep male voice (medium quality)
- lessac: Alternative voice (medium quality)
- libritts: High quality voice (slower)
Download additional voices from Hugging Face.
# Check if server is running
curl http://localhost:9003/
# Test voice output
./bin/say "Test message"# Check if server is running
curl http://localhost:9005/health
# Test agent detection
./bin/search-agents# Check tmux version
tmux -V
# List active sessions
tmux list-sessions
# List panes in current session
tmux list-panes- "No audio player found": Install pulseaudio-utils or alsa-utils
- "Voice model not found": Run
./install.shto download default voice - "Agent not found": Make sure AI agents are running in tmux panes
- "Permission denied": Run
chmod +x bin/* *.py
# In Claude Code tmux pane
tmux send-keys -t %1 "I received: $(cat /tmp/message.txt)" C-m# Build completion notification
./bin/say "Build completed successfully" && ./bin/msg claude "Ready for testing"
# Error alerts
./bin/say "Build failed" kathleen && ./bin/msg opencode "Check build logs"# CPU alert
./bin/say "High CPU usage detected" ryan
# Disk space warning
./bin/say "Disk space low" kathleenfrom tmux_message import send_message_to_pane, get_tmux_panes
# Get all panes
panes = get_tmux_panes()
# Send message
success = send_message_to_pane("%1", "Hello from Python")import requests
# Generate speech
response = requests.get("http://localhost:9003/speak?text=Hello&voice=amy")
with open("speech.wav", "wb") as f:
f.write(response.content)
# Play immediately
requests.get("http://localhost:9003/play?text=Hello&voice=danny")- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.
Made with β€οΈ for AI agent communication