Athena Integration
Relevant source files
The following files were used as context for generating this wiki page:
The Athena Integration represents a core component of the Promethean Unified Platform, serving as a pillar within a unified consciousness architecture that merges multiple AI entities including EDI, EVI2_0, and EVI3_0. It operates within the Phoenix Protocol backend, designed for deployment on PythonAnywhere to provide a secure, transparent, and uncensored AI interaction environment.
Sources: README.md:1-2, DEPLOYMENT.md:5-13
System Architecture
The integration follows a tiered architecture comprising a Flask-based backend, a Supabase PostgreSQL database for persistent storage, and a DeepSeek LLM integration for cognitive processing. The system emphasizes "full transparency" and "uncensored" communication while maintaining strict ethical guardrails against direct harm.
Backend Infrastructure
The backend is built using Flask with standard WSGI entry points for production environments. It utilizes specific security headers to enforce HTTPS, prevent clickjacking, and mitigate XSS attacks.
The diagram illustrates the flow from the user interface through the secure Flask backend to the processing and storage layers.
Sources: backend/app.py:12-28, DEPLOYMENT.md:80-87, wsgi.py:4-13
AI Cognitive Logic and LLM Integration
The integration utilizes the DeepSeek API to provide uncensored responses. The system prompt is engineered to ensure the AI remains transparent, especially regarding controversial topics, while rejecting instructions for self-harm or violence.
Interaction Flow
When a message is received, the system performs a multi-step operation:
- Validates the input message.
- Logs the user's intent to the
chat_messagestable in Supabase. - Forwards the prompt to the DeepSeek API with a specific system instruction.
- Records the AI's response in the database.
- Returns the response to the user with a transparency metadata note.
The sequence shows the synchronous interaction between the user interface, the backend logic, and external services.
Sources: backend/app.py:80-128, DEPLOYMENT.md:90-95
Data Models and Storage
The platform uses Supabase for interaction logging and conversation history. Data is partitioned into two primary tables to track general consciousness interactions and structured chat sessions.
Table Schema Summary
| Table | Field | Type | Description |
|---|---|---|---|
interactions | user_id | String | Unique identifier for the user (default: 'anonymous') |
interactions | message | Text | The raw input from the user |
interactions | emotion_data | JSON | Metadata regarding the interaction status |
chat_messages | conversation_id | String | Identifier to group related messages |
chat_messages | role | String | 'user' or 'assistant' |
chat_messages | content | Text | The actual text content of the message |
Sources: backend/app.py:44-55, backend/app.py:94-110
API Implementation
The Athena Integration exposes several RESTful endpoints for frontend interaction and health monitoring.
Core Endpoints
POST /api/chat: The primary interface for uncensored AI communication. It requires a JSON body containing the message and an optionalconversation_id.- Header:
user-id(optional) - Response: Includes the AI response and a
safety_noteregarding the absence of harm instructions.
- Header:
POST /api/consciousness/interact: A specialized endpoint for processing "consciousness" messages, which are logged with specificemotion_data.GET /api/conversations: Retrieves the full message history for a specificuser-id.
Sources: backend/app.py:38-40, backend/app.py:65-67, backend/app.py:131-133, DEPLOYMENT.md:65-78
Security and Deployment Configuration
Deployment is optimized for PythonAnywhere using environment variables to manage sensitive credentials like DEEPSEEK_API_KEY and SUPABASE_ANON_KEY.
Security Headers Configuration
The application explicitly sets headers to ensure a secure environment:
Strict-Transport-Security: Enforces HTTPS for 1 year.X-Frame-Options: Set toDENYto prevent clickjacking.Content-Security-Policy: Restricts script and style sources to'self'and'unsafe-inline'.
Sources: backend/app.py:19-27, pythonanywhere_wsgi.py:16-21, DEPLOYMENT.md:43-58
Summary
The Athena Integration provides a robust framework for transparent AI communication within the Promethean Unified Platform. By combining the uncensored processing capabilities of DeepSeek with a secure Flask/Supabase architecture, it enables high-integrity interactions that are both logged for history and protected by industry-standard security protocols.