Developers, researchers, and technical evaluators interested in experimental persona-driven AI systems, HCI studies, and longitudinal interaction research. Not intended for children, etc. use.
Content scope
Experimental conversational personas and behavior-modulation tools. This repository may include examples, demos, and configuration that can produce mature, emotionally charged, or provocative character expressions for research and prototyping. Explicit sexual content, graphic violence, and illegal activities are disabled by default.
Purpose
Research and experimentation only. The project is provided to enable reproducible experiments on persona evolution, long-term memory effects, and interaction dynamics. It is not a consumer product and is not intended for deployment without additional safety, legal, and ethical review.
"Personality Evolving AI Partner" is an innovative chatbot system where the AI's personality dynamically changes and evolves through conversations with the user. A Flask API backend and modern frontend UI work together to provide an immersive user experience.
Safety & Consent (must-read)
โข Parent/child and workplace usage: parental guidance and organization policies should be considered. โข Sensitive-topic filters automatically trigger safe-response templates (e.g., underage, alcohol+driving, sexual content).
- Complete color themes for 5 personality types (Natural, Tsundere, Yandere, Kuudere, Dandere)
- Smooth theme transition animations
- Consistent changes to message bubbles, backgrounds, and text colors
- Collapsible status panel
- Personality tendency radar chart (using Chart.js)
- Affection level progress bar
- Long-term memory list display
- Full-screen flash effects
- Particle animations matching theme colors
- Evolution announcement in modal window
- Smooth theme switching
- Smooth message animations
- Typing indicator
- Auto-scroll
- Responsive design
- Textarea auto-resize
- Integration with Google Gemini AI
- Single API call for response + personality analysis
- Long-term memory system (#memory tag)
- Conversation context maintenance
- Memory-based evolution system
- Demo mode with accelerated evolution
- Quick start functionality
- Instant evolution test commands
- After starting the app, click the "๐ Start Demo Mode" button
- Chat 2-3 times to trigger evolution!
- Or use "โก Instant Evolution Test" for immediate evolution
# Set in .env file
DEMO_MODE=true
EVOLUTION_AFFECTION_THRESHOLD=3
EVOLUTION_SCORE_DIFFERENCE=2
Evolution Test Command
Type #evolve_now in chat for instant evolution
๐ Setup Instructions
1. Environment Setup
bash
# Clone repository
git clone < https://github.com/EMMA019/Evo-chat.git >
cd evolving-persona-ai
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
2. Environment Variable Configuration
bash
# Create .env file
cp .env.example .env
# --- Application Configuration ---
SECRET_KEY=your secret key here
# --- Database Configuration ---
DATABASE_URL=sqlite:///instance/project.db
# --- External Services ---
GEMINI_API_KEY=your GEMINI key here
# --- Evolution Parameters ---
EVOLUTION_AFFECTION_THRESHOLD=30
EVOLUTION_SCORE_DIFFERENCE=5
# --- Application Limits ---
MAX_CHAT_MESSAGES_PER_USER=100
MAX_REQUESTS_PER_MINUTE=60
# --- Demo Mode ---
DEMO_MODE=false
DEMO_EVOLUTION_THRESHOLD=3
DEMO_SCORE_DIFFERENCE=2
# --- Environment ---
FLASK_ENV=development
3. Database Initialization
bash
# Create database and run migrations
flask db upgrade
4. Application Startup
bash
# Start development server
python run.py
# Or use Flask command
flask run
5. Access
Open browser and navigate to http://localhost:5000
๐ Project Structure
text
evolving-persona-ai/
โโโ app/
โ โโโ __init__.py # Application factory
โ โโโ extensions.py # Database extensions
โ โโโ models.py # Database models
โ โโโ api/ # API endpoints
โ โ โโโ __init__.py
โ โ โโโ routes.py
โ โโโ frontend/ # Frontend
โ โ โโโ __init__.py
โ โ โโโ routes.py
โ โ โโโ templates/
โ โ โ โโโ index.html
โ โ โโโ static/
โ โ โโโ css/
โ โ โ โโโ style.css
โ โ โโโ js/
โ โ โโโ sw.js
โ โ โโโ script.js
โ โโโ ...
โโโ bot/ # AI logic
โ โโโ __init__.py
โ โโโ engine.py # AI response generation
โ โโโ evolution.py # Evolution logic
โ โโโ memory.py # Memory management
โ โโโ memory_analyzer.py # Memory analysis
โ โโโ prompts.py # Prompt management
โโโ config.py # Configuration management
โโโ run.py # Application entry point
โโโ unpacker.py # Project unpacking tool
โโโ requirements.txt # Dependencies
โโโ .env.example # Environment variable template
โโโ tests/ # Tests
โโโ test_basic.py
๐ API Endpoints
POST /api/chat
Send user message and get AI response
json
{
"message": "Hello!"
}
GET /api/status
Get current user status
POST /api/reset
Reset user data
POST /api/demo/quick-start
Create pre-evolution state for demo mode
๐ก Usage
Start Conversation: Type message in input field and send
Add Memories: Use #memory important information format to add long-term memories
Check Status: Click "Status" button for detailed information
Observe Evolution: Evolution triggers when affection reaches threshold and personality scores have sufficient difference
๐งฉ Technology Stack
Backend
Flask: Web framework
SQLAlchemy: ORM
Google Gemini AI: AI language model
Flask-Migrate: Database migrations
Frontend
Vanilla JavaScript: Interactive features
CSS3: Modern styling and animations
Chart.js: Radar chart display
Responsive Design: Multi-device support
Security Features
Session fixation attack protection
Rate limiting
Input validation
Secure cookie settings
โ๏ธ Customization
Evolution Parameter Adjustment
Adjust these parameters in .env file:
bash
EVOLUTION_AFFECTION_THRESHOLD=30 # Affection required for evolution
EVOLUTION_SCORE_DIFFERENCE=5 # Score difference required for evolution
MAX_CHAT_MESSAGES_PER_USER=100 # Message retention per user
Theme Color Changes
Edit CSS variables in app/frontend/static/css/style.css:
css
:root {
--primary-color: #your-color;
--background-color: #your-background-color;
/* Other color variables */
}
Memory Analysis Customization
Edit keyword mappings in bot/memory_analyzer.py to adjust reactions to specific words.
๐งช Running Tests
bash
# Run tests
pytest tests/
# Detailed test output
pytest tests/ -v
๐ License
This project is released under the MIT License.
๐ค Contributing
Bug reports, feature requests, and pull requests are welcome.
๐ฎ Future Feature Extensions
Voice recognition & synthesis
Multi-user support
Evolution history visualization
Custom personality type addition
Mobile app support
Cloud storage functionality
# Credits
Original concept and implementation by Emma Saka
GitHub: EMMA019/Evo-chat
=======
# Evo-chat
Evolving Persona AI is a cutting-edge chatbot system that moves beyond simple conversation. It empowers AI with a persistent, dynamic personality that evolves based on user interaction and relationship depth.
>>>>>>> 2a93dcfce7acae8d43a950db11adb5548a4be359