RAVANA is an autonomous, evolving agentic system designed for continuous 24/7 operation, driven by internal states, reflection, and self-generated goals. It is an experiment in autonomous general intelligence that runs continuously without constant human prompting, builds and recalls memory, models emotions as internal signals guiding behavior, reflects, adapts, and improves itself over time.
main.py: Entry point that initializes and runs the AGI systemcore/: Orchestrator, state manager, internal services, and configurationmodules/: Plug-and-play intelligence modules (reflection, experimentation, conversational AI, etc.)services/: Service-level abstractions: memory, knowledge bases, environment interactiondatabase/: SQLModel-based schemas, models, and the database engine for long-term persistence
- AGISystem: Main orchestrator that manages all components
- Snake Agent: Autonomous code analysis and improvement system that monitors, analyzes, and experiments with the RAVANA codebase in the background
- Memory Service: Enhanced memory system for episodic, semantic, and working memory
- Conversational AI: Multi-platform bot system supporting Discord and Telegram
- Experimentation Engine: System for designing and running experiments to validate hypotheses
- Reflection Module: Self-reflection capabilities allowing the AGI to analyze its performance
- Emotional Intelligence: Mood modeling and emotional responses that influence behavior
The system uses a comprehensive configuration system in core/config.py with:
- Database URL settings
- Autonomous loop parameters (curiosity chance, reflection chance, sleep duration)
- Emotional intelligence settings (positive/negative moods, emotional persona)
- Model settings for embeddings and LLMs
- Snake Agent configuration with enhanced performance settings
- Blog integration configuration
- Conversational AI settings
- Python 3.13 or higher
- Dependencies specified in
pyproject.toml
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# or for development
pip install -e .# Start the main system
python main.py
# Run with specific options:
# Run a specific physics experiment
python main.py --physics-experiment "Quantum Tunneling Barrier Analysis"
# Run in discovery mode
python main.py --discovery-mode
# Run experiment tests
python main.py --test-experiments
# Run a single task
python main.py --single-task "Analyze the current state of the codebase"- Continuous 24/7 operation without human intervention
- Self-managed curiosity and reflection cycles
- Automated task generation and execution
- Mood-based behavior modification
- Enhanced memory service for storing and retrieving experiences
- Adaptive learning engine that improves decision-making over time
- Knowledge compression and consolidation
- Episodic memory for contextual understanding
- Discord and Telegram bot integration
- Bidirectional communication with external users
- Emotional context synchronization between platforms
- Snake Agent for autonomous codebase analysis
- Automated experiment execution and evaluation
- Safe experimenter for testing code changes
- File system monitoring for changes
- Self-designed experiments to validate hypotheses
- Reflection module for analyzing performance and generating insights
- Systematic knowledge building through experimentation
- Use async/await for all I/O operations
- Implement proper error handling and graceful degradation
- Follow the shutdown coordinator pattern for component cleanup
- Use the enhanced memory service for all memory operations
- Implement proper type hints throughout
- Store all configuration in environment variables or the Config class
- Use the Config class for accessing configuration values
- Follow the provider model pattern for LLM integration
- Use pytest for unit and integration tests
- Follow async testing patterns with pytest-asyncio
- Test both success and failure scenarios
- Include performance tests for long-running operations
- Use structured logging with appropriate log levels
- Log important state changes and decisions
- Include contextual information in log messages
- Use different log formats based on Config settings
main.py: System entry point and main event loopcore/system.py: Main AGI system orchestratorcore/config.py: Configuration managementcore/snake_agent.py: Autonomous code analysis agentcore/snake_agent_enhanced.py: Enhanced version of the snake agentcore/shutdown_coordinator.py: Graceful shutdown coordination
modules/reflection_module.py: Self-reflection capabilitiesmodules/experimentation_module.py: Experiment design and executionmodules/conversational_ai/main.py: Multi-platform conversation handlermodules/emotional_intellegence/: Mood and emotional modelingmodules/personality/: Personality and creativity modeling
services/memory_service.py: Memory storage and retrievalservices/knowledge_service.py: Knowledge base managementservices/data_service.py: Data collection and processingservices/multi_modal_service.py: Multi-modal processing capabilities
database/models.py: SQLModel database modelsdatabase/engine.py: Database engine and connection management
- The system is designed for continuous operation and has extensive shutdown handling
- The Snake Agent is a key component that autonomously improves the codebase
- Configuration can be controlled through environment variables
- The system includes multiple safety mechanisms and graceful error handling
- Memory and learning are integral to the system's continuous improvement
- The system maintains detailed logs for debugging and analysis
- The architecture supports multiple AI model providers with fallback mechanisms