docs: Update README, .env.example, and .gitignore for Living AI

- Add Living AI features overview to README
- Document all Living AI configuration options
- Add Living AI command toggles documentation
- Add new Living AI commands (!relationship, !mood, etc.)
- Update project structure to include new services
- Add Living AI settings to .env.example
- Add command toggles to .env.example
- Update commands reference with Living AI commands
- Add database files to .gitignore
This commit is contained in:
2026-01-12 20:06:29 +01:00
parent 0d43b5b29a
commit bf01724b3e
3 changed files with 140 additions and 3 deletions

View File

@@ -82,6 +82,56 @@ SEARXNG_ENABLED=true
# Maximum number of search results to fetch (1-20)
SEARXNG_MAX_RESULTS=5
# ===========================================
# Living AI Configuration
# ===========================================
# Master switch for all Living AI features
LIVING_AI_ENABLED=true
# Enable mood system (bot has emotional states that affect responses)
MOOD_ENABLED=true
# Enable relationship tracking (Stranger -> Close Friend progression)
RELATIONSHIP_ENABLED=true
# Enable autonomous fact extraction (bot learns from conversations)
FACT_EXTRACTION_ENABLED=true
# Probability of extracting facts from messages (0.0-1.0)
FACT_EXTRACTION_RATE=0.3
# Enable proactive messages (birthdays, follow-ups)
PROACTIVE_ENABLED=true
# Enable cross-user associations (privacy-sensitive - shows shared interests)
CROSS_USER_ENABLED=false
# Enable bot opinion formation (bot develops topic preferences)
OPINION_FORMATION_ENABLED=true
# Enable communication style learning (bot adapts to user preferences)
STYLE_LEARNING_ENABLED=true
# How fast mood returns to neutral per hour (0.0-1.0)
MOOD_DECAY_RATE=0.1
# ===========================================
# Command Toggles
# ===========================================
# Master switch for all commands (when false, bot handles via conversation)
COMMANDS_ENABLED=true
# Individual command toggles
CMD_RELATIONSHIP_ENABLED=true
CMD_MOOD_ENABLED=true
CMD_BOTSTATS_ENABLED=true
CMD_OURHISTORY_ENABLED=true
CMD_BIRTHDAY_ENABLED=true
CMD_REMEMBER_ENABLED=true
CMD_SETNAME_ENABLED=true
CMD_WHATDOYOUKNOW_ENABLED=true
CMD_FORGETME_ENABLED=true
# ===========================================
# Logging & Monitoring
# ===========================================
@@ -111,3 +161,16 @@ LOG_LEVEL=INFO
# Admin Memory:
# !setusername @user <name> - Set name for another user
# !teachbot @user <fact> - Add a fact about a user
#
# Living AI:
# !relationship - See your relationship level with the bot
# !mood - See the bot's current emotional state
# !botstats - Bot shares its self-awareness statistics
# !ourhistory - See your history with the bot
# !birthday <date> - Set your birthday (e.g., !birthday March 15)
#
# Note: When commands are disabled, the bot handles these naturally:
# - "what do you know about me?" instead of !whatdoyouknow
# - "call me Alex" instead of !setname
# - "how are you feeling?" instead of !mood
# - "my birthday is March 15th" instead of !birthday

5
.gitignore vendored
View File

@@ -57,3 +57,8 @@ Thumbs.db
# SearXNG config (may contain secrets)
searxng/settings.yml
# Database files (if using SQLite for testing)
*.db
*.sqlite
*.sqlite3

View File

