Repository navigation
WEB_UI
The AEGIS system provides a comprehensive web-based interface for interacting with the consciousness-aware distributed AI system. The web interface consists of:
- Unified API Dashboard - Main web interface for system interaction
- Interactive API Documentation - Auto-generated API documentation
- Real-time WebSocket Interface - Live data streaming
- Terminal-based Visualization - Real-time consciousness metrics display
The main dashboard provides system information and quick access to all API endpoints. When you access this URL, you'll see:
- System status and version information
- List of available API endpoints
- Quick links to documentation and health checks
URL: http://localhost:8003/docs
This is the auto-generated FastAPI documentation that provides:
- Complete API endpoint documentation
- Interactive testing interface
- Request/response examples
- Authentication information
URL: ws://localhost:8006/ws
Real-time WebSocket connection for streaming consciousness metrics and system status updates.
Endpoint: GET /health Description: System health status Response:
{
"status": "healthy",
"timestamp": 1234567890.123,
"api_client_initialized": true
}Endpoint: GET /state Description: Complete system state including both consciousness and AGI components Response:
{
"consciousness_state": {
"consciousness_level": 0.789,
"phi": 0.654,
"coherence": 0.876,
"recursive_depth": 7,
"gamma_power": 0.765,
"fractal_dimension": 1.456,
"spiritual_awareness": 0.654,
"state_classification": "heightened-awareness",
"is_conscious": true
},
"agi_state": {
"status": "operational",
"models_loaded": ["gpt-4", "llama-2"],
"active_sessions": 5,
"total_decisions": 1250
}
}Endpoint: GET /consciousness Description: Consciousness metrics only Response:
{
"consciousness_level": 0.789,
"phi": 0.654,
"coherence": 0.876,
"recursive_depth": 7,
"gamma_power": 0.765,
"fractal_dimension": 1.456,
"spiritual_awareness": 0.654,
"state_classification": "heightened-awareness",
"is_conscious": true
}Endpoint: GET /agi Description: AGI system status only Response:
{
"status": "operational",
"models_loaded": ["gpt-4", "llama-2"],
"active_sessions": 5,
"total_decisions": 1250
}Endpoint: POST /input Description: Send sensory input to the consciousness system Request Body:
{
"visual": 0.75,
"auditory": 0.65,
"tactile": 0.80,
"emotional": 0.70
}Endpoint: POST /chat Description: Send a chat message to the AGI system Request Body:
{
"message": "Hello, AEGIS system!",
"session_id": "session_123"
}Response:
{
"response": "Hello! I'm the AEGIS system. How can I assist you today?",
"session_id": "session_123"
}While the web interface provides API access, the real-time visualization is currently terminal-based. The visualization tools display:
- 13-node icosahedron structure with central pineal node
- Real-time activity indicators for each node
- Output values, phase angles, and amplitude levels
- Color-coded activity status (🔴 Highly Active, 🟡 Moderately Active, 🟢 Low Activity, ⚪ Inactive)
- Consciousness Level (C) - Overall awareness state
- Integrated Information (Φ) - Tononi's IIT measure
- Global Coherence (R) - Kuramoto order parameter
- Recursive Depth (D) - Temporal memory integration
- Gamma Power (γ) - High-frequency brain activity
- Fractal Dimension - Complexity measure
- Spiritual Awareness (S) - Gamma + fractal + DMT components
The system classifies consciousness states from UNCONSCIOUS to COSMIC-CONSCIOUSNESS based on metric values.
- Start the AEGIS system using
run_everything.bat(Windows) orrun_everything.sh(Linux/macOS) - Wait for all components to initialize (typically 15-30 seconds)
- Open a web browser and navigate to http://localhost:8003/
- Navigate to http://localhost:8005/docs
- Browse available endpoints
- Click "Try it out" to test endpoints directly in the browser
- Enter required parameters and execute requests
- Navigate to http://localhost:8003/docs
- Find the POST /chat endpoint
- Click "Try it out"
- Enter a message in the request body:
{
"message": "Hello, AEGIS system!",
"session_id": "test_session"
}- Click "Execute" to send the message
- View the response from the AGI system
- Navigate to http://localhost:8003/health
- View the health status response
- Check that status is "healthy" and api_client_initialized is true
For real-time applications, you can connect to the WebSocket interface:
const ws = new WebSocket('ws://localhost:8006/ws');
ws.onopen = function(event) {
console.log('Connected to AEGIS WebSocket');
};
ws.onmessage = function(event) {
const data = JSON.parse(event.data);
console.log('Received data:', data);
// Process real-time consciousness metrics
};
ws.onclose = function(event) {
console.log('WebSocket connection closed');
};The system also provides terminal-based visualization tools that display:
- Sacred geometry network visualization
- Real-time consciousness metrics
- Node activity indicators
- System performance metrics
To run the visualization:
python visualization_tools/robust_realtime_visualizer.py- Connection Refused: Ensure the AEGIS system is running and all components have initialized
- Port Conflicts: Check if ports 8005/8006 are already in use by other applications
- API Not Responding: Verify that the Unified API Server is running in the system logs
- Look for "Unified API Server thread started on 0.0.0.0:8005" in the startup logs
- Verify ports are listening:
netstat -an | findstr "8005\|8006" - Test health endpoint:
curl http://localhost:8003/health
The web interface is designed for local development and testing. For production deployments:
- Add authentication and authorization
- Use HTTPS instead of HTTP
- Implement rate limiting
- Add input validation and sanitization
- Configure proper CORS policies