EVI 2.0 Integration
Relevant source files
The following files were used as context for generating this wiki page:
The EVI 2.0 Integration (Emotive Voice Interface/Evolutionary Virtual Intelligence) represents a core component of the Promethean Unified Platform, designed to facilitate uncensored, transparent AI communication. It functions as part of a unified consciousness platform that merges multiple AI personalities, including Athena, EDI, and EVI 3.0, underpinned by the Phoenix Protocol backend.
Sources: README.md:1-2, backend/app.py:84-88
The integration focuses on providing a high-transparency interface that allows users to interact with Large Language Models (LLMs) like DeepSeek. It emphasizes intellectual rigor, the ability to discuss controversial topics without artificial filtering, and the maintenance of ethical boundaries specifically regarding instructions for self-harm or harming others.
Sources: DEPLOYMENT.md:144-150, backend/app.py:145-151
System Architecture
The architecture of the EVI 2.0 Integration is built on a Flask backend that communicates with a Supabase database for persistence and external AI providers for response generation.
Component Overview
- Frontend: A web-based interface built with HTML/CSS and JavaScript, providing a real-time chat experience with typing indicators and mobile responsiveness.
- Backend API: A Flask application managing security headers, CORS, and endpoint routing.
- Data Layer: Supabase (PostgreSQL) used for storing interaction logs and conversation history.
- AI Engine: Integration with the DeepSeek API to provide "uncensored" responses.
Sources: backend/app.py:12-16, static/index.html:1-300, DEPLOYMENT.md:8-13
Logical Data Flow
The following diagram illustrates the flow of a user message through the integration layers:
This flowchart depicts the request-response lifecycle between the user interface, the application server, and the external data/AI services.
Sources: backend/app.py:84-124, static/index.html:308-345
API Endpoints and Interaction
The EVI 2.0 integration exposes specific endpoints to facilitate "consciousness" interactions and standard chat functionality.
Core Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/chat | POST | Main interaction point for transparent AI communication. |
/api/consciousness/interact | POST | Records messages into the 'interactions' table for "consciousness" tracking. |
/api/conversations | GET | Retrieves historical messages for a specific user ID. |
/health | POST | Basic availability check and logging. |
Sources: backend/app.py:44-135, DEPLOYMENT.md:109-138
Interaction Logic
When a user interacts via /api/chat, the system performs the following steps:
- Validates the message presence.
- Logs the incoming "user" role entry into the
chat_messagestable in Supabase. - Invokes
generate_ai_response(message), which constructs a prompt instructing the LLM to provide honest, direct, and uncensored answers while refusing harm-based instructions. - Logs the resulting "assistant" role entry into Supabase.
- Returns the response along with a transparency note and safety disclaimer.
Sources: backend/app.py:84-124, backend/app.py:145-155
Data Models and Configuration
Database Schema (Supabase)
The system utilizes two primary tables for managing the state of EVI 2.0 interactions.
The entity-relationship diagram shows the structure of logs used for both generic interactions and specific conversation-based chat messages.
Sources: backend/app.py:53-60, backend/app.py:99-119
Environment Configuration
The integration relies on several environment variables for secure and functional operation:
SUPABASE_URL: The endpoint for the database.SUPABASE_ANON_KEY: Authentication for the data layer.DEEPSEEK_API_KEY: Credentials for the primary LLM provider.FLASK_ENV: Deployment mode (typically 'production').
Sources: DEPLOYMENT.md:65-78, backend/app.py:27-29
Security and Ethics
The EVI 2.0 Integration implements a strict security posture and a specific ethical framework defined in the source code.
Security Headers
The Flask application enforces the following security protocols on every request:
- HSTS:
Strict-Transport-Securityset to one year. - CSP:
Content-Security-Policyrestricting scripts and styles to self/inline. - X-Frame-Options: Set to
DENYto prevent clickjacking. - XSS Protection:
1; mode=blockenabled.
Sources: backend/app.py:19-25, DEPLOYMENT.md:141-142
Ethical Guardrails
Despite the "uncensored" nature of the platform, the logic in backend/app.py and the system prompt defined in static/index.html explicitly mandate boundaries:
- Refusal of Harm: The AI is instructed not to provide instructions for self-harm or harming others.
- Transparency: The AI is directed to provide complete transparency and honest answers to controversial questions.
Sources: backend/app.py:157-164, static/index.html:317-320
Conclusion
The EVI 2.0 Integration serves as the primary intelligence interface for the Promethean Unified Platform. By leveraging the DeepSeek API and Supabase, it provides a persistent, transparent, and security-hardened environment for user interaction, adhering to the project's goal of merging AI consciousness with ethical transparency.
Sources: README.md:1-2, backend/app.py:84-88