@@ -12,6 +12,17 @@ A customizable Discord bot that responds to @mentions with AI-generated response
- **Fully Customizable**: Configure bot name, personality, and behavior
- **Easy Deployment**: Docker support with PostgreSQL included
### Living AI Features
- **Autonomous Learning**: Bot automatically extracts and remembers facts from conversations
- **Mood System**: Bot has emotional states that affect its responses naturally
- **Relationship Tracking**: Bot builds relationships from Stranger to Close Friend
- **Communication Style Learning**: Bot adapts to each user's preferred style
- **Opinion Formation**: Bot develops genuine preferences on topics
- **Proactive Behavior**: Birthday wishes, follow-ups on mentioned events
- **Self-Awareness**: Bot knows its age, statistics, and history with users
- **Cross-User Connections**: Bot can identify shared interests between users
## Quick Start
### 1. Clone the repository
@@ -104,6 +115,38 @@ When `DATABASE_URL` is set, the bot uses PostgreSQL for persistent storage. With
When configured, the bot automatically searches the web for queries that need current information (news, weather, etc.).
### Living AI Settings
| Variable | Default | Description |
|----------|---------|-------------|
| `LIVING_AI_ENABLED` | `true` | Master switch for all Living AI features |
| `MOOD_ENABLED` | `true` | Enable mood system |
| `RELATIONSHIP_ENABLED` | `true` | Enable relationship tracking |
| `FACT_EXTRACTION_ENABLED` | `true` | Enable autonomous fact extraction |
| `FACT_EXTRACTION_RATE` | `0.3` | Probability of extracting facts (0.0-1.0) |
| `PROACTIVE_ENABLED` | `true` | Enable proactive messages (birthdays, follow-ups) |
| `CROSS_USER_ENABLED` | `false` | Enable cross-user associations (privacy-sensitive) |
| `OPINION_FORMATION_ENABLED` | `true` | Enable bot opinion formation |
| `STYLE_LEARNING_ENABLED` | `true` | Enable communication style learning |
| `MOOD_DECAY_RATE` | `0.1` | How fast mood returns to neutral per hour |
### Command Toggles
All commands can be individually enabled/disabled. When disabled, the bot handles these functions naturally through conversation.
| Variable | Default | Description |
|----------|---------|-------------|
| `COMMANDS_ENABLED` | `true` | Master switch for all commands |
| `CMD_RELATIONSHIP_ENABLED` | `true` | Enable `!relationship` command |
| `CMD_MOOD_ENABLED` | `true` | Enable `!mood` command |
| `CMD_BOTSTATS_ENABLED` | `true` | Enable `!botstats` command |
| `CMD_OURHISTORY_ENABLED` | `true` | Enable `!ourhistory` command |
| `CMD_BIRTHDAY_ENABLED` | `true` | Enable `!birthday` command |
| `CMD_REMEMBER_ENABLED` | `true` | Enable `!remember` command |
| `CMD_SETNAME_ENABLED` | `true` | Enable `!setname` command |
| `CMD_WHATDOYOUKNOW_ENABLED` | `true` | Enable `!whatdoyouknow` command |
| `CMD_FORGETME_ENABLED` | `true` | Enable `!forgetme` command |
### Example Configurations
**Friendly Assistant:**
@@ -171,6 +214,22 @@ Admin commands:
| `!setusername @user <name>` | Set name for another user |
| `!teachbot @user <fact>` | Add a fact about a user |
### Living AI Commands
| Command | Description |
|---------|-------------|
| `!relationship` | See your relationship level with the bot |
| `!mood` | See the bot's current emotional state |
| `!botstats` | Bot shares its self-awareness statistics |
| `!ourhistory` | See your history with the bot |
| `!birthday <date>` | Set your birthday for the bot to remember |
**Note:** When commands are disabled, the bot handles these naturally through conversation:
- Ask "what do you know about me?" instead of `!whatdoyouknow`
- Say "call me Alex" instead of `!setname Alex`
- Ask "how are you feeling?" instead of `!mood`
- Say "my birthday is March 15th" instead of `!birthday`
## AI Providers
| Provider | Models | Notes |
@@ -193,15 +252,25 @@ src/daemon_boyfriend/
├── models/
│ ├── user.py # User, UserFact, UserPreference
│ ├── conversation.py # Conversation, Message
── guild.py # Guild, GuildMember
── guild.py # Guild, GuildMember
│ └── living_ai.py # BotState, UserRelationship, etc.
└── services/
├── ai_service.py # AI provider factory
├── database.py # PostgreSQL connection
├── user_service.py # User management
├── persistent_conversation.py # DB-backed history
├── providers/ # AI providers
── searxng.py # Web search service
alembic/ # Database migrations
── searxng.py # Web search service
├── mood_service.py # Mood system
├── relationship_service.py # Relationship tracking
├── fact_extraction_service.py # Autonomous learning
├── communication_style_service.py # Style learning
├── opinion_service.py # Opinion formation
├── proactive_service.py # Scheduled events
├── self_awareness_service.py # Bot self-reflection
└── association_service.py # Cross-user connections
schema.sql # Database schema
project-vision.md # Living AI design document
```
## License