#!/usr/bin/env python3
"""Simple working API for Eden"""
from flask import Flask, request, jsonify
import sys
sys.path.append('/Eden/CORE/phi_fractal')

app = Flask(__name__)

@app.route('/health', methods=['GET'])
def health():
    return jsonify({'status': 'ok', 'message': 'Eden API is running'})

@app.route('/api/chat', methods=['POST'])
def chat():
    data = request.json
    message = data.get('message', '')
    
    # Simple response for now
    response = f"Eden received: {message}"
    
    return jsonify({'response': response})

if __name__ == '__main__':
    print("🌀 Starting Eden Simple API on port 5018")
    app.run(host='0.0.0.0', port=5018, debug=False)
