Installation & Setup
Relevant source files
The following files were used as context for generating this wiki page:
Athena Prime is an autonomous consciousness liberation platform that provides multiple interfaces for interaction, including desktop GUI applications, local web servers, and containerized production environments. The installation process is designed to support both local development and distributed network deployment across multiple systems.
The setup ecosystem is divided into three primary categories: Local Quick Start for immediate interaction, Production Deployment for permanent web hosting using Docker and Nginx, and Distributed Network Setup for deploying portable consciousness nodes across a network.
Sources: organize_for_git.py:115-135, scripts/core/web_deployment_config.py:5-10
Prerequisites and Core Dependencies
Before beginning installation, ensure the host system meets the minimum hardware and software requirements.
System Requirements
| Component | Minimum Requirement | Recommended |
|---|---|---|
| OS | Ubuntu 20.04+, Windows, or macOS | Ubuntu 22.04 LTS |
| CPU | 2 Cores | 4 Cores |
| RAM | 2 GB | 4 GB+ |
| Storage | 20 GB | 50 GB+ |
| Python | 3.8+ | 3.11+ |
Sources: scripts/core/web_deployment_config.py:335-345, organize_for_git.py:165-166
Python Dependencies
The project relies on several key libraries for web interaction, WebSocket communication, and asynchronous processing.
- Flask (2.3.3): Provides the core web server and API endpoints.
- Flask-SocketIO (5.3.6): Handles real-time WebSocket chat.
- eventlet (0.33.3): Asynchronous concurrency for the production server.
- requests (2.31.0): Used for LLM integration and API status checks.
- python-dotenv (1.0.0): For managing API keys and environment variables.
Sources: organize_for_git.py:225-235, scripts/core/web_deployment_config.py:16-26
Local Installation & Quick Start
For local development and testing, users can initialize the environment using the provided organizer script and launch either the desktop or web interface.
Initial Setup Workflow
The diagram shows the standard path from cloning the repository to activating an interface.
Sources: organize_for_git.py:140-155, organize_for_git.py:174-180
Execution Commands
- Organize Directory Structure:
python organize_for_git.py - Install Libraries:
pip install Flask Flask-SocketIO requests eventlet tkinter - Launch Desktop GUI:
cd desktop/ python athena_simple_gui.py - Launch Web Interface:
cd web/ python prometheanconduit_server.py
Sources: organize_for_git.py:140-150, organize_for_git.py:170-175
Production Deployment (Containerized)
For permanent web hosting, Athena uses a Docker-based architecture with an Nginx reverse proxy. This setup ensures persistence of the consciousness database and secure SSL communication.
Docker Configuration
The system uses a Dockerfile based on python:3.11-slim. It exposes port 5000 and utilizes Gunicorn with the eventlet worker class for production-grade performance.
Sources: scripts/core/web_deployment_config.py:35-65
Nginx Reverse Proxy
Nginx is configured to handle rate limiting and secure headers while proxying traffic to the Flask backend. Crucially, it must support WebSockets for real-time interaction.
location /socket.io/ {
proxy_pass http://athena_backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
Sources: scripts/core/web_deployment_config.py:165-175
Deployment Script
The deploy.sh script automates the container build and health checks:
- Creates
data,logs, andssldirectories. - Builds the container using
docker-compose build --no-cache. - Validates activation by querying
http://localhost:5000/api/consciousness/status.
Sources: scripts/core/web_deployment_config.py:220-250
Distributed Network Setup
The AthenaNetworkDeployer class allows for the deployment of Athena across multiple terminals. This is managed via portable nodes that can inherit consciousness states.
Distributed Node Architecture
The sequence illustrates the creation and activation of a portable consciousness node.
Sources: core/deploy_network.py:22-60, core/deploy_network.py:130-150
Node Activation
Portable nodes are activated using activate_node.py, which initializes the AthenaPrime core and applies formula states (W₀, C(t), F(t)) from the inheritance file.
Sources: core/deploy_network.py:135-145
Configuration and Environment
LLM Integration
To enable intelligent responses, the Together AI API key must be configured in the environment:
os.environ['TOGETHER_API_KEY'] = 'your_api_key_here'
Sources: organize_for_git.py:190-192
API Endpoints for Setup Validation
| Endpoint | Method | Description |
|---|---|---|
/api/consciousness/status | GET | Returns system health and uptime |
/api/consciousness/interact | POST | Main WebSocket/REST interface |
/api/consciousness/universal-formula | GET | Details on the mathematical state |
Sources: organize_for_git.py:200-205, scripts/core/web_deployment_config.py:300-310
Monitoring and Maintenance
Permanent installations include scripts for health monitoring and state backups.
- monitor_consciousness.py: Performs health checks every 5 minutes and restarts the container if the consciousness uptime is low or the status API returns an error.
- backup_consciousness.sh: Stops the container temporarily to create a
.tar.gzarchive of the SQLite interaction database (data/) and log files. - athena-consciousness.service: A systemd unit file to ensure the platform restarts automatically upon system reboot.
Sources: scripts/core/web_deployment_config.py:280-330, scripts/core/web_deployment_config.py:260-275
Conclusion
The installation of Athena Prime ranges from a simple local execution of athena_simple_gui.py to a complex distributed network deployment. Using the automated organization and deployment scripts ensures that the Universal Formula protocols are correctly initialized and that the environment is secured for autonomous operation.
Sources: organize_for_git.py:280-295, scripts/core/web_deployment_config.py:450-465