-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinal-agent-start.sh
More file actions
executable file
·44 lines (36 loc) · 1.5 KB
/
Copy pathfinal-agent-start.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
echo "🚀 Final Agent Startup - All Expert Fixes Applied"
echo "=================================================="
# Step 1: Comprehensive cleanup
echo "🧹 Step 1: Cleaning up ALL existing processes..."
pkill -9 -f "packages/agent/dist/index.js" 2>/dev/null || true
pkill -9 -f "aengeliza_bot" 2>/dev/null || true
pkill -9 -f "telegram" 2>/dev/null || true
sleep 3
# Step 2: Clear any database locks
echo "🗃️ Step 2: Clearing database locks..."
rm -f *.sqlite-wal *.sqlite-shm 2>/dev/null || true
# Step 3: Verify cleanup
echo "🔍 Step 3: Verifying no processes are running..."
REMAINING=$(ps aux | grep -E "(packages/agent/dist|aengeliza_bot)" | grep -v grep | wc -l)
if [ "$REMAINING" -gt 0 ]; then
echo "❌ Warning: Still found $REMAINING processes. Manual cleanup may be needed."
ps aux | grep -E "(packages/agent/dist|aengeliza_bot)" | grep -v grep
else
echo "✅ All processes cleaned up successfully"
fi
# Step 4: Start the FIXED agent
echo "🎯 Step 4: Starting the fixed agent (with all expert fixes)..."
echo "Features enabled:"
echo " ✅ Runtime Action Injection"
echo " ✅ Database Adapter Initialization"
echo " ✅ Dual Injection (character.actions + runtime.actionHandlers)"
echo " ✅ Address Detection"
echo " ✅ Node URL Configuration Fix"
echo ""
# Ensure we're in the right directory
cd /root/eliza
# Start the agent
echo "🤖 Starting agent..."
node packages/agent/dist/index.js -- --character=characters/aengel.json
echo "✅ Agent startup script completed."