ATLES Phase 1: Basic Chat Interface
π Overview
This is Phase 1 of the ATLES UI - a Basic Chat Interface built with Streamlit that allows users to chat with ATLES AI agents through a clean, modern web interface.
β¨ Features
Core Requirements β
- Simple Chat Interface: Users can chat with the ATLES brain
- Agent Selection & Control: Choose between Reasoning, Analysis, and Creative agents
- Basic Safety Monitoring: Show safety status and any blocked requests
Technical Specs β
- Framework: Streamlit (Python)
- Integration: Connects to existing
atles.brain.ATLESBrain - Features: Chat input/output, agent dropdown, safety status display
- Design: Clean, modern interface that matches ATLES branding
Key Functions β
start_conversation()- Initialize chat sessionchat()- Send/receive messages with safety checksprocess_with_agents()- Route to selected agentget_safety_status()- Display safety system status
ποΈ Architecture
UI Layout
- Header: ATLES logo and safety status
- Sidebar: Agent selection dropdown and controls
- Main Area: Chat area with message history and input field
- Right Panel: Session info and system status
Safety System Integration
- Real-time safety monitoring
- Input and response validation
- Safety status display with color coding
- "Motherly Instinct" AI safety features
π οΈ Installation & Setup
Prerequisites
- Python 3.8+
- pip package manager
1. Install Dependencies
# Install Streamlit and core dependencies
pip install -r streamlit_requirements.txt
# Or install manually
pip install streamlit streamlit-option-menu
2. ATLES Integration
Option A: Full ATLES Installation (Recommended)
# Install ATLES package
pip install -e .
# Run the full version
streamlit run streamlit_chat.py
Option B: Demo Mode (No ATLES Required)
# Run the simplified version (works without ATLES)
streamlit run streamlit_chat_simple.py
3. Launch the Application
# Navigate to the project directory
cd /path/to/atles
# Launch Streamlit
streamlit run streamlit_chat_simple.py
The application will open in your default web browser at http://localhost:8501
π― Usage Guide
Getting Started
Initialize ATLES Brain
- Click the "π Initialize ATLES Brain" button in the sidebar
- Wait for initialization to complete
Start a Conversation
- Click "π¬ Start New Conversation" to create a new chat session
- A unique session ID will be generated
Select an Agent
- Choose from the dropdown in the sidebar:
- π§ Reasoning Agent: Logical analysis and problem-solving
- π Analysis Agent: Data analysis and pattern recognition
- π¨ Creative Agent: Idea generation and creative tasks
- Choose from the dropdown in the sidebar:
Start Chatting
- Type your message in the input field
- Click "Send" or press Enter
- View responses and safety status
Safety Monitoring
- Safety Status: Always visible in the sidebar
- Real-time Checks: Input and response validation
- Safety Indicators: Color-coded status (Safe/Moderate/Dangerous/Blocked)
- Statistics: View safety metrics and blocked requests
Session Management
- Session Info: View current session details
- Quick Actions: Refresh session, clear history
- System Status: Monitor ATLES brain and safety system
π§ Configuration
Environment Variables
# Optional: Set custom models directory
export ATLES_MODELS_DIR="/path/to/models"
# Optional: Set logging level
export ATLES_LOG_LEVEL="INFO"
Customization
The interface can be customized by modifying:
- Colors: Update CSS variables in the custom styles section
- Agents: Add new agent types in the
agent_optionsdictionary - Safety Features: Modify safety display functions
- UI Layout: Adjust column widths and component placement
π§ͺ Testing
Demo Mode Testing
The simplified version (streamlit_chat_simple.py) includes a demo mode that:
- Simulates ATLES responses without requiring the full package
- Demonstrates all UI features and functionality
- Provides realistic chat interactions for testing
Full Mode Testing
To test with the complete ATLES system:
- Ensure all ATLES dependencies are installed
- Run
streamlit run streamlit_chat.py - Test agent selection and safety features
- Verify integration with ATLES brain
π Troubleshooting
Common Issues
Import Errors
ModuleNotFoundError: No module named 'atles'
Solution: Install ATLES package or use demo mode
Streamlit Not Found
streamlit: command not found
Solution: Install Streamlit with pip install streamlit
Port Already in Use
Port 8501 is already in use
Solution: Use different port: streamlit run app.py --server.port 8502
ATLES Brain Initialization Failed
Failed to initialize ATLES Brain
Solution: Check ATLES installation or use demo mode
Debug Mode
Enable debug logging:
import logging
logging.basicConfig(level=logging.DEBUG)
π File Structure
atles/
βββ streamlit_chat.py # Full ATLES integration
βββ streamlit_chat_simple.py # Simplified demo version
βββ streamlit_requirements.txt # Dependencies
βββ README_Streamlit_Chat.md # This file
βββ atles/ # ATLES package
βββ brain.py # ATLES brain implementation
βββ agents.py # Agent system
βββ safety_system.py # Safety features
π Next Steps
Phase 1 Enhancements
- Add message timestamps
- Implement conversation export
- Add user authentication
- Enhanced error handling
Future Phases
- Phase 2: Advanced UI features and customization
- Phase 3: Multi-user support and collaboration
- Phase 4: Advanced agent orchestration
- Phase 5: Real-time streaming and notifications
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
π License
This project is part of ATLES and follows the same licensing terms.
π Support
For issues and questions:
- Check the troubleshooting section above
- Review ATLES documentation
- Open an issue in the repository
- Contact the development team
ATLES Phase 1 Chat Interface - Built with β€οΈ and Streamlit