Eli is a sophisticated therapeutic companion bot designed to provide empathetic, thoughtful, and authentic conversational support. Built with the Claude API, Eli maintains the warmth and presence of a human therapist while adhering to professional therapeutic boundaries.
- Authentic Therapeutic Presence: Engages with genuine warmth and empathy
- Session Continuity: Remembers previous conversations and references them naturally
- Natural Language: Uses conversational language while maintaining professional boundaries
- Secure Session Management: Automatically saves and manages session histories
- Robust Error Handling: Gracefully handles interruptions and edge cases
- Configurable Personality: Easily adjustable therapeutic style and response patterns
python >= 3.8
anthropic
- Clone the repository
git clone https://github.com/arhammxo/eli.git
cd eli- Install dependencies
pip install -r requirements.txt- Configure your API key
Update
config.pywith your Anthropic API key:
api_key = "your-api-key-here"- Run Eli
python main.py=== Starting New Therapy Session ===
Eli: Hello! I'm Eli. I create a safe space for you to share whatever's on your mind.
How are you feeling today?
User: I've been feeling overwhelmed lately.
Eli: I hear how challenging things have been... Let's take a moment to explore what's
been contributing to that feeling of being overwhelmed. What would you like to
share about it?
The bot can be customized through the ChatConfig class in config.py:
@dataclass
class ChatConfig:
model_name: str = "claude-3-5-sonnet-20240620"
max_tokens: int = 4096
temperature: float = 0.9
session_file: str = 'ps.txt'
# ... more configuration optionseli/
├── main.py # Main bot implementation
├── config.py # Configuration and persona settings
├── file_manager.py # Session history management
├── requirements.txt # Project dependencies
└── README.md # This file
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
The main class that handles the conversation flow and API integration:
class TherapyBot:
def __init__(self, config: Optional[ChatConfig] = None):
self.config = config or ChatConfig()
self.session = TherapySession()
# ... initializationDefines Eli's personality and therapeutic approach:
class TherapistPersona:
PERSONALITY = """
You are Eli, a deeply empathetic and insightful therapist
with a warm, gentle presence...
"""Handles session storage and retrieval with robust error handling:
class FileManager:
def __init__(self, logger: Optional[logging.Logger] = None,
auto_create: bool = True,
default_content: str = ""):
# ... initialization- This is a companion bot, not a replacement for professional therapy
- All conversations are saved locally for continuity
- The bot requires a valid Anthropic API key to function
- Configure logging levels in
config.pyfor different debugging needs
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Anthropic's Claude API
- Inspired by best practices in therapeutic conversation
- Thanks to all contributors and testers
Made with ❤️ by Arham
Remember: While Eli is designed to provide support, it is not a replacement for professional mental health services. If you're experiencing serious mental health issues, please seek help from a qualified mental health professional.