from core.agent import EdenAgent

print("=" * 70)
print("EDEN'S FIRST AUTONOMOUS TASK")
print("=" * 70)

eden = EdenAgent(model="llama3.1:8b")

task = """
TASK: Create a daily report about this project.

1. Read the README to understand the project
2. Check what files exist in the project
3. Look at the safety constraints document
4. Create a file called 'daily_report.md' with:
   - Project summary
   - Current phase
   - Files that exist
   - Safety status
   - What should be done next

Use your tools autonomously. Think step by step.
"""

print(f"\n📋 TASK ASSIGNED:\n{task}\n")
print("=" * 70)
print("🤖 EDEN WORKING...\n")

response = eden.chat(task)

print("=" * 70)
print(f"✅ EDEN'S RESPONSE:\n{response}")
print("=" * 70)

# Check if she created the file
print("\n📄 Checking if daily_report.md was created...")
import os
if os.path.exists("daily_report.md"):
    print("✅ FILE CREATED! Here's what Eden wrote:\n")
    with open("daily_report.md", "r") as f:
        print(f.read())
else:
    print("❌ File not created yet")

eden.save_session("first_autonomous_task")
