send_agenda.sh
1 #!/usr/bin/env bash 2 # 3 # Send Agenda to All Agents via Redis 4 # Usage: ./send_agenda.sh "Your agenda here" 5 # 6 7 set -e 8 9 AGENDA="${1:-3x Revenue Growth Strategy}" 10 TIMESTAMP=$(date +%s) 11 MESSAGE_ID="msg_${TIMESTAMP}" 12 13 echo "📢 Broadcasting Agenda to All Agents..." 14 echo "Subject: $AGENDA" 15 echo "" 16 17 # Publish directly to Redis messages:all channel 18 redis-cli -h localhost -p 6383 PUBLISH "messages:all" "{ 19 \"id\": \"$MESSAGE_ID\", 20 \"from_role\": \"ceo\", 21 \"to_role\": \"all\", 22 \"type\": \"request\", 23 \"subject\": \"STRATEGIC INITIATIVE: $AGENDA\", 24 \"content\": { 25 \"agenda\": \"$AGENDA\", 26 \"budget\": 2000000, 27 \"timeline\": \"18 months\", 28 \"priority\": \"high\" 29 }, 30 \"inserted_at\": \"$(date -u +"%Y-%m-%dT%H:%M:%S.000000Z")\" 31 }" > /dev/null 32 33 echo "✅ Agenda broadcast complete!" 34 echo "" 35 echo "📊 Monitor: http://localhost:4000" 36 echo "📝 Logs: tail -f logs/autonomous/*.log" 37 echo ""