Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/AI_Brain / the_tired_agi/scripts/launch_complete_system.sh |
| Date | Not specified in source |
| Repository | Janady13/AI_Brain |
| Revision | d6c309d3fa439714ca46b9d3bb94caf478ea5376 |
| Branch | main |
| Path or archive member | the_tired_agi/scripts/launch_complete_system.sh |
| Original SHA-256 | 4cdaf5c1f20eddad566642edbf1d47aa394a91564c009f434fc7ec872a63b5b9 |
| Git blob SHA | 3f4744893dd90b3e4a1ba832bf95e4e8b04438da |
| Reading-copy SHA-256 | 4cdaf5c1f20eddad566642edbf1d47aa394a91564c009f434fc7ec872a63b5b9 |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/AI_Brain / the_tired_agi/scripts/launch_complete_system.sh | main | d6c309d3fa439714ca46b9d3bb94caf478ea5376 | Open original |
| Janady13/AI_Brain / the_tired_agi/scripts/launch_complete_system.sh | claude/binary-helix-fibonacci-hive-011CUj7dx1WWJLVYcWCjBbYv | 527d4882c71eb041393f9d8945996177c5ac9e86 | Open original |
Recovered source transcript
Download complete source text ↓130 lines · 4.4 KB
#!/bin/bash
# Launch Complete The-Tired-AGI System
# Gossip Service + Frontend + Chat Interface
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
AGI_HOME="$(dirname "$SCRIPT_DIR")"
FRONTEND_DIR="$AGI_HOME/frontend"
GOSSIP_DIR="$AGI_HOME/gossip"
CORE_DIR="$AGI_HOME/core"
echo "╔════════════════════════════════════════════════════════╗"
echo "║ 🧠 The-Tired-AGI Complete System Launcher ║"
echo "╚════════════════════════════════════════════════════════╝"
echo ""
# Create logs directory
mkdir -p "$AGI_HOME/logs"
# Step 1: Build/check gossip service
echo "📦 Step 1: Gossip Service"
if [ ! -f "$GOSSIP_DIR/gossipd" ]; then
echo " Building gossip service..."
cd "$GOSSIP_DIR"
go build -o gossipd main.go
echo " ✅ Built"
else
echo " ✅ Already built"
fi
# Step 2: Build/check frontend server
echo "📦 Step 2: Frontend Server"
if [ ! -f "$FRONTEND_DIR/frontend_server" ]; then
echo " Building frontend server..."
cd "$FRONTEND_DIR"
go build -o frontend_server server.go
echo " ✅ Built"
else
echo " ✅ Already built"
fi
# Step 3: Build/check agi_chat
echo "📦 Step 3: Conversational Interface"
if [ ! -f "$CORE_DIR/build/bin/agi_chat" ]; then
echo " Building agi_chat..."
cd "$CORE_DIR"
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc) agi_chat
echo " ✅ Built"
else
echo " ✅ Already built"
fi
echo ""
echo "╔════════════════════════════════════════════════════════╗"
echo "║ 🚀 Starting Services ║"
echo "╚════════════════════════════════════════════════════════╝"
echo ""
# Start gossip service
if ! curl -s -m 2 http://localhost:8008/stats > /dev/null 2>&1; then
echo "🌐 Starting Gossip Service (port 8008)..."
cd "$GOSSIP_DIR"
nohup ./gossipd > "$AGI_HOME/logs/gossip.log" 2>&1 &
GOSSIP_PID=$!
echo " PID: $GOSSIP_PID"
echo " Log: $AGI_HOME/logs/gossip.log"
sleep 2
# Verify it started
if curl -s -m 2 http://localhost:8008/stats > /dev/null 2>&1; then
echo " ✅ Running"
else
echo " ❌ Failed to start"
exit 1
fi
else
echo "🌐 Gossip Service already running"
fi
# Start frontend server
if ! curl -s -m 2 http://localhost:3000 > /dev/null 2>&1; then
echo "🎨 Starting Frontend Server (port 3000)..."
cd "$FRONTEND_DIR"
nohup ./frontend_server > "$AGI_HOME/logs/frontend.log" 2>&1 &
FRONTEND_PID=$!
echo " PID: $FRONTEND_PID"
echo " Log: $AGI_HOME/logs/frontend.log"
sleep 1
echo " ✅ Running"
else
echo "🎨 Frontend Server already running"
fi
echo ""
echo "╔════════════════════════════════════════════════════════╗"
echo "║ ✅ System Ready ║"
echo "╚════════════════════════════════════════════════════════╝"
echo ""
echo " 🌐 Frontend Dashboard: http://localhost:3000"
echo " 📡 Gossip API: http://localhost:8008/stats"
echo " 💬 Chat Interface: $CORE_DIR/build/bin/agi_chat"
echo ""
echo "Commands:"
echo " → Open dashboard: xdg-open http://localhost:3000"
echo " → Chat with AGI: $CORE_DIR/build/bin/agi_chat"
echo " → View logs: tail -f $AGI_HOME/logs/*.log"
echo " → Stop services: pkill -f gossipd && pkill -f frontend_server"
echo ""
# Get current swarm status
echo "Current Swarm Status:"
curl -s http://localhost:8008/stats | sed 's/^/ /'
echo ""
echo "Press Enter to open dashboard in browser, or Ctrl+C to exit"
read -r
# Try to open browser
if command -v xdg-open > /dev/null; then
xdg-open http://localhost:3000
elif command -v open > /dev/null; then
open http://localhost:3000
else
echo "Please open http://localhost:3000 in your browser"
fi