Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 58 additions & 88 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,102 +1,72 @@
# Byte-compiled / optimized / DLL files
```
# Compiled and build artifacts
*.pyc
__pycache__/
**/__pycache__/
*.py[cod]
*$py.class
# Virtual environments
*.o
*.obj
dist/
build/
*.so
*.dll
*.exe
*.class

# Dependencies
.venv/
**/.venv/
env/
**/env/
venv/
**/venv/
# Logs and databases
node_modules/
.mypy_cache/
.pytest_cache/
target/
.gradle/

# Logs and temp files
*.log
*.db
*.sqlite3
# Environment and lock files
.env
.env.*
.venv
Pipfile.lock
poetry.lock
uv.lock
# Ignore temporary editor files
*.tmp
*.swp
*.swo
*~

# Environment
.env
.env.local
*.env.*

# Editors
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
# OS-specific files
*.swp
*.swo

# System files
.DS_Store
Thumbs.db
chroma_db/

# Custom
.cursorignore

# PyInstaller
# build/ # Already included in Packaging section
# dist/ # Already included in Packaging section
# *.spec # Already included in Packaging section

# Jupyter Notebook checkpoints
.ipynb_checkpoints/

# Coverage and testing
# Coverage
coverage/
htmlcov/
.coverage
.cache/
pytest_cache/
.tox/

# Mypy and Pyright
.mypy_cache/
.pyright/

# Packaging
*.egg
*.egg-info/
dist/
build/
*.spec

modules/knowledge_compression/compressed_memory.json

# RAVANA AGI specific
.qoder/

knowledge_id_map.pkl
knowledge_index.faiss

snake_agent_state.json
shared_memory/

user_data/

snake_logs/
backups/

snake_vltm_storage/
vltm_storage/
test_snake_logs/

performance_data/
.benchmarks/
.qwen/

profiles/

SNAKE_AGENT_FINAL_SUMMARY.md
SNAKE_AGENT_SUCCESS_SUMMARY.md

snake_agent_optimized_config.bat
snake_agent_optimized_config.sh

enhanced_snake_state.json
final_demonstration.py
optimize_code_snake.py
self_goals.json
.snake_index.json
# Compressed files
*.zip
*.gz
*.tar
*.tgz
*.bz2
*.xz
*.7z
*.rar
*.zst
*.lz4
*.lzh
*.cab
*.arj
*.rpm
*.deb
*.Z
*.lz
*.lzo
*.tar.gz
*.tar.bz2
*.tar.xz
*.tar.zst
```
151 changes: 151 additions & 0 deletions SIMPLIFIED_CONFIG_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Simplified Configuration Guide for RAVANA AGI

## Overview

This guide explains the simplified configuration system for the RAVANA AGI project. The goal is to reduce complexity while maintaining essential functionality.

## Key Changes

### 1. Consolidated Configuration
- **Before**: Multiple configuration files (`core/config.json`, `analysis/config.json`, `core/config.py`) with complex nested structures
- **After**: Single simplified configuration file (`simple_config.json`) with clear, logical groupings

### 2. Reduced Complexity
- Simplified model configuration from separate coding/reasoning models to a single primary model
- Consolidated API keys to essential providers only
- Streamlined settings into logical categories

### 3. Environment Variable Support
- All configuration values can be overridden via environment variables
- Maintains compatibility with existing deployment practices

## Configuration Structure

The simplified configuration is organized into these main sections:

### System
- `name`: Name of the system (default: "RAVANA")
- `database_url`: Database connection string (default: "sqlite:///ravana_agi.db")
- `log_level`: Logging level (default: "INFO")

### Operational
- `curiosity_chance`: Probability of curiosity-driven behavior (0.0 to 1.0)
- `reflection_chance`: Probability of reflection (0.0 to 1.0)
- `loop_sleep_duration`: Sleep duration between loops in seconds
- `max_iterations`: Maximum iterations for processes

### Models
- `primary`: Configuration for the main AI model
- `provider`: AI provider (e.g., "ollama", "openai")
- `model_name`: Name of the model
- `base_url`: API endpoint
- `temperature`: Creativity parameter
- `max_tokens`: Maximum tokens to generate
- `timeout`: Request timeout in seconds

### API Keys
- `electronhub`: API key for ElectronHub provider
- `zuki`: API key for Zuki provider
- `gemini`: API key for Google Gemini provider

### Memory
- `embedding_model`: Model used for embeddings
- `embedding_use_cuda`: Whether to use CUDA for embeddings

### Agents
- `snake_agent`: Configuration for the Snake Agent
- `enabled`: Whether the agent is enabled
- `interval`: Interval between agent runs in seconds

### Services
- `blog`: Blog publishing service
- `enabled`: Whether blog publishing is enabled
- `api_url`: Blog API endpoint
- `conversational_ai`: Conversational AI service
- `enabled`: Whether conversational AI is enabled

### Scheduling
- `data_collection_interval`: How often to collect data (seconds)
- `event_detection_interval`: How often to detect events (seconds)
- `knowledge_compression_interval`: How often to compress knowledge (seconds)

### Persona
- `name`: Name of the AI persona
- `creativity`: Creativity level (0.0 to 1.0)

### Shutdown
- `timeout`: Shutdown timeout in seconds
- `graceful_shutdown_enabled`: Whether graceful shutdown is enabled

## Usage

### Loading Configuration

```python
from core.simple_config import get_config

config = get_config()

# Access configuration values
print(config.system_name)
print(config.primary_model['model_name'])
```

### Environment Variables

All configuration values can be overridden using environment variables:

```bash
export SYSTEM_NAME="MyRAVANA"
export PRIMARY_MODEL_NAME="llama3.1:70b"
export CURIOSITY_CHANCE=0.5
```

### Configuration File

The configuration can also be loaded from a JSON file:

```python
from core.simple_config import SimpleConfig

config = SimpleConfig()
config.load_from_file("simple_config.json")
```

## Migration Guide

To migrate from the old configuration system:

1. Update your imports to use `core.simple_config` instead of `core.config`
2. Replace complex model configurations with the simplified primary model
3. Consolidate API keys to the essential providers
4. Use the new logical groupings for configuration values

## Benefits

1. **Easier Maintenance**: Single configuration file with clear structure
2. **Better Readability**: Logical groupings make it easy to find settings
3. **Simplified Code**: Reduced complexity in configuration handling
4. **Environment Support**: Full compatibility with environment variables
5. **Backward Compatibility**: Existing environment variables still work

## Example Configuration

```json
{
"system": {
"name": "RAVANA",
"database_url": "sqlite:///ravana_agi.db",
"log_level": "INFO"
},
"operational": {
"curiosity_chance": 0.4,
"reflection_chance": 0.15,
"loop_sleep_duration": 7,
"max_iterations": 15
}
// ... other sections
}
```

This simplified configuration system maintains all essential functionality while reducing complexity and improving maintainability.
Comment on lines +1 to +151

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's an inconsistency between the documented configuration structure and the example usage. The example JSON configuration is nested (e.g., system: { name: ... }), but the example Python code accesses values as if they are flat attributes on the config object (e.g., config.system_name). The current implementation of SimpleConfig.load_from_file does not correctly handle this nested structure, which will lead to confusion and bugs. The documentation should be aligned with a consistent (either flat or nested) configuration approach throughout the class implementation and the JSON files.

Loading
Loading