-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdemo_ai_agent.py
More file actions
63 lines (48 loc) · 2.01 KB
/
demo_ai_agent.py
File metadata and controls
63 lines (48 loc) · 2.01 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python3
"""
Demo script for copilot-instruction.py AI Agent Engine
Shows the AI agents working for a few cycles
"""
import sys
import time
import importlib.util
def run_demo():
"""Run a demonstration of the AI Agent Engine"""
print("🌌 DREAM-MIND-LUCID: AI Agent Demo")
print("=" * 50)
# Import the AI Agent Engine
spec = importlib.util.spec_from_file_location("copilot_instruction", "copilot-instruction.py")
copilot_instruction = importlib.util.module_from_spec(spec)
spec.loader.exec_module(copilot_instruction)
# Create orchestrator
orchestrator = copilot_instruction.AIOrchestrator()
print("\n🚀 Running 3-cycle demonstration...")
# Run for 3 cycles only
for cycle in range(1, 4):
try:
print(f"\n{'='*30}")
print(f"🔄 Demo Cycle #{cycle}")
print(f"{'='*30}")
# Get current profits
profits = orchestrator.get_profits()
print(f"📊 Current Profits: {profits}")
# Make AI decision
decision = orchestrator.make_decision(profits)
print(f"[🧠] AI Decision: {decision}")
# Execute decision
orchestrator.execute_decision(decision)
# Update memory
orchestrator.update_cycle_memory(cycle, profits, decision)
print(f"[✅] Cycle {cycle} completed successfully")
if cycle < 3:
print("⏰ Waiting 3 seconds before next cycle...")
time.sleep(3)
except Exception as e:
print(f"[❌] Error in cycle {cycle}: {e}")
print(f"\n{'='*50}")
print("🎊 Demo completed successfully!")
print("📝 Check iem_memory.json for detailed logs")
print("🚀 To run the full AI Agent Engine: python copilot-instruction.py")
print("💡 Press Ctrl+C to stop the main engine when running")
if __name__ == "__main__":
run_demo()